Browse Source

renaming folder name in git (Eclipse only changes references)

bohl 10 years ago
parent
commit
c7e28e2dd5
59 changed files with 5659 additions and 5631 deletions
  1. 2 0
      features/org.yakindu.base.gmf.runtime-feature/.gitignore
  2. 28 0
      features/org.yakindu.base.gmf.runtime-feature/.project
  3. 2 2
      plugins/org.yakindu.gmf.runtime/.settings/org.eclipse.core.resources.prefs
  4. 2 2
      features/org.yakindu.gmf.runtime-feature/.settings/org.eclipse.core.runtime.prefs
  5. 6 6
      features/org.yakindu.gmf.runtime-feature/build.properties
  6. 327 327
      features/org.yakindu.gmf.runtime-feature/epl-v10.html
  7. 152 152
      features/org.yakindu.gmf.runtime-feature/feature.properties
  8. 27 27
      features/org.yakindu.gmf.runtime-feature/feature.xml
  9. 107 107
      features/org.yakindu.gmf.runtime-feature/license.html
  10. 16 16
      features/org.yakindu.gmf.runtime-feature/pom.xml
  11. 327 327
      features/org.yakindu.gmf.runtime-feature/sourceTemplateFeature/epl-v10.html
  12. 157 157
      features/org.yakindu.gmf.runtime-feature/sourceTemplateFeature/feature.properties
  13. 107 107
      features/org.yakindu.gmf.runtime-feature/sourceTemplateFeature/license.html
  14. 0 2
      features/org.yakindu.gmf.runtime-feature/.gitignore
  15. 7 7
      plugins/org.yakindu.gmf.runtime/.classpath
  16. 2 0
      plugins/org.yakindu.base.gmf.runtime/.gitignore
  17. 39 39
      plugins/org.yakindu.gmf.runtime/.project
  18. 2 2
      features/org.yakindu.gmf.runtime-feature/.settings/org.eclipse.core.resources.prefs
  19. 2 2
      plugins/org.yakindu.gmf.runtime/.settings/org.eclipse.core.runtime.prefs
  20. 11 11
      plugins/org.yakindu.gmf.runtime/.settings/org.eclipse.jdt.core.prefs
  21. 28 28
      plugins/org.yakindu.gmf.runtime/META-INF/MANIFEST.MF
  22. 4 4
      plugins/org.yakindu.gmf.runtime/build.properties
  23. 15 15
      plugins/org.yakindu.gmf.runtime/pom.xml
  24. 45 45
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/commands/CompartmentChildCreateCommand.java
  25. 54 54
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/commands/CompartmentRepositionEObjectCommand.java
  26. 38 38
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/AbstractDecoratorProvider.java
  27. 235 235
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/AbstractMarkerBasedDecorationProvider.java
  28. 69 69
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/BaseDecorator.java
  29. 151 151
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/InteractiveDecorator.java
  30. 73 73
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/ControlEditPart.java
  31. 36 36
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/EllipseFixedSizeShapeNodeEditPart.java
  32. 60 60
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/FixedSizeShapeNodeEditPart.java
  33. 198 198
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/TextAwareExternalLabelEditPart.java
  34. 217 217
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/TextAwareLabelEditPart.java
  35. 124 124
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editpolicies/BarResizeEditPolicy.java
  36. 228 228
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editpolicies/CompartmentLayoutEditPolicy.java
  37. 39 39
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editpolicies/OneWayConnectionHandlesEditPolicy.java
  38. 44 44
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/figures/EllipseAnchorDefaultSizeNodeFigure.java
  39. 46 46
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/figures/FixedConnectionAnchor.java
  40. 42 42
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/HighlightingParameters.java
  41. 297 297
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/HighlightingSupportAdapter.java
  42. 128 128
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/IHighlightingSupport.java
  43. 109 109
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/palette/CreationTool.java
  44. 109 109
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/parsers/StringAttributeParser.java
  45. 534 534
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/TreeLayout.java
  46. 82 82
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/TreeLayoutConstraint.java
  47. 428 428
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/TreeLayoutUtil.java
  48. 56 56
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/UIUtils.java
  49. 60 60
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/CommandUtil.java
  50. 70 70
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/InitializeTreeNodeAnnotationsCommand.java
  51. 52 52
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/SetTreeNodesPositionAnnotationCommand.java
  52. 46 46
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/SetTreeParentAnnotationCommand.java
  53. 94 94
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnCreationCommand.java
  54. 61 61
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnDestroyElementCommand.java
  55. 84 84
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnMoveCommand.java
  56. 79 79
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnReorientRelationshipCommand.java
  57. 234 234
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/policies/TreeLayoutEditPolicy.java
  58. 67 67
      plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/util/EditPartUtils.java
  59. 0 2
      plugins/org.yakindu.gmf.runtime/.gitignore

+ 2 - 0
features/org.yakindu.base.gmf.runtime-feature/.gitignore

@@ -0,0 +1,2 @@
+/bin/
+/target/

+ 28 - 0
features/org.yakindu.base.gmf.runtime-feature/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.base.gmf.runtime-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>
+	<filteredResources>
+		<filter>
+			<id>0</id>
+			<name></name>
+			<type>10</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-target</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

+ 2 - 2
plugins/org.yakindu.gmf.runtime/.settings/org.eclipse.core.resources.prefs

@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

+ 2 - 2
features/org.yakindu.gmf.runtime-feature/.settings/org.eclipse.core.runtime.prefs

@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\n
+eclipse.preferences.version=1
+line.separator=\n

+ 6 - 6
features/org.yakindu.gmf.runtime-feature/build.properties

@@ -1,6 +1,6 @@
-bin.includes = feature.xml,\
-               epl-v10.html,\
-               feature.properties,\
-               license.html
-src.includes = epl-v10.html,\
-               license.html
+bin.includes = feature.xml,\
+               epl-v10.html,\
+               feature.properties,\
+               license.html
+src.includes = epl-v10.html,\
+               license.html

+ 327 - 327
features/org.yakindu.gmf.runtime-feature/epl-v10.html

@@ -1,328 +1,328 @@
-<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=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
-  <o:Revision>2</o:Revision>
-  <o:TotalTime>3</o:TotalTime>
-  <o:Created>2004-03-05T23:03:00Z</o:Created>
-  <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
-  <o:Pages>4</o:Pages>
-  <o:Words>1626</o:Words>
-  <o:Characters>9270</o:Characters>
-   <o:Lines>77</o:Lines>
-  <o:Paragraphs>18</o:Paragraphs>
-  <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
-  <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
-  <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
-	{font-family:Tahoma;
-	panose-1:2 11 6 4 3 5 4 4 2 4;
-	mso-font-charset:0;
-	mso-generic-font-family:swiss;
-	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;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-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;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
-	{mso-style-name:"Balloon Text";
-	margin:0in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:8.0pt;
-	font-family:Tahoma;
-	mso-fareast-font-family:"Times New Roman";}
-@page Section1
-	{size:8.5in 11.0in;
-	margin:1.0in 1.25in 1.0in 1.25in;
-	mso-header-margin:.5in;
-	mso-footer-margin:.5in;
-	mso-paper-source:0;}
-div.Section1
-	{page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
+<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=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+  <o:Revision>2</o:Revision>
+  <o:TotalTime>3</o:TotalTime>
+  <o:Created>2004-03-05T23:03:00Z</o:Created>
+  <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+  <o:Pages>4</o:Pages>
+  <o:Words>1626</o:Words>
+  <o:Characters>9270</o:Characters>
+   <o:Lines>77</o:Lines>
+  <o:Paragraphs>18</o:Paragraphs>
+  <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+  <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+  <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+	{font-family:Tahoma;
+	panose-1:2 11 6 4 3 5 4 4 2 4;
+	mso-font-charset:0;
+	mso-generic-font-family:swiss;
+	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;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+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;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+	{mso-style-name:"Balloon Text";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:8.0pt;
+	font-family:Tahoma;
+	mso-fareast-font-family:"Times New Roman";}
+@page Section1
+	{size:8.5in 11.0in;
+	margin:1.0in 1.25in 1.0in 1.25in;
+	mso-header-margin:.5in;
+	mso-footer-margin:.5in;
+	mso-paper-source:0;}
+div.Section1
+	{page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
 </html>
 </html>

+ 152 - 152
features/org.yakindu.gmf.runtime-feature/feature.properties

@@ -1,152 +1,152 @@
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "updateSiteName" property - label for the update site
-updateSiteName=YAKINDU Statechart Tools 2
-# "description" property - description of the feature
-description=API documentation and source code for GMF runtime commons feature.
-
-# "licenseURL" property - URL of the "Feature License"
-licenseURL=license.html
-# "copyrightURL" property - URL of the "Feature Copyright"
-copyrightURL=epl-v10.html
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2011 itemis AG and others.\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\
-    itemis AG - initial API and implementation\n
-################ end of copyright property ####################################
-
-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 ##########################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "updateSiteName" property - label for the update site
+updateSiteName=YAKINDU Statechart Tools 2
+# "description" property - description of the feature
+description=API documentation and source code for GMF runtime commons feature.
+
+# "licenseURL" property - URL of the "Feature License"
+licenseURL=license.html
+# "copyrightURL" property - URL of the "Feature Copyright"
+copyrightURL=epl-v10.html
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011 itemis AG and others.\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\
+    itemis AG - initial API and implementation\n
+################ end of copyright property ####################################
+
+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 ##########################################

+ 27 - 27
features/org.yakindu.gmf.runtime-feature/feature.xml

@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.yakindu.base.gmf.runtime"
-      label="GMF Runtime"
-      version="2.5.0.qualifier"
-      provider-name="itemis AG">
-
-   <description>
-      %description
-   </description>
-
-   <copyright url="%copyrightURL">
-      %copyright
-   </copyright>
-
-   <license url="%licenseURL">
-      %license
-   </license>
-
-   <plugin
-         id="org.yakindu.base.gmf.runtime"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.yakindu.base.gmf.runtime"
+      label="GMF Runtime"
+      version="2.5.0.qualifier"
+      provider-name="itemis AG">
+
+   <description>
+      %description
+   </description>
+
+   <copyright url="%copyrightURL">
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.yakindu.base.gmf.runtime"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

+ 107 - 107
features/org.yakindu.gmf.runtime-feature/license.html

@@ -1,107 +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 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
-   (COLLECTIVELY &quot;CONTENT&quot;).  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
-   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
-   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
-   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
-   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
-   (&quot;EPL&quot;).  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-   For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
-   repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
-       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
-       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;.  Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
-      and/or Fragments associated with that Feature.</li>
-       <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;).  Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
-       <li>The top-level (root) directory</li>
-       <li>Plug-in and Fragment directories</li>
-       <li>Inside Plug-ins and Fragments packaged as JARs</li>
-       <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
-       <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them.  Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
-       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
-   Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
-   other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
-   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
-       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
-   (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
-   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
-   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
-   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
-       <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
-       on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
-       product.</li>
-       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
-       accessed and copied to the Target Machine.</li>
-       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
-       Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
-       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
-       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
-       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
-   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
-   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
+<?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 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY &quot;CONTENT&quot;).  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   (&quot;EPL&quot;).  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;.  Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;).  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+       on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>

+ 16 - 16
features/org.yakindu.gmf.runtime-feature/pom.xml

@@ -1,16 +1,16 @@
-<?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.yakindu.sct</groupId>
-		<artifactId>org.yakindu.sct.releng</artifactId>
-		<version>2.5.0-SNAPSHOT</version>
-		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
-	</parent>
-	<artifactId>org.yakindu.base.gmf.runtime</artifactId>
-	<packaging>eclipse-feature</packaging>
-	<groupId>org.yakindu.sct.features</groupId>
-	<name>org.yakindu.gmf.base.runtime-feature</name>
-</project>
+<?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.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.5.0-SNAPSHOT</version>
+		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.base.gmf.runtime</artifactId>
+	<packaging>eclipse-feature</packaging>
+	<groupId>org.yakindu.sct.features</groupId>
+	<name>org.yakindu.gmf.base.runtime-feature</name>
+</project>

+ 327 - 327
features/org.yakindu.gmf.runtime-feature/sourceTemplateFeature/epl-v10.html

@@ -1,328 +1,328 @@
-<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=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
-  <o:Revision>2</o:Revision>
-  <o:TotalTime>3</o:TotalTime>
-  <o:Created>2004-03-05T23:03:00Z</o:Created>
-  <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
-  <o:Pages>4</o:Pages>
-  <o:Words>1626</o:Words>
-  <o:Characters>9270</o:Characters>
-   <o:Lines>77</o:Lines>
-  <o:Paragraphs>18</o:Paragraphs>
-  <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
-  <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
-  <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
-	{font-family:Tahoma;
-	panose-1:2 11 6 4 3 5 4 4 2 4;
-	mso-font-charset:0;
-	mso-generic-font-family:swiss;
-	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;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-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;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
-	{mso-style-name:"Balloon Text";
-	margin:0in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:8.0pt;
-	font-family:Tahoma;
-	mso-fareast-font-family:"Times New Roman";}
-@page Section1
-	{size:8.5in 11.0in;
-	margin:1.0in 1.25in 1.0in 1.25in;
-	mso-header-margin:.5in;
-	mso-footer-margin:.5in;
-	mso-paper-source:0;}
-div.Section1
-	{page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
+<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=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+  <o:Revision>2</o:Revision>
+  <o:TotalTime>3</o:TotalTime>
+  <o:Created>2004-03-05T23:03:00Z</o:Created>
+  <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+  <o:Pages>4</o:Pages>
+  <o:Words>1626</o:Words>
+  <o:Characters>9270</o:Characters>
+   <o:Lines>77</o:Lines>
+  <o:Paragraphs>18</o:Paragraphs>
+  <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+  <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+  <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+	{font-family:Tahoma;
+	panose-1:2 11 6 4 3 5 4 4 2 4;
+	mso-font-charset:0;
+	mso-generic-font-family:swiss;
+	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;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+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;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+	{mso-style-name:"Balloon Text";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:8.0pt;
+	font-family:Tahoma;
+	mso-fareast-font-family:"Times New Roman";}
+@page Section1
+	{size:8.5in 11.0in;
+	margin:1.0in 1.25in 1.0in 1.25in;
+	mso-header-margin:.5in;
+	mso-footer-margin:.5in;
+	mso-paper-source:0;}
+div.Section1
+	{page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
 </html>
 </html>

+ 157 - 157
features/org.yakindu.gmf.runtime-feature/sourceTemplateFeature/feature.properties

@@ -1,157 +1,157 @@
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Xtext GMF Integration (XGI) Sources
-
-# "providerName" property - name of the company that provides the feature
-providerName=itemis AG
-
-# "updateSiteName" property - label for the update site
-updateSiteName=Xtext GMF Integration (XGI) Update Site
-
-# "description" property - description of the feature
-description=API documentation and source code for Xtext GMF Integration (GMF).
-
-# "licenseURL" property - URL of the "Feature License"
-licenseURL=license.html
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2011 itemis AG and others.\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\
-    itemis AG - initial API and implementation\n
-################ end of copyright property ####################################
-
-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 ##########################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Xtext GMF Integration (XGI) Sources
+
+# "providerName" property - name of the company that provides the feature
+providerName=itemis AG
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Xtext GMF Integration (XGI) Update Site
+
+# "description" property - description of the feature
+description=API documentation and source code for Xtext GMF Integration (GMF).
+
+# "licenseURL" property - URL of the "Feature License"
+licenseURL=license.html
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2011 itemis AG and others.\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\
+    itemis AG - initial API and implementation\n
+################ end of copyright property ####################################
+
+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 ##########################################

+ 107 - 107
features/org.yakindu.gmf.runtime-feature/sourceTemplateFeature/license.html

@@ -1,107 +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 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
-   (COLLECTIVELY &quot;CONTENT&quot;).  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
-   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
-   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
-   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
-   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
-   (&quot;EPL&quot;).  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-   For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
-   repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
-       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
-       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;.  Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
-      and/or Fragments associated with that Feature.</li>
-       <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;).  Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
-       <li>The top-level (root) directory</li>
-       <li>Plug-in and Fragment directories</li>
-       <li>Inside Plug-ins and Fragments packaged as JARs</li>
-       <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
-       <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them.  Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
-       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
-   Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
-   other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
-   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
-       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
-   (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
-   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
-   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
-   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
-       <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
-       on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
-       product.</li>
-       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
-       accessed and copied to the Target Machine.</li>
-       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
-       Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
-       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
-       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
-       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
-   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
-   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
+<?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 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY &quot;CONTENT&quot;).  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   (&quot;EPL&quot;).  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;.  Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;).  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+       on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>

+ 0 - 2
features/org.yakindu.gmf.runtime-feature/.gitignore

@@ -1,2 +0,0 @@
-/bin/
-/target/

+ 7 - 7
plugins/org.yakindu.gmf.runtime/.classpath

@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 2 - 0
plugins/org.yakindu.base.gmf.runtime/.gitignore

@@ -0,0 +1,2 @@
+/bin/
+/target/

+ 39 - 39
plugins/org.yakindu.gmf.runtime/.project

@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.yakindu.base.gmf.runtime</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>
-	<filteredResources>
-		<filter>
-			<id>0</id>
-			<name></name>
-			<type>10</type>
-			<matcher>
-				<id>org.eclipse.ui.ide.multiFilter</id>
-				<arguments>1.0-name-matches-false-false-target</arguments>
-			</matcher>
-		</filter>
-	</filteredResources>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.base.gmf.runtime</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>
+	<filteredResources>
+		<filter>
+			<id>0</id>
+			<name></name>
+			<type>10</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-target</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

+ 2 - 2
features/org.yakindu.gmf.runtime-feature/.settings/org.eclipse.core.resources.prefs

@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+eclipse.preferences.version=1
+encoding/<project>=UTF-8

+ 2 - 2
plugins/org.yakindu.gmf.runtime/.settings/org.eclipse.core.runtime.prefs

@@ -1,2 +1,2 @@
-eclipse.preferences.version=1
-line.separator=\n
+eclipse.preferences.version=1
+line.separator=\n

+ 11 - 11
plugins/org.yakindu.gmf.runtime/.settings/org.eclipse.jdt.core.prefs

@@ -1,11 +1,11 @@
-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
+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

+ 28 - 28
plugins/org.yakindu.gmf.runtime/META-INF/MANIFEST.MF

@@ -1,28 +1,28 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: GMF Runtime Commons
-Bundle-SymbolicName: org.yakindu.base.gmf.runtime
-Bundle-Version: 2.5.0.qualifier
-Bundle-Vendor: itemis AG
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.4.2",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1",
- org.yakindu.base.xtext.utils.jface;bundle-version="1.0.0",
- com.google.inject;bundle-version="2.0.0",
- org.eclipse.help;bundle-version="3.5.100",
- org.eclipse.emf.databinding;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.jface.databinding;bundle-version="1.5.0";visibility:=reexport,
- org.eclipse.core.databinding.property;bundle-version="1.4.0";visibility:=reexport,
- org.eclipse.emf.databinding.edit;bundle-version="1.2.0";visibility:=reexport,
- org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0",
- org.yakindu.base.xtext.utils.gmf;bundle-version="1.0.0"
-Export-Package: org.yakindu.base.gmf.runtime.commands,
- org.yakindu.base.gmf.runtime.decorators,
- org.yakindu.base.gmf.runtime.editparts,
- org.yakindu.base.gmf.runtime.editpolicies,
- org.yakindu.base.gmf.runtime.figures,
- org.yakindu.base.gmf.runtime.highlighting,
- org.yakindu.base.gmf.runtime.palette,
- org.yakindu.base.gmf.runtime.parsers,
- org.yakindu.base.gmf.runtime.util
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: GMF Runtime Commons
+Bundle-SymbolicName: org.yakindu.base.gmf.runtime
+Bundle-Version: 2.5.0.qualifier
+Bundle-Vendor: itemis AG
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.4.2",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1",
+ org.yakindu.base.xtext.utils.jface;bundle-version="1.0.0",
+ com.google.inject;bundle-version="2.0.0",
+ org.eclipse.help;bundle-version="3.5.100",
+ org.eclipse.emf.databinding;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.jface.databinding;bundle-version="1.5.0";visibility:=reexport,
+ org.eclipse.core.databinding.property;bundle-version="1.4.0";visibility:=reexport,
+ org.eclipse.emf.databinding.edit;bundle-version="1.2.0";visibility:=reexport,
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.4.1",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0",
+ org.yakindu.base.xtext.utils.gmf;bundle-version="1.0.0"
+Export-Package: org.yakindu.base.gmf.runtime.commands,
+ org.yakindu.base.gmf.runtime.decorators,
+ org.yakindu.base.gmf.runtime.editparts,
+ org.yakindu.base.gmf.runtime.editpolicies,
+ org.yakindu.base.gmf.runtime.figures,
+ org.yakindu.base.gmf.runtime.highlighting,
+ org.yakindu.base.gmf.runtime.palette,
+ org.yakindu.base.gmf.runtime.parsers,
+ org.yakindu.base.gmf.runtime.util

+ 4 - 4
plugins/org.yakindu.gmf.runtime/build.properties

@@ -1,4 +1,4 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .

+ 15 - 15
plugins/org.yakindu.gmf.runtime/pom.xml

@@ -1,15 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.yakindu.sct</groupId>
-		<artifactId>org.yakindu.sct.releng</artifactId>
-		<version>2.5.0-SNAPSHOT</version>
-		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
-	</parent>
-	<artifactId>org.yakindu.base.gmf.runtime</artifactId>
-	<groupId>org.yakindu.sct.plugins</groupId>
-	<packaging>eclipse-plugin</packaging>
-</project>
+<?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.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.5.0-SNAPSHOT</version>
+		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.base.gmf.runtime</artifactId>
+	<groupId>org.yakindu.sct.plugins</groupId>
+	<packaging>eclipse-plugin</packaging>
+</project>

+ 45 - 45
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/commands/CompartmentChildCreateCommand.java

@@ -1,45 +1,45 @@
-package org.yakindu.base.gmf.runtime.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-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.notation.View;
-
-
-/**
- * @see http://wiki.eclipse.org/GMF/Recipes
- * 
- */
-public class CompartmentChildCreateCommand extends CreateCommand {
-	int index;
-
-	public CompartmentChildCreateCommand(
-			TransactionalEditingDomain editingDomain,
-			ViewDescriptor viewDescriptor, View containerView, int index) {
-		super(editingDomain, viewDescriptor, containerView);
-		this.index = index;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-
-		View view = ViewService.getInstance().createView(
-				viewDescriptor.getViewKind(),
-				viewDescriptor.getElementAdapter(), containerView,
-				viewDescriptor.getSemanticHint(), index,
-				viewDescriptor.isPersisted(),
-				viewDescriptor.getPreferencesHint());
-		Assert.isNotNull(view, "failed to create a view"); //$NON-NLS-1$
-		viewDescriptor.setView(view);
-
-		return CommandResult.newOKCommandResult(viewDescriptor);
-	}
-
-}
+package org.yakindu.base.gmf.runtime.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+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.notation.View;
+
+
+/**
+ * @see http://wiki.eclipse.org/GMF/Recipes
+ * 
+ */
+public class CompartmentChildCreateCommand extends CreateCommand {
+	int index;
+
+	public CompartmentChildCreateCommand(
+			TransactionalEditingDomain editingDomain,
+			ViewDescriptor viewDescriptor, View containerView, int index) {
+		super(editingDomain, viewDescriptor, containerView);
+		this.index = index;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+
+		View view = ViewService.getInstance().createView(
+				viewDescriptor.getViewKind(),
+				viewDescriptor.getElementAdapter(), containerView,
+				viewDescriptor.getSemanticHint(), index,
+				viewDescriptor.isPersisted(),
+				viewDescriptor.getPreferencesHint());
+		Assert.isNotNull(view, "failed to create a view"); //$NON-NLS-1$
+		viewDescriptor.setView(view);
+
+		return CommandResult.newOKCommandResult(viewDescriptor);
+	}
+
+}

+ 54 - 54
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/commands/CompartmentRepositionEObjectCommand.java

@@ -1,54 +1,54 @@
-package org.yakindu.base.gmf.runtime.commands;
-
-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.transaction.TransactionalEditingDomain;
-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.commands.core.commands.RepositionEObjectCommand;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * @see http://wiki.eclipse.org/GMF/Recipes
- * 
- */
-@SuppressWarnings("rawtypes")
-public class CompartmentRepositionEObjectCommand extends
-		RepositionEObjectCommand {
-
-	EditPart childToMove = null;
-	int newIndex = 0;
-
-	public CompartmentRepositionEObjectCommand(
-			TransactionalEditingDomain editingDomain, String label,
-			EList elements, EObject element, int displacement) {
-		super(editingDomain, label, elements, element, displacement);
-	}
-
-	public CompartmentRepositionEObjectCommand(EditPart childToMove,
-			TransactionalEditingDomain editingDomain, String label,
-			EList elements, EObject element, int displacement, int newIndex) {
-		super(editingDomain, label, elements, element, displacement);
-
-		this.childToMove = childToMove;
-		this.newIndex = newIndex;
-	}
-
-	@Override
-	public CommandResult doExecuteWithResult(IProgressMonitor progressMonitor,
-			IAdaptable info) throws ExecutionException {
-		CommandResult rs = super.doExecuteWithResult(progressMonitor, info);
-
-		EditPart compartment = childToMove.getParent();
-
-		ViewUtil.repositionChildAt((View) compartment.getModel(),
-				(View) childToMove.getModel(), newIndex);
-		compartment.refresh();
-
-		return rs;
-	}
-}
+package org.yakindu.base.gmf.runtime.commands;
+
+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.transaction.TransactionalEditingDomain;
+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.commands.core.commands.RepositionEObjectCommand;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @see http://wiki.eclipse.org/GMF/Recipes
+ * 
+ */
+@SuppressWarnings("rawtypes")
+public class CompartmentRepositionEObjectCommand extends
+		RepositionEObjectCommand {
+
+	EditPart childToMove = null;
+	int newIndex = 0;
+
+	public CompartmentRepositionEObjectCommand(
+			TransactionalEditingDomain editingDomain, String label,
+			EList elements, EObject element, int displacement) {
+		super(editingDomain, label, elements, element, displacement);
+	}
+
+	public CompartmentRepositionEObjectCommand(EditPart childToMove,
+			TransactionalEditingDomain editingDomain, String label,
+			EList elements, EObject element, int displacement, int newIndex) {
+		super(editingDomain, label, elements, element, displacement);
+
+		this.childToMove = childToMove;
+		this.newIndex = newIndex;
+	}
+
+	@Override
+	public CommandResult doExecuteWithResult(IProgressMonitor progressMonitor,
+			IAdaptable info) throws ExecutionException {
+		CommandResult rs = super.doExecuteWithResult(progressMonitor, info);
+
+		EditPart compartment = childToMove.getParent();
+
+		ViewUtil.repositionChildAt((View) compartment.getModel(),
+				(View) childToMove.getModel(), newIndex);
+		compartment.refresh();
+
+		return rs;
+	}
+}

+ 38 - 38
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/AbstractDecoratorProvider.java

@@ -1,38 +1,38 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.decorators;
-
-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.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.View;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public abstract class AbstractDecoratorProvider extends AbstractProvider
-		implements IDecoratorProvider {
-
-	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;
-	}
-
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.decorators;
+
+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.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.View;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public abstract class AbstractDecoratorProvider extends AbstractProvider
+		implements IDecoratorProvider {
+
+	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;
+	}
+
+}

+ 235 - 235
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/AbstractMarkerBasedDecorationProvider.java

@@ -1,235 +1,235 @@
-/**
- * Copyright (c) 2013 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.decorators;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-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.emf.transaction.util.TransactionUtil;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager;
-import org.eclipse.gmf.runtime.common.ui.resources.IFileObserver;
-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.parts.DiagramEditDomain;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator;
-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.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Abstract base class for all GMF {@link IDecoratorProvider} that provide
- * decoration based on {@link IMarker}s. Code initially copied form GMF tooling
- * generated validation provider.
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public abstract class AbstractMarkerBasedDecorationProvider extends AbstractDecoratorProvider implements
-		IDecoratorProvider {
-
-	private static MarkerObserver fileObserver;
-
-	private static Map<String, List<IDecorator>> allDecorators = new HashMap<String, List<IDecorator>>();
-
-	protected abstract boolean shouldInstall(IEditorPart part);
-
-	protected abstract String getDecoratorKey();
-
-	protected abstract StatusDecorator createStatusDecorator(IDecoratorTarget decoratorTarget);
-
-	public void createDecorators(IDecoratorTarget decoratorTarget) {
-		EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
-		if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
-			EditDomain ed = editPart.getViewer().getEditDomain();
-			if (!(ed instanceof DiagramEditDomain)) {
-				return;
-			}
-			if (shouldInstall(((DiagramEditDomain) ed).getEditorPart())) {
-				decoratorTarget.installDecorator(getDecoratorKey(), createStatusDecorator(decoratorTarget));
-			}
-		}
-	}
-
-	protected static void refreshDecorators(String viewId, Diagram diagram) {
-		final List<IDecorator> decorators = viewId != null ? (List<IDecorator>) allDecorators.get(viewId) : null;
-		if (decorators == null || decorators.isEmpty() || diagram == null) {
-			return;
-		}
-		PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-			public void run() {
-				for (Iterator<IDecorator> it = decorators.iterator(); it.hasNext();) {
-					IDecorator decorator = it.next();
-					decorator.refresh();
-				}
-			}
-		});
-	}
-
-	public abstract static class StatusDecorator extends AbstractDecorator {
-
-		private String viewId;
-
-		protected abstract String getMarkerType();
-
-		protected abstract void createDecorators(View view, List<IMarker> markers);
-
-		public StatusDecorator(IDecoratorTarget decoratorTarget) {
-			super(decoratorTarget);
-			try {
-				final View view = (View) getDecoratorTarget().getAdapter(View.class);
-				TransactionUtil.getEditingDomain(view).runExclusive(new Runnable() {
-					public void run() {
-						StatusDecorator.this.viewId = view != null ? ViewUtil.getIdStr(view) : null;
-					}
-				});
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-
-		public void refresh() {
-			removeDecoration();
-			View view = (View) getDecoratorTarget().getAdapter(View.class);
-			if (view == null || view.eResource() == null) {
-				return;
-			}
-			EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(EditPart.class);
-			if (editPart == null || editPart.getViewer() == null) {
-				return;
-			}
-
-			IResource resource = WorkspaceSynchronizer.getFile(view.eResource());
-			if (resource == null || !resource.exists()) {
-				return;
-			}
-			List<IMarker> markers = new ArrayList<IMarker>();
-			try {
-				markers.addAll(Arrays.asList(resource.findMarkers(getMarkerType(), true, IResource.DEPTH_INFINITE)));
-			} catch (CoreException e) {
-				e.printStackTrace();
-			}
-			if (markers == null || markers.size() == 0) {
-				return;
-			}
-			createDecorators(view, markers);
-		}
-
-		public void activate() {
-			if (viewId == null) {
-				return;
-			}
-
-			// add self to global decorators registry
-			List<IDecorator> list = allDecorators.get(viewId);
-			if (list == null) {
-				list = new ArrayList<IDecorator>(2);
-				list.add(this);
-				allDecorators.put(viewId, list);
-			} else if (!list.contains(this)) {
-				list.add(this);
-			}
-
-			// start listening to changes in resources
-			View view = (View) getDecoratorTarget().getAdapter(View.class);
-			if (view == null) {
-				return;
-			}
-			Diagram diagramView = view.getDiagram();
-			if (diagramView == null) {
-				return;
-			}
-			if (fileObserver == null) {
-				FileChangeManager.getInstance().addFileObserver(fileObserver = new MarkerObserver(diagramView));
-			}
-		}
-
-		public void deactivate() {
-			if (viewId == null) {
-				return;
-			}
-
-			// remove self from global decorators registry
-			List<IDecorator> list = allDecorators.get(viewId);
-			if (list != null) {
-				list.remove(this);
-				if (list.isEmpty()) {
-					allDecorators.remove(viewId);
-				}
-			}
-
-			// stop listening to changes in resources if there are no more
-			// decorators
-			if (fileObserver != null && allDecorators.isEmpty()) {
-				FileChangeManager.getInstance().removeFileObserver(fileObserver);
-				fileObserver = null;
-			}
-			super.deactivate();
-		}
-	}
-
-	protected static class MarkerObserver implements IFileObserver {
-
-		private final Diagram diagram;
-
-		private MarkerObserver(Diagram diagram) {
-			this.diagram = diagram;
-		}
-
-		public void handleFileRenamed(IFile oldFile, IFile file) {
-		}
-
-		public void handleFileMoved(IFile oldFile, IFile file) {
-		}
-
-		public void handleFileDeleted(IFile file) {
-		}
-
-		public void handleFileChanged(IFile file) {
-		}
-
-		public void handleMarkerAdded(IMarker marker) {
-			if (marker.getAttribute(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, null) != null) {
-				handleMarkerChanged(marker);
-			}
-		}
-
-		public void handleMarkerDeleted(IMarker marker, @SuppressWarnings("rawtypes") Map attributes) {
-			if (attributes == null)
-				return;
-			String viewId = (String) attributes.get(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID);
-			if (viewId == null)
-				return;
-			refreshDecorators(viewId, diagram);
-		}
-
-		public void handleMarkerChanged(IMarker marker) {
-			String viewId = marker.getAttribute(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, "");
-			refreshDecorators(viewId, diagram);
-		}
-	}
-
-}
+/**
+ * Copyright (c) 2013 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.decorators;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+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.emf.transaction.util.TransactionUtil;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager;
+import org.eclipse.gmf.runtime.common.ui.resources.IFileObserver;
+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.parts.DiagramEditDomain;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator;
+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.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Abstract base class for all GMF {@link IDecoratorProvider} that provide
+ * decoration based on {@link IMarker}s. Code initially copied form GMF tooling
+ * generated validation provider.
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public abstract class AbstractMarkerBasedDecorationProvider extends AbstractDecoratorProvider implements
+		IDecoratorProvider {
+
+	private static MarkerObserver fileObserver;
+
+	private static Map<String, List<IDecorator>> allDecorators = new HashMap<String, List<IDecorator>>();
+
+	protected abstract boolean shouldInstall(IEditorPart part);
+
+	protected abstract String getDecoratorKey();
+
+	protected abstract StatusDecorator createStatusDecorator(IDecoratorTarget decoratorTarget);
+
+	public void createDecorators(IDecoratorTarget decoratorTarget) {
+		EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
+		if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
+			EditDomain ed = editPart.getViewer().getEditDomain();
+			if (!(ed instanceof DiagramEditDomain)) {
+				return;
+			}
+			if (shouldInstall(((DiagramEditDomain) ed).getEditorPart())) {
+				decoratorTarget.installDecorator(getDecoratorKey(), createStatusDecorator(decoratorTarget));
+			}
+		}
+	}
+
+	protected static void refreshDecorators(String viewId, Diagram diagram) {
+		final List<IDecorator> decorators = viewId != null ? (List<IDecorator>) allDecorators.get(viewId) : null;
+		if (decorators == null || decorators.isEmpty() || diagram == null) {
+			return;
+		}
+		PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+			public void run() {
+				for (Iterator<IDecorator> it = decorators.iterator(); it.hasNext();) {
+					IDecorator decorator = it.next();
+					decorator.refresh();
+				}
+			}
+		});
+	}
+
+	public abstract static class StatusDecorator extends AbstractDecorator {
+
+		private String viewId;
+
+		protected abstract String getMarkerType();
+
+		protected abstract void createDecorators(View view, List<IMarker> markers);
+
+		public StatusDecorator(IDecoratorTarget decoratorTarget) {
+			super(decoratorTarget);
+			try {
+				final View view = (View) getDecoratorTarget().getAdapter(View.class);
+				TransactionUtil.getEditingDomain(view).runExclusive(new Runnable() {
+					public void run() {
+						StatusDecorator.this.viewId = view != null ? ViewUtil.getIdStr(view) : null;
+					}
+				});
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+
+		public void refresh() {
+			removeDecoration();
+			View view = (View) getDecoratorTarget().getAdapter(View.class);
+			if (view == null || view.eResource() == null) {
+				return;
+			}
+			EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(EditPart.class);
+			if (editPart == null || editPart.getViewer() == null) {
+				return;
+			}
+
+			IResource resource = WorkspaceSynchronizer.getFile(view.eResource());
+			if (resource == null || !resource.exists()) {
+				return;
+			}
+			List<IMarker> markers = new ArrayList<IMarker>();
+			try {
+				markers.addAll(Arrays.asList(resource.findMarkers(getMarkerType(), true, IResource.DEPTH_INFINITE)));
+			} catch (CoreException e) {
+				e.printStackTrace();
+			}
+			if (markers == null || markers.size() == 0) {
+				return;
+			}
+			createDecorators(view, markers);
+		}
+
+		public void activate() {
+			if (viewId == null) {
+				return;
+			}
+
+			// add self to global decorators registry
+			List<IDecorator> list = allDecorators.get(viewId);
+			if (list == null) {
+				list = new ArrayList<IDecorator>(2);
+				list.add(this);
+				allDecorators.put(viewId, list);
+			} else if (!list.contains(this)) {
+				list.add(this);
+			}
+
+			// start listening to changes in resources
+			View view = (View) getDecoratorTarget().getAdapter(View.class);
+			if (view == null) {
+				return;
+			}
+			Diagram diagramView = view.getDiagram();
+			if (diagramView == null) {
+				return;
+			}
+			if (fileObserver == null) {
+				FileChangeManager.getInstance().addFileObserver(fileObserver = new MarkerObserver(diagramView));
+			}
+		}
+
+		public void deactivate() {
+			if (viewId == null) {
+				return;
+			}
+
+			// remove self from global decorators registry
+			List<IDecorator> list = allDecorators.get(viewId);
+			if (list != null) {
+				list.remove(this);
+				if (list.isEmpty()) {
+					allDecorators.remove(viewId);
+				}
+			}
+
+			// stop listening to changes in resources if there are no more
+			// decorators
+			if (fileObserver != null && allDecorators.isEmpty()) {
+				FileChangeManager.getInstance().removeFileObserver(fileObserver);
+				fileObserver = null;
+			}
+			super.deactivate();
+		}
+	}
+
+	protected static class MarkerObserver implements IFileObserver {
+
+		private final Diagram diagram;
+
+		private MarkerObserver(Diagram diagram) {
+			this.diagram = diagram;
+		}
+
+		public void handleFileRenamed(IFile oldFile, IFile file) {
+		}
+
+		public void handleFileMoved(IFile oldFile, IFile file) {
+		}
+
+		public void handleFileDeleted(IFile file) {
+		}
+
+		public void handleFileChanged(IFile file) {
+		}
+
+		public void handleMarkerAdded(IMarker marker) {
+			if (marker.getAttribute(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, null) != null) {
+				handleMarkerChanged(marker);
+			}
+		}
+
+		public void handleMarkerDeleted(IMarker marker, @SuppressWarnings("rawtypes") Map attributes) {
+			if (attributes == null)
+				return;
+			String viewId = (String) attributes.get(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID);
+			if (viewId == null)
+				return;
+			refreshDecorators(viewId, diagram);
+		}
+
+		public void handleMarkerChanged(IMarker marker) {
+			String viewId = marker.getAttribute(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, "");
+			refreshDecorators(viewId, diagram);
+		}
+	}
+
+}

+ 69 - 69
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/BaseDecorator.java

@@ -1,69 +1,69 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.decorators;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public abstract class BaseDecorator extends AbstractDecorator {
-
-	private IGraphicalEditPart gep;
-
-	private EObject semanticElement;
-
-	public BaseDecorator(IDecoratorTarget decoratorTarget) {
-		super(decoratorTarget);
-		gep = (IGraphicalEditPart) getDecoratorTarget().getAdapter(
-				IGraphicalEditPart.class);
-		semanticElement = gep.resolveSemanticElement();
-
-	}
-
-	private NotificationListener notificationListener = new NotificationListener() {
-
-		public void notifyChanged(Notification notification) {
-			refresh();
-		}
-	};
-
-	public void activate() {
-		DiagramEventBroker.getInstance(gep.getEditingDomain())
-				.addNotificationListener(semanticElement, notificationListener);
-		DiagramEventBroker.getInstance(gep.getEditingDomain())
-				.addNotificationListener(gep.getNotationView(),
-						notificationListener);
-	}
-
-	public void deactivate() {
-		removeDecoration();
-		IGraphicalEditPart gep = (IGraphicalEditPart) getDecoratorTarget()
-				.getAdapter(IGraphicalEditPart.class);
-		assert gep != null;
-
-		DiagramEventBroker.getInstance(gep.getEditingDomain())
-				.removeNotificationListener(semanticElement,
-						notificationListener);
-		DiagramEventBroker.getInstance(gep.getEditingDomain())
-				.removeNotificationListener(gep.getNotationView(),
-						notificationListener);
-	}
-
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.decorators;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public abstract class BaseDecorator extends AbstractDecorator {
+
+	private IGraphicalEditPart gep;
+
+	private EObject semanticElement;
+
+	public BaseDecorator(IDecoratorTarget decoratorTarget) {
+		super(decoratorTarget);
+		gep = (IGraphicalEditPart) getDecoratorTarget().getAdapter(
+				IGraphicalEditPart.class);
+		semanticElement = gep.resolveSemanticElement();
+
+	}
+
+	private NotificationListener notificationListener = new NotificationListener() {
+
+		public void notifyChanged(Notification notification) {
+			refresh();
+		}
+	};
+
+	public void activate() {
+		DiagramEventBroker.getInstance(gep.getEditingDomain())
+				.addNotificationListener(semanticElement, notificationListener);
+		DiagramEventBroker.getInstance(gep.getEditingDomain())
+				.addNotificationListener(gep.getNotationView(),
+						notificationListener);
+	}
+
+	public void deactivate() {
+		removeDecoration();
+		IGraphicalEditPart gep = (IGraphicalEditPart) getDecoratorTarget()
+				.getAdapter(IGraphicalEditPart.class);
+		assert gep != null;
+
+		DiagramEventBroker.getInstance(gep.getEditingDomain())
+				.removeNotificationListener(semanticElement,
+						notificationListener);
+		DiagramEventBroker.getInstance(gep.getEditingDomain())
+				.removeNotificationListener(gep.getNotationView(),
+						notificationListener);
+	}
+
+}

+ 151 - 151
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/decorators/InteractiveDecorator.java

@@ -1,151 +1,151 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.decorators;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MouseEvent;
-import org.eclipse.draw2d.MouseListener;
-import org.eclipse.draw2d.MouseMotionListener;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.Decoration;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * 
- * @author terfloth - Initial contribution
- * 
- *         TODO: extract margin property
- * 
- */
-public abstract class InteractiveDecorator extends BaseDecorator {
-
-	protected MouseListener decorationMouseListener;
-
-	protected abstract IFigure getToolTipFigure(EObject element);
-
-	protected abstract Image getDecorationImage(EObject element);
-
-	protected abstract boolean shouldDecorate(EObject element);
-
-	public InteractiveDecorator(IDecoratorTarget decoratorTarget) {
-		super(decoratorTarget);
-
-		decorationMouseListener = new MouseListener() {
-			public void mousePressed(MouseEvent me) {
-				InteractiveDecorator.this.mousePressed(getDecoration(),
-						getSemanticElement());
-			}
-
-			public void mouseReleased(MouseEvent me) {
-				InteractiveDecorator.this.mouseReleased(getDecoration(),
-						getSemanticElement());
-			}
-
-			public void mouseDoubleClicked(MouseEvent me) {
-				InteractiveDecorator.this.mouseDoubleClicked(getDecoration(),
-						getSemanticElement());
-			}
-		};
-	}
-
-	protected abstract Direction getDecoratorPosition();
-
-	public void refresh() {
-		disposeDecoration();
-		if (getDecoratorTarget().getAdapter(EditPart.class) instanceof IPrimaryEditPart) {
-			final EObject semanticElement = getSemanticElement();
-			if (shouldDecorate(getSemanticElement())) {
-				setDecoration(createDecoration(semanticElement));
-			}
-		}
-	}
-
-	protected Decoration createDecoration(final EObject semanticElement) {
-		final Decoration decoration = (Decoration) getDecoratorTarget()
-				.addShapeDecoration(getDecorationImage(semanticElement),
-						getDecoratorPosition(), -5, false);
-		renderToolTip(decoration, semanticElement);
-		decoration.addMouseListener(decorationMouseListener);
-		return decoration;
-	}
-
-	public EObject getSemanticElement() {
-		return (EObject) getDecoratorTarget().getAdapter(EObject.class);
-	}
-
-	protected void disposeDecoration() {
-		if (getDecoration() != null)
-			getDecoration().removeMouseListener(decorationMouseListener);
-		removeDecoration();
-	}
-
-	/**
-	 * TODO: move to UtilityClass
-	 * 
-	 * This method disposes the input image and returns a new Image.
-	 * 
-	 * @param image
-	 * @param width
-	 * @param height
-	 * @return
-	 */
-	protected Image resize(Image image, int width, int height) {
-		Image scaled = new Image(image.getDevice(), width, height);
-		GC gc = new GC(scaled);
-		gc.setAntialias(SWT.ON);
-		gc.setInterpolation(SWT.HIGH);
-		gc.drawImage(image, 0, 0, image.getBounds().width,
-				image.getBounds().height, 0, 0, width, height);
-		gc.dispose();
-		image.dispose();
-		return scaled;
-	}
-
-	protected void renderToolTip(final Decoration decoration,
-			final EObject semanticElement) {
-		decoration.addMouseMotionListener(new MouseMotionListener() {
-			public void mouseDragged(MouseEvent me) {
-			}
-
-			public void mouseEntered(MouseEvent me) {
-				IFigure toolTip = getToolTipFigure(semanticElement);
-				if (toolTip != null)
-					decoration.setToolTip(toolTip);
-
-			}
-
-			public void mouseExited(MouseEvent me) {
-			}
-
-			public void mouseHover(MouseEvent me) {
-			}
-
-			public void mouseMoved(MouseEvent me) {
-			}
-		});
-	}
-
-	protected void mousePressed(Decoration decoration, EObject element) {
-	}
-
-	protected void mouseReleased(Decoration decoration, EObject element) {
-	}
-
-	protected void mouseDoubleClicked(Decoration decoration, EObject element) {
-	}
-
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.decorators;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MouseEvent;
+import org.eclipse.draw2d.MouseListener;
+import org.eclipse.draw2d.MouseMotionListener;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.Decoration;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget.Direction;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * 
+ * @author terfloth - Initial contribution
+ * 
+ *         TODO: extract margin property
+ * 
+ */
+public abstract class InteractiveDecorator extends BaseDecorator {
+
+	protected MouseListener decorationMouseListener;
+
+	protected abstract IFigure getToolTipFigure(EObject element);
+
+	protected abstract Image getDecorationImage(EObject element);
+
+	protected abstract boolean shouldDecorate(EObject element);
+
+	public InteractiveDecorator(IDecoratorTarget decoratorTarget) {
+		super(decoratorTarget);
+
+		decorationMouseListener = new MouseListener() {
+			public void mousePressed(MouseEvent me) {
+				InteractiveDecorator.this.mousePressed(getDecoration(),
+						getSemanticElement());
+			}
+
+			public void mouseReleased(MouseEvent me) {
+				InteractiveDecorator.this.mouseReleased(getDecoration(),
+						getSemanticElement());
+			}
+
+			public void mouseDoubleClicked(MouseEvent me) {
+				InteractiveDecorator.this.mouseDoubleClicked(getDecoration(),
+						getSemanticElement());
+			}
+		};
+	}
+
+	protected abstract Direction getDecoratorPosition();
+
+	public void refresh() {
+		disposeDecoration();
+		if (getDecoratorTarget().getAdapter(EditPart.class) instanceof IPrimaryEditPart) {
+			final EObject semanticElement = getSemanticElement();
+			if (shouldDecorate(getSemanticElement())) {
+				setDecoration(createDecoration(semanticElement));
+			}
+		}
+	}
+
+	protected Decoration createDecoration(final EObject semanticElement) {
+		final Decoration decoration = (Decoration) getDecoratorTarget()
+				.addShapeDecoration(getDecorationImage(semanticElement),
+						getDecoratorPosition(), -5, false);
+		renderToolTip(decoration, semanticElement);
+		decoration.addMouseListener(decorationMouseListener);
+		return decoration;
+	}
+
+	public EObject getSemanticElement() {
+		return (EObject) getDecoratorTarget().getAdapter(EObject.class);
+	}
+
+	protected void disposeDecoration() {
+		if (getDecoration() != null)
+			getDecoration().removeMouseListener(decorationMouseListener);
+		removeDecoration();
+	}
+
+	/**
+	 * TODO: move to UtilityClass
+	 * 
+	 * This method disposes the input image and returns a new Image.
+	 * 
+	 * @param image
+	 * @param width
+	 * @param height
+	 * @return
+	 */
+	protected Image resize(Image image, int width, int height) {
+		Image scaled = new Image(image.getDevice(), width, height);
+		GC gc = new GC(scaled);
+		gc.setAntialias(SWT.ON);
+		gc.setInterpolation(SWT.HIGH);
+		gc.drawImage(image, 0, 0, image.getBounds().width,
+				image.getBounds().height, 0, 0, width, height);
+		gc.dispose();
+		image.dispose();
+		return scaled;
+	}
+
+	protected void renderToolTip(final Decoration decoration,
+			final EObject semanticElement) {
+		decoration.addMouseMotionListener(new MouseMotionListener() {
+			public void mouseDragged(MouseEvent me) {
+			}
+
+			public void mouseEntered(MouseEvent me) {
+				IFigure toolTip = getToolTipFigure(semanticElement);
+				if (toolTip != null)
+					decoration.setToolTip(toolTip);
+
+			}
+
+			public void mouseExited(MouseEvent me) {
+			}
+
+			public void mouseHover(MouseEvent me) {
+			}
+
+			public void mouseMoved(MouseEvent me) {
+			}
+		});
+	}
+
+	protected void mousePressed(Decoration decoration, EObject element) {
+	}
+
+	protected void mouseReleased(Decoration decoration, EObject element) {
+	}
+
+	protected void mouseDoubleClicked(Decoration decoration, EObject element) {
+	}
+
+}

+ 73 - 73
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/ControlEditPart.java

@@ -1,73 +1,73 @@
-/**
- * Copyright (c) 2013 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editparts;
-
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public abstract class ControlEditPart extends ShapeEditPart {
-
-	private ControlWrapper wrapper;
-
-	public abstract Control createControl(Composite parent);
-
-	public ControlEditPart(View view) {
-		super(view);
-	}
-
-	@Override
-	protected IFigure getLayer(Object layer) {
-		return super.getLayer(layer);
-	}
-
-	@Override
-	protected IFigure createFigure() {
-		Composite composite = (Composite) getViewer().getControl();
-		wrapper = new ControlWrapper(createControl(composite));
-		return wrapper;
-	}
-
-	public class ControlWrapper extends Figure {
-
-		private Control control;
-
-		public ControlWrapper(Control control) {
-			this.control = control;
-		}
-
-		public Dimension getPreferredSize(int wHint, int hHint) {
-			Point p = control.computeSize(wHint, hHint);
-			return new Dimension(p.x, p.y);
-		}
-
-		@Override
-		public void setBounds(Rectangle rect) {
-			super.setBounds(rect);
-			rect = rect.getCopy();
-			translateToAbsolute(rect);
-			control.setBounds(rect.x, rect.y, rect.width, rect.height);
-			super.setBounds(rect);
-		}
-	}
-
-}
+/**
+ * Copyright (c) 2013 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editparts;
+
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public abstract class ControlEditPart extends ShapeEditPart {
+
+	private ControlWrapper wrapper;
+
+	public abstract Control createControl(Composite parent);
+
+	public ControlEditPart(View view) {
+		super(view);
+	}
+
+	@Override
+	protected IFigure getLayer(Object layer) {
+		return super.getLayer(layer);
+	}
+
+	@Override
+	protected IFigure createFigure() {
+		Composite composite = (Composite) getViewer().getControl();
+		wrapper = new ControlWrapper(createControl(composite));
+		return wrapper;
+	}
+
+	public class ControlWrapper extends Figure {
+
+		private Control control;
+
+		public ControlWrapper(Control control) {
+			this.control = control;
+		}
+
+		public Dimension getPreferredSize(int wHint, int hHint) {
+			Point p = control.computeSize(wHint, hHint);
+			return new Dimension(p.x, p.y);
+		}
+
+		@Override
+		public void setBounds(Rectangle rect) {
+			super.setBounds(rect);
+			rect = rect.getCopy();
+			translateToAbsolute(rect);
+			control.setBounds(rect.x, rect.y, rect.width, rect.height);
+			super.setBounds(rect);
+		}
+	}
+
+}

+ 36 - 36
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/EllipseFixedSizeShapeNodeEditPart.java

@@ -1,36 +1,36 @@
-/**
- * Copyright (c) 2011 itemis AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- * 	itemis AG - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editparts;
-
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-import org.yakindu.base.gmf.runtime.figures.EllipseAnchorDefaultSizeNodeFigure;
-
-/**
- * 
- * @author andreas muelder (andreas.muelder@itemis.de)
- * 
- */
-public abstract class EllipseFixedSizeShapeNodeEditPart extends FixedSizeShapeNodeEditPart {
-
-	public EllipseFixedSizeShapeNodeEditPart(View view) {
-		super(view);
-	}
-
-	@Override
-	protected NodeFigure createNodeFigure() {
-		final NodeFigure figure = new EllipseAnchorDefaultSizeNodeFigure(getDefaultSize());
-		figure.setLayoutManager(getLayoutManager());
-		figure.add(createPrimaryShape());
-		return figure;
-	}
-}
+/**
+ * Copyright (c) 2011 itemis AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ * 	itemis AG - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editparts;
+
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.yakindu.base.gmf.runtime.figures.EllipseAnchorDefaultSizeNodeFigure;
+
+/**
+ * 
+ * @author andreas muelder (andreas.muelder@itemis.de)
+ * 
+ */
+public abstract class EllipseFixedSizeShapeNodeEditPart extends FixedSizeShapeNodeEditPart {
+
+	public EllipseFixedSizeShapeNodeEditPart(View view) {
+		super(view);
+	}
+
+	@Override
+	protected NodeFigure createNodeFigure() {
+		final NodeFigure figure = new EllipseAnchorDefaultSizeNodeFigure(getDefaultSize());
+		figure.setLayoutManager(getLayoutManager());
+		figure.add(createPrimaryShape());
+		return figure;
+	}
+}

+ 60 - 60
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/FixedSizeShapeNodeEditPart.java

@@ -1,60 +1,60 @@
-/**
- * Copyright (c) 2011 itemis AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- * 	itemis AG - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editparts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LayoutManager;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * EditPart for Shapes that should not be resized.
- * 
- * @author andreas muelder (andreas.muelder@itemis.de)
- * 
- */
-public abstract class FixedSizeShapeNodeEditPart extends ShapeNodeEditPart {
-
-	public FixedSizeShapeNodeEditPart(final View view) {
-		super(view);
-	}
-
-	public abstract Dimension getDefaultSize();
-
-	public abstract IFigure createPrimaryShape();
-
-	@Override
-	protected NodeFigure createNodeFigure() {
-		final NodeFigure figure = new DefaultSizeNodeFigure(getDefaultSize());
-		figure.setLayoutManager(getLayoutManager());
-		figure.add(createPrimaryShape());
-		return figure;
-	}
-
-	protected LayoutManager getLayoutManager() {
-		return new StackLayout();
-	}
-
-	@Override
-	protected void createDefaultEditPolicies() {
-		super.createDefaultEditPolicies();
-		installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
-				new NonResizableEditPolicyEx());
-	}
-
-}
+/**
+ * Copyright (c) 2011 itemis AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ * 	itemis AG - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editparts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LayoutManager;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * EditPart for Shapes that should not be resized.
+ * 
+ * @author andreas muelder (andreas.muelder@itemis.de)
+ * 
+ */
+public abstract class FixedSizeShapeNodeEditPart extends ShapeNodeEditPart {
+
+	public FixedSizeShapeNodeEditPart(final View view) {
+		super(view);
+	}
+
+	public abstract Dimension getDefaultSize();
+
+	public abstract IFigure createPrimaryShape();
+
+	@Override
+	protected NodeFigure createNodeFigure() {
+		final NodeFigure figure = new DefaultSizeNodeFigure(getDefaultSize());
+		figure.setLayoutManager(getLayoutManager());
+		figure.add(createPrimaryShape());
+		return figure;
+	}
+
+	protected LayoutManager getLayoutManager() {
+		return new StackLayout();
+	}
+
+	@Override
+	protected void createDefaultEditPolicies() {
+		super.createDefaultEditPolicies();
+		installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
+				new NonResizableEditPolicyEx());
+	}
+
+}

+ 198 - 198
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/TextAwareExternalLabelEditPart.java

@@ -1,198 +1,198 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editparts;
-
-import static org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-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.ParserOptions;
-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.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.label.ILabelDelegate;
-import org.eclipse.gmf.runtime.diagram.ui.label.WrappingLabelDelegate;
-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.notation.ShapeStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.swt.graphics.Color;
-import org.yakindu.base.gmf.runtime.parsers.StringAttributeParser;
-import org.yakindu.base.xtext.utils.gmf.figures.HighlightingWrappingLabel;
-
-/**
- * This is a common abstract base class for all {@link LabelEditPart} which are
- * {@link ITextAwareEditPart}.
- * 
- * This edit part is only to be used for external labels, i.e. Connection
- * labels. For Labels inside of a Figure use {@link TextAwareLabelEditPart}
- * 
- * @author andreas muelder
- * 
- */
-public abstract class TextAwareExternalLabelEditPart extends LabelEditPart
-		implements ITextAwareEditPart {
-
-	private final DirectEditManager manager;
-
-	private final EAttribute feature;
-
-	private final String pluginId;
-
-	public TextAwareExternalLabelEditPart(View view, EAttribute feature,
-			String pluginId) {
-		super(view);
-		this.feature = feature;
-		this.pluginId = pluginId;
-		manager = createDirectEditManager();
-	}
-
-	private void updateLabelText() {
-		getWrappingLabel().setText(getEditText());
-	}
-
-	@Override
-	public void activate() {
-		super.activate();
-		updateLabelText();
-	}
-
-	protected DirectEditManager createDirectEditManager() {
-		return new TextDirectEditManager(this);
-	}
-
-	@Override
-	public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
-		if (key.equals(ILabelDelegate.class)) {
-			WrappingLabel wrappingLabel = getWrappingLabel();
-			if (wrappingLabel == null)
-				return super.getAdapter(key);
-			return new WrappingLabelDelegate(wrappingLabel);
-		}
-		return super.getAdapter(key);
-	}
-
-	@Override
-	protected void createDefaultEditPolicies() {
-		super.createDefaultEditPolicies();
-		installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
-				new LabelDirectEditPolicy());
-		// TODO: Add a Feedback role
-	}
-
-	@Override
-	protected void refreshVisuals() {
-		super.refreshVisuals();
-		refreshFont();
-		refreshFontColor();
-	}
-
-	@Override
-	protected void setFontColor(Color color) {
-		getWrappingLabel().setForegroundColor(color);
-	}
-
-	public String getEditText() {
-		return getParser().getEditString(
-				new EObjectAdapter(resolveSemanticElement()), -1);
-	}
-
-	public void setLabelText(String text) {
-		getWrappingLabel().setText(text);
-
-	}
-
-	private WrappingLabel getWrappingLabel() {
-		return (WrappingLabel) getFigure();
-	}
-
-	@Override
-	protected IFigure createFigure() {
-		return new HighlightingWrappingLabel();
-	}
-
-	public ICellEditorValidator getEditTextValidator() {
-		return null;
-	}
-
-	public ParserOptions getParserOptions() {
-		return ParserOptions.NONE;
-	}
-
-	public IParser getParser() {
-		return new StringAttributeParser(feature, pluginId);
-	}
-
-	public IContentAssistProcessor getCompletionProcessor() {
-		return null;
-	}
-
-	@Override
-	protected void performDirectEditRequest(Request request) {
-		final Request theRequest = request;
-		try {
-			getEditingDomain().runExclusive(new Runnable() {
-
-				public void run() {
-					if (isActive()) {
-						if (theRequest.getExtendedData().get(
-								REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character
-								&& manager instanceof TextDirectEditManager) {
-							Character initialChar = (Character) theRequest
-									.getExtendedData()
-									.get(REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
-
-							((TextDirectEditManager) manager).show(initialChar);
-
-						} else {
-							manager.show();
-						}
-					}
-				}
-			});
-		} catch (InterruptedException e) {
-			e.printStackTrace();
-		}
-	}
-
-	// We want to get notified about changes to the primary view, the refresh
-	// the visuals when the parent Shape style changes.
-	@Override
-	protected void addNotationalListeners() {
-		super.addNotationalListeners();
-		addListenerFilter("parentview", this, getPrimaryView());
-	}
-
-	@Override
-	protected void removeNotationalListeners() {
-		super.removeNotationalListeners();
-		removeListenerFilter("parentview");
-	}
-
-	@Override
-	protected void handleNotificationEvent(Notification event) {
-		if (event.getFeature() == feature) {
-			updateLabelText();
-		}
-		if (event.getNotifier() instanceof ShapeStyle) {
-			refreshVisuals();
-		}
-		super.handleNotificationEvent(event);
-	}
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editparts;
+
+import static org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+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.ParserOptions;
+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.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.label.ILabelDelegate;
+import org.eclipse.gmf.runtime.diagram.ui.label.WrappingLabelDelegate;
+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.notation.ShapeStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.graphics.Color;
+import org.yakindu.base.gmf.runtime.parsers.StringAttributeParser;
+import org.yakindu.base.xtext.utils.gmf.figures.HighlightingWrappingLabel;
+
+/**
+ * This is a common abstract base class for all {@link LabelEditPart} which are
+ * {@link ITextAwareEditPart}.
+ * 
+ * This edit part is only to be used for external labels, i.e. Connection
+ * labels. For Labels inside of a Figure use {@link TextAwareLabelEditPart}
+ * 
+ * @author andreas muelder
+ * 
+ */
+public abstract class TextAwareExternalLabelEditPart extends LabelEditPart
+		implements ITextAwareEditPart {
+
+	private final DirectEditManager manager;
+
+	private final EAttribute feature;
+
+	private final String pluginId;
+
+	public TextAwareExternalLabelEditPart(View view, EAttribute feature,
+			String pluginId) {
+		super(view);
+		this.feature = feature;
+		this.pluginId = pluginId;
+		manager = createDirectEditManager();
+	}
+
+	private void updateLabelText() {
+		getWrappingLabel().setText(getEditText());
+	}
+
+	@Override
+	public void activate() {
+		super.activate();
+		updateLabelText();
+	}
+
+	protected DirectEditManager createDirectEditManager() {
+		return new TextDirectEditManager(this);
+	}
+
+	@Override
+	public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
+		if (key.equals(ILabelDelegate.class)) {
+			WrappingLabel wrappingLabel = getWrappingLabel();
+			if (wrappingLabel == null)
+				return super.getAdapter(key);
+			return new WrappingLabelDelegate(wrappingLabel);
+		}
+		return super.getAdapter(key);
+	}
+
+	@Override
+	protected void createDefaultEditPolicies() {
+		super.createDefaultEditPolicies();
+		installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
+				new LabelDirectEditPolicy());
+		// TODO: Add a Feedback role
+	}
+
+	@Override
+	protected void refreshVisuals() {
+		super.refreshVisuals();
+		refreshFont();
+		refreshFontColor();
+	}
+
+	@Override
+	protected void setFontColor(Color color) {
+		getWrappingLabel().setForegroundColor(color);
+	}
+
+	public String getEditText() {
+		return getParser().getEditString(
+				new EObjectAdapter(resolveSemanticElement()), -1);
+	}
+
+	public void setLabelText(String text) {
+		getWrappingLabel().setText(text);
+
+	}
+
+	private WrappingLabel getWrappingLabel() {
+		return (WrappingLabel) getFigure();
+	}
+
+	@Override
+	protected IFigure createFigure() {
+		return new HighlightingWrappingLabel();
+	}
+
+	public ICellEditorValidator getEditTextValidator() {
+		return null;
+	}
+
+	public ParserOptions getParserOptions() {
+		return ParserOptions.NONE;
+	}
+
+	public IParser getParser() {
+		return new StringAttributeParser(feature, pluginId);
+	}
+
+	public IContentAssistProcessor getCompletionProcessor() {
+		return null;
+	}
+
+	@Override
+	protected void performDirectEditRequest(Request request) {
+		final Request theRequest = request;
+		try {
+			getEditingDomain().runExclusive(new Runnable() {
+
+				public void run() {
+					if (isActive()) {
+						if (theRequest.getExtendedData().get(
+								REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character
+								&& manager instanceof TextDirectEditManager) {
+							Character initialChar = (Character) theRequest
+									.getExtendedData()
+									.get(REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+
+							((TextDirectEditManager) manager).show(initialChar);
+
+						} else {
+							manager.show();
+						}
+					}
+				}
+			});
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+	}
+
+	// We want to get notified about changes to the primary view, the refresh
+	// the visuals when the parent Shape style changes.
+	@Override
+	protected void addNotationalListeners() {
+		super.addNotationalListeners();
+		addListenerFilter("parentview", this, getPrimaryView());
+	}
+
+	@Override
+	protected void removeNotationalListeners() {
+		super.removeNotationalListeners();
+		removeListenerFilter("parentview");
+	}
+
+	@Override
+	protected void handleNotificationEvent(Notification event) {
+		if (event.getFeature() == feature) {
+			updateLabelText();
+		}
+		if (event.getNotifier() instanceof ShapeStyle) {
+			refreshVisuals();
+		}
+		super.handleNotificationEvent(event);
+	}
+}

+ 217 - 217
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editparts/TextAwareLabelEditPart.java

@@ -1,217 +1,217 @@
-/**
- * Copyright (c) 2010 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editparts;
-
-import static org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.gef.DragTracker;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-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.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-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.label.ILabelDelegate;
-import org.eclipse.gmf.runtime.diagram.ui.label.WrappingLabelDelegate;
-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.notation.ShapeStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.swt.graphics.Color;
-import org.yakindu.base.gmf.runtime.parsers.StringAttributeParser;
-import org.yakindu.base.xtext.utils.gmf.directedit.DoubleClickDirectEditDragTracker;
-import org.yakindu.base.xtext.utils.gmf.directedit.DoubleClickDirectEditDragTracker.IDoubleClickCallback;
-import org.yakindu.base.xtext.utils.gmf.figures.HighlightingWrappingLabel;
-
-/**
- * This is a common abstract base class for all Label which are
- * {@link ITextAwareEditPart}.
- * 
- * * This edit part is only to be used for labels inside a figure! for external
- * labels, use {@link TextAwareExternalLabelEditPart}
- * 
- * 
- * @author andreas muelder
- * 
- */
-public abstract class TextAwareLabelEditPart extends CompartmentEditPart
-		implements ITextAwareEditPart {
-
-	private final DirectEditManager manager;
-
-	protected final EAttribute feature;
-
-	protected final String pluginId;
-
-	public TextAwareLabelEditPart(View view, EAttribute feature, String pluginId) {
-		super(view);
-		this.feature = feature;
-		this.pluginId = pluginId;
-		manager = createDirectEditManager();
-	}
-
-	protected void updateLabelText() {
-		getWrappingLabel().setText(getEditText());
-	}
-
-	@Override
-	public void activate() {
-		super.activate();
-		updateLabelText();
-	}
-
-	protected DirectEditManager createDirectEditManager() {
-		return new TextDirectEditManager(this);
-	}
-
-	@Override
-	public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
-		if (key.equals(ILabelDelegate.class)) {
-			WrappingLabel wrappingLabel = getWrappingLabel();
-			if (wrappingLabel == null)
-				return super.getAdapter(key);
-			return new WrappingLabelDelegate(wrappingLabel);
-		}
-		return super.getAdapter(key);
-	}
-
-	@Override
-	protected void createDefaultEditPolicies() {
-		super.createDefaultEditPolicies();
-		installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
-				new LabelDirectEditPolicy());
-		// TODO: Add a Feedback role
-	}
-
-	@Override
-	protected void refreshVisuals() {
-		super.refreshVisuals();
-		refreshFont();
-		refreshFontColor();
-	}
-
-	@Override
-	protected void setFontColor(Color color) {
-		getWrappingLabel().setForegroundColor(color);
-	}
-
-	public String getEditText() {
-		return getParser().getEditString(
-				new EObjectAdapter(resolveSemanticElement()), -1);
-	}
-
-	public void setLabelText(String text) {
-		updateLabelText();
-	}
-
-	protected WrappingLabel getWrappingLabel() {
-		return (WrappingLabel) getFigure();
-	}
-
-	@Override
-	protected IFigure createFigure() {
-		return new HighlightingWrappingLabel();
-	}
-
-	public ICellEditorValidator getEditTextValidator() {
-		return null;
-	}
-
-	public ParserOptions getParserOptions() {
-		return ParserOptions.NONE;
-	}
-
-	public IParser getParser() {
-		return new StringAttributeParser(feature, pluginId);
-	}
-
-	public IContentAssistProcessor getCompletionProcessor() {
-		return null;
-	}
-	/**
-	 * Performs direct edit on double click
-	 */
-	@Override
-	public DragTracker getDragTracker(final Request request) {
-		if (request instanceof SelectionRequest
-				&& ((SelectionRequest) request).getLastButtonPressed() == 3)
-			return null;
-		IDoubleClickCallback callback = new IDoubleClickCallback() {
-			public void handleDoubleClick(int btn) {
-				performDirectEditRequest(request);
-			}
-		};
-		return new DoubleClickDirectEditDragTracker(this,
-				getTopGraphicEditPart(), callback);
-	}
-
-	@Override
-	protected void performDirectEditRequest(Request request) {
-		final Request theRequest = request;
-		try {
-			getEditingDomain().runExclusive(new Runnable() {
-
-				public void run() {
-					if (isActive()) {
-						if (theRequest.getExtendedData().get(
-								REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character
-								&& manager instanceof TextDirectEditManager) {
-							Character initialChar = (Character) theRequest
-									.getExtendedData()
-									.get(REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
-
-							((TextDirectEditManager) manager).show(initialChar);
-
-						} else {
-							manager.show();
-						}
-					}
-				}
-			});
-		} catch (InterruptedException e) {
-			e.printStackTrace();
-		}
-	}
-
-	// We want to get notified about changes to the primary view, the refresh
-	// the visuals when the parent Shape style changes.
-	@Override
-	protected void addNotationalListeners() {
-		super.addNotationalListeners();
-		addListenerFilter("parentview", this, getPrimaryView());
-	}
-
-	@Override
-	protected void removeNotationalListeners() {
-		super.removeNotationalListeners();
-		removeListenerFilter("parentview");
-	}
-
-	@Override
-	protected void handleNotificationEvent(Notification event) {
-		if (event.getFeature() == feature) {
-			updateLabelText();
-		}
-		if (event.getNotifier() instanceof ShapeStyle) {
-			refreshVisuals();
-		}
-		super.handleNotificationEvent(event);
-	}
-}
+/**
+ * Copyright (c) 2010 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editparts;
+
+import static org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+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.label.ILabelDelegate;
+import org.eclipse.gmf.runtime.diagram.ui.label.WrappingLabelDelegate;
+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.notation.ShapeStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.swt.graphics.Color;
+import org.yakindu.base.gmf.runtime.parsers.StringAttributeParser;
+import org.yakindu.base.xtext.utils.gmf.directedit.DoubleClickDirectEditDragTracker;
+import org.yakindu.base.xtext.utils.gmf.directedit.DoubleClickDirectEditDragTracker.IDoubleClickCallback;
+import org.yakindu.base.xtext.utils.gmf.figures.HighlightingWrappingLabel;
+
+/**
+ * This is a common abstract base class for all Label which are
+ * {@link ITextAwareEditPart}.
+ * 
+ * * This edit part is only to be used for labels inside a figure! for external
+ * labels, use {@link TextAwareExternalLabelEditPart}
+ * 
+ * 
+ * @author andreas muelder
+ * 
+ */
+public abstract class TextAwareLabelEditPart extends CompartmentEditPart
+		implements ITextAwareEditPart {
+
+	private final DirectEditManager manager;
+
+	protected final EAttribute feature;
+
+	protected final String pluginId;
+
+	public TextAwareLabelEditPart(View view, EAttribute feature, String pluginId) {
+		super(view);
+		this.feature = feature;
+		this.pluginId = pluginId;
+		manager = createDirectEditManager();
+	}
+
+	protected void updateLabelText() {
+		getWrappingLabel().setText(getEditText());
+	}
+
+	@Override
+	public void activate() {
+		super.activate();
+		updateLabelText();
+	}
+
+	protected DirectEditManager createDirectEditManager() {
+		return new TextDirectEditManager(this);
+	}
+
+	@Override
+	public Object getAdapter(@SuppressWarnings("rawtypes") Class key) {
+		if (key.equals(ILabelDelegate.class)) {
+			WrappingLabel wrappingLabel = getWrappingLabel();
+			if (wrappingLabel == null)
+				return super.getAdapter(key);
+			return new WrappingLabelDelegate(wrappingLabel);
+		}
+		return super.getAdapter(key);
+	}
+
+	@Override
+	protected void createDefaultEditPolicies() {
+		super.createDefaultEditPolicies();
+		installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
+				new LabelDirectEditPolicy());
+		// TODO: Add a Feedback role
+	}
+
+	@Override
+	protected void refreshVisuals() {
+		super.refreshVisuals();
+		refreshFont();
+		refreshFontColor();
+	}
+
+	@Override
+	protected void setFontColor(Color color) {
+		getWrappingLabel().setForegroundColor(color);
+	}
+
+	public String getEditText() {
+		return getParser().getEditString(
+				new EObjectAdapter(resolveSemanticElement()), -1);
+	}
+
+	public void setLabelText(String text) {
+		updateLabelText();
+	}
+
+	protected WrappingLabel getWrappingLabel() {
+		return (WrappingLabel) getFigure();
+	}
+
+	@Override
+	protected IFigure createFigure() {
+		return new HighlightingWrappingLabel();
+	}
+
+	public ICellEditorValidator getEditTextValidator() {
+		return null;
+	}
+
+	public ParserOptions getParserOptions() {
+		return ParserOptions.NONE;
+	}
+
+	public IParser getParser() {
+		return new StringAttributeParser(feature, pluginId);
+	}
+
+	public IContentAssistProcessor getCompletionProcessor() {
+		return null;
+	}
+	/**
+	 * Performs direct edit on double click
+	 */
+	@Override
+	public DragTracker getDragTracker(final Request request) {
+		if (request instanceof SelectionRequest
+				&& ((SelectionRequest) request).getLastButtonPressed() == 3)
+			return null;
+		IDoubleClickCallback callback = new IDoubleClickCallback() {
+			public void handleDoubleClick(int btn) {
+				performDirectEditRequest(request);
+			}
+		};
+		return new DoubleClickDirectEditDragTracker(this,
+				getTopGraphicEditPart(), callback);
+	}
+
+	@Override
+	protected void performDirectEditRequest(Request request) {
+		final Request theRequest = request;
+		try {
+			getEditingDomain().runExclusive(new Runnable() {
+
+				public void run() {
+					if (isActive()) {
+						if (theRequest.getExtendedData().get(
+								REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character
+								&& manager instanceof TextDirectEditManager) {
+							Character initialChar = (Character) theRequest
+									.getExtendedData()
+									.get(REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+
+							((TextDirectEditManager) manager).show(initialChar);
+
+						} else {
+							manager.show();
+						}
+					}
+				}
+			});
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+	}
+
+	// We want to get notified about changes to the primary view, the refresh
+	// the visuals when the parent Shape style changes.
+	@Override
+	protected void addNotationalListeners() {
+		super.addNotationalListeners();
+		addListenerFilter("parentview", this, getPrimaryView());
+	}
+
+	@Override
+	protected void removeNotationalListeners() {
+		super.removeNotationalListeners();
+		removeListenerFilter("parentview");
+	}
+
+	@Override
+	protected void handleNotificationEvent(Notification event) {
+		if (event.getFeature() == feature) {
+			updateLabelText();
+		}
+		if (event.getNotifier() instanceof ShapeStyle) {
+			refreshVisuals();
+		}
+		super.handleNotificationEvent(event);
+	}
+}

+ 124 - 124
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editpolicies/BarResizeEditPolicy.java

@@ -1,124 +1,124 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editpolicies;
-
-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.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
-
-/**
- * resize edit policy for fixed width or height.
- * 
- * @author benjamin.schwertfeger@itemis.de
- * 
- */
-public class BarResizeEditPolicy extends ResizableEditPolicyEx {
-
-	private final int thickness;
-
-	/**
-	 * Default thickness of 8.
-	 */
-	public BarResizeEditPolicy() {
-		thickness = 8;
-	}
-
-	public BarResizeEditPolicy(int thickness) {
-		this.thickness = thickness;
-	}
-
-	@Override
-	protected void showChangeBoundsFeedback(final ChangeBoundsRequest request) {
-		final IFigure feedback = getDragSourceFeedbackFigure();
-
-		final PrecisionRectangle rect = new PrecisionRectangle(
-				getInitialFeedbackBounds().getCopy());
-		getHostFigure().translateToAbsolute(rect);
-		rect.translate(request.getMoveDelta());
-		rect.resize(request.getSizeDelta());
-		// the unchanged value can be set to zero, because
-		// the size will be recalculated later
-		checkAndPrepareConstraint(request, rect);
-
-		feedback.translateToRelative(rect);
-		feedback.setBounds(rect);
-	}
-
-	@Override
-	protected Command getResizeCommand(final ChangeBoundsRequest request) {
-		GraphicalEditPart editPart = (IGraphicalEditPart) getHost();
-		Rectangle locationAndSize = new PrecisionRectangle(editPart.getFigure()
-				.getBounds());
-		editPart.getFigure().translateToAbsolute(locationAndSize);
-
-		final Rectangle origRequestedBounds = request
-				.getTransformedRectangle(locationAndSize);
-		final Rectangle modified = origRequestedBounds.getCopy();
-		checkAndPrepareConstraint(request, modified);
-		// final Dimension sizeDelta = request.getSizeDelta();
-
-		Dimension newDelta = new Dimension(modified.width
-				- locationAndSize.width, modified.height
-				- locationAndSize.height);
-		// ((IGraphicalEditPart) getHost()).getFigure()
-		// .translateToAbsolute(newDelta);
-		request.setSizeDelta(newDelta);
-		final Point moveDelta = request.getMoveDelta();
-		request.setMoveDelta(new Point(moveDelta.x - origRequestedBounds.x
-				+ modified.x, moveDelta.y - origRequestedBounds.y + modified.y));
-		return super.getResizeCommand(request);
-	}
-
-	/**
-	 * Modifies the rectangle dependant of the given request and the compartment
-	 * which is a child of this host.
-	 * 
-	 * @param request
-	 * @param rect
-	 * @param c
-	 */
-	private void checkAndPrepareConstraint(final ChangeBoundsRequest request,
-			final Rectangle rect) {
-		GraphicalEditPart editPart = null;
-		for (Object ep : request.getEditParts()) {
-			if (editPart == null && ep instanceof GraphicalEditPart) {
-				editPart = (GraphicalEditPart) ep;
-				editPart.getFigure().translateToRelative(rect);
-			}
-		}
-
-		if (rect.width / rect.height < 1) {
-			if ((request.getResizeDirection() & PositionConstants.WEST) != 0) {
-				rect.x += rect.width - thickness;
-			}
-			rect.width = thickness;
-		} else {
-			if ((request.getResizeDirection() & PositionConstants.NORTH) != 0) {
-				rect.y += rect.height - thickness;
-			}
-			rect.height = thickness;
-		}
-
-		if (editPart != null) {
-			editPart.getFigure().translateToAbsolute(rect);
-		}
-		// rect.setSize(size);
-	}
-
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editpolicies;
+
+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.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
+
+/**
+ * resize edit policy for fixed width or height.
+ * 
+ * @author benjamin.schwertfeger@itemis.de
+ * 
+ */
+public class BarResizeEditPolicy extends ResizableEditPolicyEx {
+
+	private final int thickness;
+
+	/**
+	 * Default thickness of 8.
+	 */
+	public BarResizeEditPolicy() {
+		thickness = 8;
+	}
+
+	public BarResizeEditPolicy(int thickness) {
+		this.thickness = thickness;
+	}
+
+	@Override
+	protected void showChangeBoundsFeedback(final ChangeBoundsRequest request) {
+		final IFigure feedback = getDragSourceFeedbackFigure();
+
+		final PrecisionRectangle rect = new PrecisionRectangle(
+				getInitialFeedbackBounds().getCopy());
+		getHostFigure().translateToAbsolute(rect);
+		rect.translate(request.getMoveDelta());
+		rect.resize(request.getSizeDelta());
+		// the unchanged value can be set to zero, because
+		// the size will be recalculated later
+		checkAndPrepareConstraint(request, rect);
+
+		feedback.translateToRelative(rect);
+		feedback.setBounds(rect);
+	}
+
+	@Override
+	protected Command getResizeCommand(final ChangeBoundsRequest request) {
+		GraphicalEditPart editPart = (IGraphicalEditPart) getHost();
+		Rectangle locationAndSize = new PrecisionRectangle(editPart.getFigure()
+				.getBounds());
+		editPart.getFigure().translateToAbsolute(locationAndSize);
+
+		final Rectangle origRequestedBounds = request
+				.getTransformedRectangle(locationAndSize);
+		final Rectangle modified = origRequestedBounds.getCopy();
+		checkAndPrepareConstraint(request, modified);
+		// final Dimension sizeDelta = request.getSizeDelta();
+
+		Dimension newDelta = new Dimension(modified.width
+				- locationAndSize.width, modified.height
+				- locationAndSize.height);
+		// ((IGraphicalEditPart) getHost()).getFigure()
+		// .translateToAbsolute(newDelta);
+		request.setSizeDelta(newDelta);
+		final Point moveDelta = request.getMoveDelta();
+		request.setMoveDelta(new Point(moveDelta.x - origRequestedBounds.x
+				+ modified.x, moveDelta.y - origRequestedBounds.y + modified.y));
+		return super.getResizeCommand(request);
+	}
+
+	/**
+	 * Modifies the rectangle dependant of the given request and the compartment
+	 * which is a child of this host.
+	 * 
+	 * @param request
+	 * @param rect
+	 * @param c
+	 */
+	private void checkAndPrepareConstraint(final ChangeBoundsRequest request,
+			final Rectangle rect) {
+		GraphicalEditPart editPart = null;
+		for (Object ep : request.getEditParts()) {
+			if (editPart == null && ep instanceof GraphicalEditPart) {
+				editPart = (GraphicalEditPart) ep;
+				editPart.getFigure().translateToRelative(rect);
+			}
+		}
+
+		if (rect.width / rect.height < 1) {
+			if ((request.getResizeDirection() & PositionConstants.WEST) != 0) {
+				rect.x += rect.width - thickness;
+			}
+			rect.width = thickness;
+		} else {
+			if ((request.getResizeDirection() & PositionConstants.NORTH) != 0) {
+				rect.y += rect.height - thickness;
+			}
+			rect.height = thickness;
+		}
+
+		if (editPart != null) {
+			editPart.getFigure().translateToAbsolute(rect);
+		}
+		// rect.setSize(size);
+	}
+
+}

+ 228 - 228
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editpolicies/CompartmentLayoutEditPolicy.java

@@ -1,229 +1,229 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editpolicies;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.OrderedLayout;
-import org.eclipse.emf.common.util.AbstractEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-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.requests.CreateRequest;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.commands.AddCommand;
-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.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.commands.RepositionEObjectCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.yakindu.base.gmf.runtime.commands.CompartmentChildCreateCommand;
-import org.yakindu.base.gmf.runtime.commands.CompartmentRepositionEObjectCommand;
-
-/**
- * @see http://wiki.eclipse.org/GMF/Recipes
- * 
- */
-public class CompartmentLayoutEditPolicy extends
-		org.eclipse.gef.editpolicies.FlowLayoutEditPolicy {
-
-	private EStructuralFeature feature = null;
-
-	public static enum RequestParameterKeys {
-		RegionFeedbackIndex
-	}
-
-	/**
-	 * Internal command which validates if a view is already a child of parent
-	 * and moving it to prefered index instead of adding it twice (What leads to
-	 * an exception see {@link AbstractEList#add(int index, E object)}).
-	 * 
-	 * @author markus muehlbrandt
-	 * 
-	 */
-	private class CompartmentAddCommand extends AddCommand {
-
-		private IAdaptable parent;
-		private IAdaptable child;
-		private int index;
-
-		public CompartmentAddCommand(TransactionalEditingDomain editingDomain,
-				IAdaptable parent, IAdaptable child, int index) {
-			super(editingDomain, parent, child, index);
-			assert null != parent : "Null parent in CompartmentAddCommand";//$NON-NLS-1$
-			assert null != child : "Null child in CompartmentAddCommand";//$NON-NLS-1$		
-			this.parent = parent;
-			this.child = child;
-			this.index = index;
-		}
-
-		@SuppressWarnings("unchecked")
-		@Override
-		protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-				IAdaptable info) throws ExecutionException {
-
-			View childView = (View) child.getAdapter(View.class);
-			View parentView = (View) parent.getAdapter(View.class);
-
-			if (parentView.getPersistedChildren().contains(childView)
-					&& index != ViewUtil.APPEND) {
-				parentView.getPersistedChildren().move(index, childView);
-			} else if (index == ViewUtil.APPEND) {
-				parentView.insertChild(childView);
-			} else {
-				parentView.insertChildAt(childView, index);
-			}
-			return CommandResult.newOKCommandResult();
-		}
-	}
-
-	/**
-	 * @param feature
-	 *            has to be an EList
-	 */
-	public CompartmentLayoutEditPolicy(EStructuralFeature feature) {
-		super();
-		this.feature = feature;
-	}
-
-	@Override
-	protected Command createAddCommand(EditPart child, EditPart after) {
-		int index = getHost().getChildren().indexOf(after);
-		TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
-				.getEditingDomain();
-		AddCommand command = new CompartmentAddCommand(editingDomain,
-				new EObjectAdapter((View) getHost().getModel()),
-				new EObjectAdapter((View) child.getModel()), index);
-		return new ICommandProxy(command);
-	}
-
-	@Override
-	protected EditPolicy createChildEditPolicy(EditPart child) {
-		ResizableEditPolicyEx policy = new ResizableEditPolicyEx();
-		policy.setResizeDirections(0);
-		return policy;
-	}
-
-	@Override
-	@SuppressWarnings("rawtypes")
-	protected Command createMoveChildCommand(EditPart child, EditPart after) {
-
-		int newIndex;
-		int displacement;
-
-		int childIndex = getHost().getChildren().indexOf(child);
-		int afterIndex = getHost().getChildren().indexOf(after);
-
-		if (afterIndex == -1) {
-			newIndex = getHost().getChildren().size() - 1;
-			displacement = newIndex - childIndex;
-		} else {
-			newIndex = afterIndex;
-			displacement = afterIndex - childIndex;
-			if (childIndex <= afterIndex) {
-				newIndex--;
-				displacement--;
-			}
-		}
-
-		TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
-				.getEditingDomain();
-
-		RepositionEObjectCommand command = new CompartmentRepositionEObjectCommand(
-				child, editingDomain, "", (EList) ((View) child.getParent()
-						.getModel()).getElement().eGet(feature),
-				((View) child.getModel()).getElement(), displacement, newIndex);
-
-		eraseLayoutTargetFeedback(null);
-
-		return new ICommandProxy(command);
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	protected Command getCreateCommand(CreateRequest request) {
-		if (request instanceof CreateViewAndElementRequest) {
-
-			TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
-					.getEditingDomain();
-			CompositeTransactionalCommand cc = new CompositeTransactionalCommand(
-					editingDomain, DiagramUIMessages.AddCommand_Label);
-
-			Iterator<?> descriptors = ((CreateViewRequest) request)
-					.getViewDescriptors().iterator();
-
-			while (descriptors.hasNext()) {
-				CreateViewRequest.ViewDescriptor descriptor = (CreateViewRequest.ViewDescriptor) descriptors
-						.next();
-
-				int feedBackIndex = getFeedbackIndexFor(request);
-
-				// obtain CreateElementRequest and add initial region feedback
-				// index to request map. This index is needed to add the
-				// semantic element at the correct listIndex
-				CreateElementRequest createElementRequest = (CreateElementRequest) ((CreateViewAndElementRequest) request)
-						.getViewAndElementDescriptor()
-						.getCreateElementRequestAdapter()
-						.getAdapter(CreateElementRequest.class);
-
-				if (createElementRequest != null) {
-					createElementRequest.getParameters().put(
-							RequestParameterKeys.RegionFeedbackIndex,
-							feedBackIndex);
-				}
-
-				CreateCommand createCommand = new CompartmentChildCreateCommand(
-						editingDomain, descriptor,
-						(View) (getHost().getModel()), feedBackIndex);
-
-				cc.compose(createCommand);
-			}
-			return new ICommandProxy(cc.reduce());
-		}
-
-		return null;
-	}
-
-	@Override
-	protected boolean isHorizontal() {
-		IFigure figure = ((IGraphicalEditPart) getHost()).getContentPane();
-		if (figure.getLayoutManager() instanceof OrderedLayout) {
-			return ((OrderedLayout) figure.getLayoutManager()).isHorizontal();
-		}
-		return true;
-	}
-
-	@Override
-	protected Command getDeleteDependantCommand(Request request) {
-		return null;
-	}
-
-	@Override
-	protected Command getOrphanChildrenCommand(Request request) {
-		return null;
-	}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editpolicies;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.OrderedLayout;
+import org.eclipse.emf.common.util.AbstractEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+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.requests.CreateRequest;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.commands.AddCommand;
+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.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableEditPolicyEx;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.commands.RepositionEObjectCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.yakindu.base.gmf.runtime.commands.CompartmentChildCreateCommand;
+import org.yakindu.base.gmf.runtime.commands.CompartmentRepositionEObjectCommand;
+
+/**
+ * @see http://wiki.eclipse.org/GMF/Recipes
+ * 
+ */
+public class CompartmentLayoutEditPolicy extends
+		org.eclipse.gef.editpolicies.FlowLayoutEditPolicy {
+
+	private EStructuralFeature feature = null;
+
+	public static enum RequestParameterKeys {
+		RegionFeedbackIndex
+	}
+
+	/**
+	 * Internal command which validates if a view is already a child of parent
+	 * and moving it to prefered index instead of adding it twice (What leads to
+	 * an exception see {@link AbstractEList#add(int index, E object)}).
+	 * 
+	 * @author markus muehlbrandt
+	 * 
+	 */
+	private class CompartmentAddCommand extends AddCommand {
+
+		private IAdaptable parent;
+		private IAdaptable child;
+		private int index;
+
+		public CompartmentAddCommand(TransactionalEditingDomain editingDomain,
+				IAdaptable parent, IAdaptable child, int index) {
+			super(editingDomain, parent, child, index);
+			assert null != parent : "Null parent in CompartmentAddCommand";//$NON-NLS-1$
+			assert null != child : "Null child in CompartmentAddCommand";//$NON-NLS-1$		
+			this.parent = parent;
+			this.child = child;
+			this.index = index;
+		}
+
+		@SuppressWarnings("unchecked")
+		@Override
+		protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+				IAdaptable info) throws ExecutionException {
+
+			View childView = (View) child.getAdapter(View.class);
+			View parentView = (View) parent.getAdapter(View.class);
+
+			if (parentView.getPersistedChildren().contains(childView)
+					&& index != ViewUtil.APPEND) {
+				parentView.getPersistedChildren().move(index, childView);
+			} else if (index == ViewUtil.APPEND) {
+				parentView.insertChild(childView);
+			} else {
+				parentView.insertChildAt(childView, index);
+			}
+			return CommandResult.newOKCommandResult();
+		}
+	}
+
+	/**
+	 * @param feature
+	 *            has to be an EList
+	 */
+	public CompartmentLayoutEditPolicy(EStructuralFeature feature) {
+		super();
+		this.feature = feature;
+	}
+
+	@Override
+	protected Command createAddCommand(EditPart child, EditPart after) {
+		int index = getHost().getChildren().indexOf(after);
+		TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+				.getEditingDomain();
+		AddCommand command = new CompartmentAddCommand(editingDomain,
+				new EObjectAdapter((View) getHost().getModel()),
+				new EObjectAdapter((View) child.getModel()), index);
+		return new ICommandProxy(command);
+	}
+
+	@Override
+	protected EditPolicy createChildEditPolicy(EditPart child) {
+		ResizableEditPolicyEx policy = new ResizableEditPolicyEx();
+		policy.setResizeDirections(0);
+		return policy;
+	}
+
+	@Override
+	@SuppressWarnings("rawtypes")
+	protected Command createMoveChildCommand(EditPart child, EditPart after) {
+
+		int newIndex;
+		int displacement;
+
+		int childIndex = getHost().getChildren().indexOf(child);
+		int afterIndex = getHost().getChildren().indexOf(after);
+
+		if (afterIndex == -1) {
+			newIndex = getHost().getChildren().size() - 1;
+			displacement = newIndex - childIndex;
+		} else {
+			newIndex = afterIndex;
+			displacement = afterIndex - childIndex;
+			if (childIndex <= afterIndex) {
+				newIndex--;
+				displacement--;
+			}
+		}
+
+		TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+				.getEditingDomain();
+
+		RepositionEObjectCommand command = new CompartmentRepositionEObjectCommand(
+				child, editingDomain, "", (EList) ((View) child.getParent()
+						.getModel()).getElement().eGet(feature),
+				((View) child.getModel()).getElement(), displacement, newIndex);
+
+		eraseLayoutTargetFeedback(null);
+
+		return new ICommandProxy(command);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	protected Command getCreateCommand(CreateRequest request) {
+		if (request instanceof CreateViewAndElementRequest) {
+
+			TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+					.getEditingDomain();
+			CompositeTransactionalCommand cc = new CompositeTransactionalCommand(
+					editingDomain, DiagramUIMessages.AddCommand_Label);
+
+			Iterator<?> descriptors = ((CreateViewRequest) request)
+					.getViewDescriptors().iterator();
+
+			while (descriptors.hasNext()) {
+				CreateViewRequest.ViewDescriptor descriptor = (CreateViewRequest.ViewDescriptor) descriptors
+						.next();
+
+				int feedBackIndex = getFeedbackIndexFor(request);
+
+				// obtain CreateElementRequest and add initial region feedback
+				// index to request map. This index is needed to add the
+				// semantic element at the correct listIndex
+				CreateElementRequest createElementRequest = (CreateElementRequest) ((CreateViewAndElementRequest) request)
+						.getViewAndElementDescriptor()
+						.getCreateElementRequestAdapter()
+						.getAdapter(CreateElementRequest.class);
+
+				if (createElementRequest != null) {
+					createElementRequest.getParameters().put(
+							RequestParameterKeys.RegionFeedbackIndex,
+							feedBackIndex);
+				}
+
+				CreateCommand createCommand = new CompartmentChildCreateCommand(
+						editingDomain, descriptor,
+						(View) (getHost().getModel()), feedBackIndex);
+
+				cc.compose(createCommand);
+			}
+			return new ICommandProxy(cc.reduce());
+		}
+
+		return null;
+	}
+
+	@Override
+	protected boolean isHorizontal() {
+		IFigure figure = ((IGraphicalEditPart) getHost()).getContentPane();
+		if (figure.getLayoutManager() instanceof OrderedLayout) {
+			return ((OrderedLayout) figure.getLayoutManager()).isHorizontal();
+		}
+		return true;
+	}
+
+	@Override
+	protected Command getDeleteDependantCommand(Request request) {
+		return null;
+	}
+
+	@Override
+	protected Command getOrphanChildrenCommand(Request request) {
+		return null;
+	}
 }
 }

+ 39 - 39
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/editpolicies/OneWayConnectionHandlesEditPolicy.java

@@ -1,39 +1,39 @@
-/**
- * Copyright (c) 2011 itemis AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- * 	itemis AG - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.editpolicies;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConnectionHandleEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.handles.ConnectionHandle.HandleDirection;
-
-/**
- * Shows the connection handles only for one direction
- * 
- * @author andreas muelder (andreas.muelder@itemis.de)
- * 
- */
-public class OneWayConnectionHandlesEditPolicy extends
-		ConnectionHandleEditPolicy {
-
-	private final HandleDirection direction;
-
-	public OneWayConnectionHandlesEditPolicy(HandleDirection direction) {
-		this.direction = direction;
-	}
-
-	@Override
-	protected String buildTooltip(HandleDirection direction) {
-		if (direction == this.direction) {
-			return super.buildTooltip(direction);
-		}
-		return null;
-	}
-}
+/**
+ * Copyright (c) 2011 itemis AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ * 	itemis AG - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.editpolicies;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConnectionHandleEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.handles.ConnectionHandle.HandleDirection;
+
+/**
+ * Shows the connection handles only for one direction
+ * 
+ * @author andreas muelder (andreas.muelder@itemis.de)
+ * 
+ */
+public class OneWayConnectionHandlesEditPolicy extends
+		ConnectionHandleEditPolicy {
+
+	private final HandleDirection direction;
+
+	public OneWayConnectionHandlesEditPolicy(HandleDirection direction) {
+		this.direction = direction;
+	}
+
+	@Override
+	protected String buildTooltip(HandleDirection direction) {
+		if (direction == this.direction) {
+			return super.buildTooltip(direction);
+		}
+		return null;
+	}
+}

+ 44 - 44
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/figures/EllipseAnchorDefaultSizeNodeFigure.java

@@ -1,44 +1,44 @@
-/**
- * Copyright (c) 2011 itemis AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- * 	itemis AG - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.figures;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.EllipseAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-
-/**
- * 
- * {@link DefaultSizeNodeFigure} with fixed anchors on the ellipse child
- * 
- * @author andreas muelder (andreas.muelder@itemis.de)
- * 
- */
-public class EllipseAnchorDefaultSizeNodeFigure extends DefaultSizeNodeFigure {
-
-	public EllipseAnchorDefaultSizeNodeFigure(Dimension defSize) {
-		super(defSize);
-	}
-
-	@Override
-	protected ConnectionAnchor createAnchor(PrecisionPoint p) {
-		return createDefaultAnchor();
-	}
-
-	@Override
-	protected ConnectionAnchor createDefaultAnchor() {
-		return new EllipseAnchor((IFigure) getChildren().get(0));
-	}
-
-}
+/**
+ * Copyright (c) 2011 itemis AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ * 	itemis AG - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.figures;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.EllipseAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+
+/**
+ * 
+ * {@link DefaultSizeNodeFigure} with fixed anchors on the ellipse child
+ * 
+ * @author andreas muelder (andreas.muelder@itemis.de)
+ * 
+ */
+public class EllipseAnchorDefaultSizeNodeFigure extends DefaultSizeNodeFigure {
+
+	public EllipseAnchorDefaultSizeNodeFigure(Dimension defSize) {
+		super(defSize);
+	}
+
+	@Override
+	protected ConnectionAnchor createAnchor(PrecisionPoint p) {
+		return createDefaultAnchor();
+	}
+
+	@Override
+	protected ConnectionAnchor createDefaultAnchor() {
+		return new EllipseAnchor((IFigure) getChildren().get(0));
+	}
+
+}

+ 46 - 46
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/figures/FixedConnectionAnchor.java

@@ -1,46 +1,46 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.figures;
-
-import org.eclipse.draw2d.AbstractConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.Rectangle;
-
-public class FixedConnectionAnchor extends AbstractConnectionAnchor {
-
-	private final double xOffset;
-	private final double yOffset;
-
-	public FixedConnectionAnchor(IFigure owner, PrecisionPoint offset) {
-		this(owner, offset.preciseX(), offset.preciseY());
-	}
-
-	public FixedConnectionAnchor(IFigure owner, double xOffset, double yOffset) {
-		super(owner);
-		this.xOffset = xOffset;
-		this.yOffset = yOffset;
-	}
-
-	public Point getLocation(Point point) {
-		return getLocation();
-	}
-
-	public Point getLocation() {
-		Rectangle r = getOwner().getBounds();
-		Point p = new PrecisionPoint(r.x + r.width * xOffset, r.y + r.height
-				* yOffset);
-		getOwner().translateToAbsolute(p);
-		return p;
-	}
-
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.figures;
+
+import org.eclipse.draw2d.AbstractConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+public class FixedConnectionAnchor extends AbstractConnectionAnchor {
+
+	private final double xOffset;
+	private final double yOffset;
+
+	public FixedConnectionAnchor(IFigure owner, PrecisionPoint offset) {
+		this(owner, offset.preciseX(), offset.preciseY());
+	}
+
+	public FixedConnectionAnchor(IFigure owner, double xOffset, double yOffset) {
+		super(owner);
+		this.xOffset = xOffset;
+		this.yOffset = yOffset;
+	}
+
+	public Point getLocation(Point point) {
+		return getLocation();
+	}
+
+	public Point getLocation() {
+		Rectangle r = getOwner().getBounds();
+		Point p = new PrecisionPoint(r.x + r.width * xOffset, r.y + r.height
+				* yOffset);
+		getOwner().translateToAbsolute(p);
+		return p;
+	}
+
+}

+ 42 - 42
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/HighlightingParameters.java

@@ -1,43 +1,43 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.highlighting;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * 
- * @author Alexander Nyssen
- * 
- */
-public class HighlightingParameters {
-
-	public static final HighlightingParameters DEFAULT = new HighlightingParameters();
-	
-	public long fadingTime = 500;
-	public Color foregroundFadingColor = ColorConstants.red;
-	// light red
-	public Color backgroundFadingColor = new Color(null, 255, 128, 128);
-
-	public boolean grayScale = false;
-
-	public HighlightingParameters() {
-	}
-
-	public HighlightingParameters(long fadingTime, Color foregroundFadingColor,
-			Color backgroundFadingColor, boolean grayScale) {
-		this.fadingTime = fadingTime; // used for fade-in and fade-out
-		this.foregroundFadingColor = foregroundFadingColor;
-		this.backgroundFadingColor = backgroundFadingColor;
-		this.grayScale = grayScale;
-	}
-
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.highlighting;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * 
+ * @author Alexander Nyssen
+ * 
+ */
+public class HighlightingParameters {
+
+	public static final HighlightingParameters DEFAULT = new HighlightingParameters();
+	
+	public long fadingTime = 500;
+	public Color foregroundFadingColor = ColorConstants.red;
+	// light red
+	public Color backgroundFadingColor = new Color(null, 255, 128, 128);
+
+	public boolean grayScale = false;
+
+	public HighlightingParameters() {
+	}
+
+	public HighlightingParameters(long fadingTime, Color foregroundFadingColor,
+			Color backgroundFadingColor, boolean grayScale) {
+		this.fadingTime = fadingTime; // used for fade-in and fade-out
+		this.foregroundFadingColor = foregroundFadingColor;
+		this.backgroundFadingColor = backgroundFadingColor;
+		this.grayScale = grayScale;
+	}
+
 }
 }

+ 297 - 297
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/HighlightingSupportAdapter.java

@@ -1,298 +1,298 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.highlighting;
-
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.PaletteData;
-import org.eclipse.swt.widgets.Display;
-import org.yakindu.base.gmf.runtime.util.EditPartUtils;
-
-/**
- * 
- * @author Alexander Nyssen
- * @author Andreas Muelder
- * @author Axel Terfloth
- * 
- */
-public class HighlightingSupportAdapter implements IHighlightingSupport {
-
-	private class ColorMemento {
-		private final Color foregroundColor;
-		private final Color backgroundColor;
-		private final IFigure figure;
-
-		protected ColorMemento(IFigure figure) {
-			this.figure = figure;
-			this.foregroundColor = figure.getForegroundColor();
-			this.backgroundColor = figure.getBackgroundColor();
-		}
-
-		protected void restore() {
-			figure.setForegroundColor(foregroundColor);
-			figure.setBackgroundColor(backgroundColor);
-		}
-	}
-
-	private class Fader implements Runnable {
-
-		private final int fadingTime;
-		private final Color sourceForegroundColor;
-		private final Color targetForegroundColor;
-		private final IFigure figure;
-		private final boolean shouldFadeBack;
-		private final Color sourceBackgroundColor;
-		private final Color targetBackgroundColor;
-
-		private Fader(IFigure figure, Color sourceForegroundColor,
-				Color targetForegroundColor, Color sourceBackgroundColor,
-				Color targetBackgroundColor, int fadingTime,
-				boolean shouldFadeBack) {
-			this.figure = figure;
-			this.sourceForegroundColor = sourceForegroundColor;
-			this.targetForegroundColor = targetForegroundColor;
-			this.sourceBackgroundColor = sourceBackgroundColor;
-			this.targetBackgroundColor = targetBackgroundColor;
-			this.shouldFadeBack = shouldFadeBack;
-			this.fadingTime = fadingTime;
-		}
-
-		public void run() {
-			if (!locked) {
-				// if we were started as "back-fader" via timer and editor
-				// was released in the meantime, don't perform fading back
-				return;
-			}
-
-			figure.setForegroundColor(targetForegroundColor);
-			figure.setBackgroundColor(targetBackgroundColor);
-			figure.invalidate();
-			if (shouldFadeBack) {
-				Display.getCurrent().timerExec(
-						fadingTime,
-						new Fader(figure, targetForegroundColor,
-								sourceForegroundColor, targetBackgroundColor,
-								sourceBackgroundColor, fadingTime, false));
-			}
-		}
-	}
-
-	private final Map<IFigure, ColorMemento> figureStates = new HashMap<IFigure, ColorMemento>();
-	private final Map<Color, Color> greyscaleColors = new HashMap<Color, Color>();
-	private boolean locked = false;
-	private final IDiagramWorkbenchPart diagramWorkbenchPart;
-
-	public HighlightingSupportAdapter(IDiagramWorkbenchPart diagramWorkbenchPart) {
-		this.diagramWorkbenchPart = diagramWorkbenchPart;
-	}
-
-	public synchronized void fadeIn(EObject semanticElement,
-			HighlightingParameters parameters) {
-
-		IGraphicalEditPart editPart = getEditPartForSemanticElement(semanticElement);
-		if(editPart == null)
-			return;
-		IFigure figure = getTargetFigure(editPart);
-		Assert.isNotNull(figure, "Could not obtain target figure");
-		// store fore and background color
-		Display.getCurrent().asyncExec(
-				new Fader(figure, figure.getForegroundColor(),
-						parameters.foregroundFadingColor, figure
-								.getBackgroundColor(),
-						parameters.backgroundFadingColor,
-						(int) parameters.fadingTime, false));
-	}
-
-	public synchronized void fadeOut(EObject semanticElement,
-			HighlightingParameters parameters) {
-		if (!locked) {
-			throw new IllegalStateException(
-					"May only highlight if editor is locked");
-		}
-
-		IGraphicalEditPart editPart = getEditPartForSemanticElement(semanticElement);
-		if(editPart == null)
-			return;
-		IFigure figure = getTargetFigure(editPart);
-		Assert.isNotNull(figure, "Could not obtain target figure");
-		Color foregroundColor = figureStates.get(figure).foregroundColor;
-		Color backgroundColor = figureStates.get(figure).backgroundColor;
-
-		Display.getCurrent().asyncExec(
-				new Fader(figure, parameters.foregroundFadingColor,
-						parameters.grayScale ? getGreyscaled(foregroundColor)
-								: foregroundColor,
-						parameters.backgroundFadingColor,
-						parameters.grayScale ? getGreyscaled(backgroundColor)
-								: backgroundColor, (int) parameters.fadingTime,
-						false));
-	}
-
-	public synchronized void flash(final EObject semanticElement,
-			final HighlightingParameters parameters) {
-		if (!locked) {
-			throw new IllegalStateException(
-					"May only highlight if editor is locked");
-		}
-		final IGraphicalEditPart editPart = getEditPartForSemanticElement(semanticElement);
-		if(editPart == null) {
-			return;
-		}
-		// ensure the edit part is made visible.
-		diagramWorkbenchPart.getDiagramGraphicalViewer().reveal(editPart);
-
-		final IFigure figure = getTargetFigure(editPart);
-				
-//				(editPart instanceof FixedSizeShapeNodeEditPart) 
-//				? (IFigure) 	editPart.getFigure().getChildren().get(0) 
-//				: editPart.getFigure();
-		
-		Display.getCurrent().asyncExec(
-				new Fader(figure, figure.getForegroundColor(),
-						parameters.foregroundFadingColor, figure
-								.getBackgroundColor(),
-						parameters.backgroundFadingColor,
-						(int) parameters.fadingTime, true));
-	}
-
-	private IGraphicalEditPart getEditPartForSemanticElement(
-			EObject semanticElement) {
-		return EditPartUtils.findEditPartForSemanticElement(
-				diagramWorkbenchPart.getDiagramGraphicalViewer()
-						.getRootEditPart(), semanticElement);
-	}
-
-	private Color getGreyscaled(Color color) {
-		// check cache (if color has already be computed)
-		if (greyscaleColors.containsKey(color)) {
-			return greyscaleColors.get(color);
-		}
-		// use image to convert colors to greyscale
-		ImageData imageData = new ImageData(1, 1, 24, new PaletteData(0xFF,
-				0xFF00, 0xFF0000));
-		imageData.setPixel(0, 0, imageData.palette.getPixel(color.getRGB()));
-		Image image = new Image(Display.getCurrent(), imageData);
-		Image convertedImage = new Image(Display.getCurrent(), image,
-				SWT.IMAGE_DISABLE);
-		Color newColor = new Color(Display.getCurrent(),
-				convertedImage.getImageData().palette.getRGB(convertedImage
-						.getImageData().getPixel(0, 0)));
-		greyscaleColors.put(color, newColor);
-		convertedImage.dispose();
-		image.dispose();
-		return newColor;
-	}
-
-	private IFigure getTargetFigure(IGraphicalEditPart editPart) {
-		IFigure figure = editPart.getFigure();
-		if (figure instanceof BorderedNodeFigure) {
-			figure = (IFigure) figure.getChildren().get(0);
-		}
-		if (figure instanceof DefaultSizeNodeFigure) {
-			figure = (IFigure) figure.getChildren().get(0);
-		}
-		return figure;
-	}
-
-	public synchronized void lockEditor() {
-		if (locked) {
-			throw new IllegalStateException("Editor already locked!");
-		}
-
-		setSanityCheckEnablementState(false);
-		for (Object editPart : diagramWorkbenchPart.getDiagramGraphicalViewer()
-				.getEditPartRegistry().values()) {
-			if (editPart instanceof IGraphicalEditPart) {
-				IGraphicalEditPart graphicalEditPart = (IGraphicalEditPart) editPart;
-				IFigure figure = getTargetFigure(graphicalEditPart);
-				figureStates.put(figure, new ColorMemento(figure));
-			}
-		}
-		locked = true;
-	}
-
-	private void setSanityCheckEnablementState(boolean state) {
-		try {
-			Method enableMethod = DiagramDocumentEditor.class
-					.getDeclaredMethod("enableSanityChecking",
-							new Class[] { boolean.class });
-			enableMethod.setAccessible(true);
-			enableMethod.invoke(diagramWorkbenchPart, new Object[] { state });
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	public synchronized void releaseEditor() {
-		if (!locked) {
-			throw new IllegalStateException("Editor not locked!");
-		}
-
-		// restore all elements still being highlighted
-		for (ColorMemento figureState : figureStates.values()) {
-			figureState.restore();
-		}
-		figureStates.clear();
-		diagramWorkbenchPart.getDiagramEditPart().enableEditMode();
-		setSanityCheckEnablementState(true);
-
-		locked = false;
-	}
-
-	public void highlight(EObject semanticElement,
-			HighlightingParameters parameters) {
-		IGraphicalEditPart editPartForSemanticElement = getEditPartForSemanticElement(semanticElement);
-		if (editPartForSemanticElement != null) {
-			IFigure figure = getTargetFigure(editPartForSemanticElement);
-			if (parameters != null) {
-				figure.setForegroundColor(parameters.foregroundFadingColor);
-				figure.setBackgroundColor(parameters.backgroundFadingColor);
-				figure.invalidate();
-			} else {
-				ColorMemento memento = figureStates.get(figure);
-				if ( memento != null ) memento.restore();
-			}
-		}
-
-	}
-
-	public boolean isLocked() {
-		return locked;
-	}
-
-	public void executeBatch(final List<Action> actions) {
-		if ( actions != null ) {
-			
-			Display.getCurrent().asyncExec( new Runnable() {				
-				public void run() {
-					for ( Action a : actions ) {
-						a.execute(HighlightingSupportAdapter.this);
-					}
-				}
-			});
-		}
-	}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.highlighting;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.widgets.Display;
+import org.yakindu.base.gmf.runtime.util.EditPartUtils;
+
+/**
+ * 
+ * @author Alexander Nyssen
+ * @author Andreas Muelder
+ * @author Axel Terfloth
+ * 
+ */
+public class HighlightingSupportAdapter implements IHighlightingSupport {
+
+	private class ColorMemento {
+		private final Color foregroundColor;
+		private final Color backgroundColor;
+		private final IFigure figure;
+
+		protected ColorMemento(IFigure figure) {
+			this.figure = figure;
+			this.foregroundColor = figure.getForegroundColor();
+			this.backgroundColor = figure.getBackgroundColor();
+		}
+
+		protected void restore() {
+			figure.setForegroundColor(foregroundColor);
+			figure.setBackgroundColor(backgroundColor);
+		}
+	}
+
+	private class Fader implements Runnable {
+
+		private final int fadingTime;
+		private final Color sourceForegroundColor;
+		private final Color targetForegroundColor;
+		private final IFigure figure;
+		private final boolean shouldFadeBack;
+		private final Color sourceBackgroundColor;
+		private final Color targetBackgroundColor;
+
+		private Fader(IFigure figure, Color sourceForegroundColor,
+				Color targetForegroundColor, Color sourceBackgroundColor,
+				Color targetBackgroundColor, int fadingTime,
+				boolean shouldFadeBack) {
+			this.figure = figure;
+			this.sourceForegroundColor = sourceForegroundColor;
+			this.targetForegroundColor = targetForegroundColor;
+			this.sourceBackgroundColor = sourceBackgroundColor;
+			this.targetBackgroundColor = targetBackgroundColor;
+			this.shouldFadeBack = shouldFadeBack;
+			this.fadingTime = fadingTime;
+		}
+
+		public void run() {
+			if (!locked) {
+				// if we were started as "back-fader" via timer and editor
+				// was released in the meantime, don't perform fading back
+				return;
+			}
+
+			figure.setForegroundColor(targetForegroundColor);
+			figure.setBackgroundColor(targetBackgroundColor);
+			figure.invalidate();
+			if (shouldFadeBack) {
+				Display.getCurrent().timerExec(
+						fadingTime,
+						new Fader(figure, targetForegroundColor,
+								sourceForegroundColor, targetBackgroundColor,
+								sourceBackgroundColor, fadingTime, false));
+			}
+		}
+	}
+
+	private final Map<IFigure, ColorMemento> figureStates = new HashMap<IFigure, ColorMemento>();
+	private final Map<Color, Color> greyscaleColors = new HashMap<Color, Color>();
+	private boolean locked = false;
+	private final IDiagramWorkbenchPart diagramWorkbenchPart;
+
+	public HighlightingSupportAdapter(IDiagramWorkbenchPart diagramWorkbenchPart) {
+		this.diagramWorkbenchPart = diagramWorkbenchPart;
+	}
+
+	public synchronized void fadeIn(EObject semanticElement,
+			HighlightingParameters parameters) {
+
+		IGraphicalEditPart editPart = getEditPartForSemanticElement(semanticElement);
+		if(editPart == null)
+			return;
+		IFigure figure = getTargetFigure(editPart);
+		Assert.isNotNull(figure, "Could not obtain target figure");
+		// store fore and background color
+		Display.getCurrent().asyncExec(
+				new Fader(figure, figure.getForegroundColor(),
+						parameters.foregroundFadingColor, figure
+								.getBackgroundColor(),
+						parameters.backgroundFadingColor,
+						(int) parameters.fadingTime, false));
+	}
+
+	public synchronized void fadeOut(EObject semanticElement,
+			HighlightingParameters parameters) {
+		if (!locked) {
+			throw new IllegalStateException(
+					"May only highlight if editor is locked");
+		}
+
+		IGraphicalEditPart editPart = getEditPartForSemanticElement(semanticElement);
+		if(editPart == null)
+			return;
+		IFigure figure = getTargetFigure(editPart);
+		Assert.isNotNull(figure, "Could not obtain target figure");
+		Color foregroundColor = figureStates.get(figure).foregroundColor;
+		Color backgroundColor = figureStates.get(figure).backgroundColor;
+
+		Display.getCurrent().asyncExec(
+				new Fader(figure, parameters.foregroundFadingColor,
+						parameters.grayScale ? getGreyscaled(foregroundColor)
+								: foregroundColor,
+						parameters.backgroundFadingColor,
+						parameters.grayScale ? getGreyscaled(backgroundColor)
+								: backgroundColor, (int) parameters.fadingTime,
+						false));
+	}
+
+	public synchronized void flash(final EObject semanticElement,
+			final HighlightingParameters parameters) {
+		if (!locked) {
+			throw new IllegalStateException(
+					"May only highlight if editor is locked");
+		}
+		final IGraphicalEditPart editPart = getEditPartForSemanticElement(semanticElement);
+		if(editPart == null) {
+			return;
+		}
+		// ensure the edit part is made visible.
+		diagramWorkbenchPart.getDiagramGraphicalViewer().reveal(editPart);
+
+		final IFigure figure = getTargetFigure(editPart);
+				
+//				(editPart instanceof FixedSizeShapeNodeEditPart) 
+//				? (IFigure) 	editPart.getFigure().getChildren().get(0) 
+//				: editPart.getFigure();
+		
+		Display.getCurrent().asyncExec(
+				new Fader(figure, figure.getForegroundColor(),
+						parameters.foregroundFadingColor, figure
+								.getBackgroundColor(),
+						parameters.backgroundFadingColor,
+						(int) parameters.fadingTime, true));
+	}
+
+	private IGraphicalEditPart getEditPartForSemanticElement(
+			EObject semanticElement) {
+		return EditPartUtils.findEditPartForSemanticElement(
+				diagramWorkbenchPart.getDiagramGraphicalViewer()
+						.getRootEditPart(), semanticElement);
+	}
+
+	private Color getGreyscaled(Color color) {
+		// check cache (if color has already be computed)
+		if (greyscaleColors.containsKey(color)) {
+			return greyscaleColors.get(color);
+		}
+		// use image to convert colors to greyscale
+		ImageData imageData = new ImageData(1, 1, 24, new PaletteData(0xFF,
+				0xFF00, 0xFF0000));
+		imageData.setPixel(0, 0, imageData.palette.getPixel(color.getRGB()));
+		Image image = new Image(Display.getCurrent(), imageData);
+		Image convertedImage = new Image(Display.getCurrent(), image,
+				SWT.IMAGE_DISABLE);
+		Color newColor = new Color(Display.getCurrent(),
+				convertedImage.getImageData().palette.getRGB(convertedImage
+						.getImageData().getPixel(0, 0)));
+		greyscaleColors.put(color, newColor);
+		convertedImage.dispose();
+		image.dispose();
+		return newColor;
+	}
+
+	private IFigure getTargetFigure(IGraphicalEditPart editPart) {
+		IFigure figure = editPart.getFigure();
+		if (figure instanceof BorderedNodeFigure) {
+			figure = (IFigure) figure.getChildren().get(0);
+		}
+		if (figure instanceof DefaultSizeNodeFigure) {
+			figure = (IFigure) figure.getChildren().get(0);
+		}
+		return figure;
+	}
+
+	public synchronized void lockEditor() {
+		if (locked) {
+			throw new IllegalStateException("Editor already locked!");
+		}
+
+		setSanityCheckEnablementState(false);
+		for (Object editPart : diagramWorkbenchPart.getDiagramGraphicalViewer()
+				.getEditPartRegistry().values()) {
+			if (editPart instanceof IGraphicalEditPart) {
+				IGraphicalEditPart graphicalEditPart = (IGraphicalEditPart) editPart;
+				IFigure figure = getTargetFigure(graphicalEditPart);
+				figureStates.put(figure, new ColorMemento(figure));
+			}
+		}
+		locked = true;
+	}
+
+	private void setSanityCheckEnablementState(boolean state) {
+		try {
+			Method enableMethod = DiagramDocumentEditor.class
+					.getDeclaredMethod("enableSanityChecking",
+							new Class[] { boolean.class });
+			enableMethod.setAccessible(true);
+			enableMethod.invoke(diagramWorkbenchPart, new Object[] { state });
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public synchronized void releaseEditor() {
+		if (!locked) {
+			throw new IllegalStateException("Editor not locked!");
+		}
+
+		// restore all elements still being highlighted
+		for (ColorMemento figureState : figureStates.values()) {
+			figureState.restore();
+		}
+		figureStates.clear();
+		diagramWorkbenchPart.getDiagramEditPart().enableEditMode();
+		setSanityCheckEnablementState(true);
+
+		locked = false;
+	}
+
+	public void highlight(EObject semanticElement,
+			HighlightingParameters parameters) {
+		IGraphicalEditPart editPartForSemanticElement = getEditPartForSemanticElement(semanticElement);
+		if (editPartForSemanticElement != null) {
+			IFigure figure = getTargetFigure(editPartForSemanticElement);
+			if (parameters != null) {
+				figure.setForegroundColor(parameters.foregroundFadingColor);
+				figure.setBackgroundColor(parameters.backgroundFadingColor);
+				figure.invalidate();
+			} else {
+				ColorMemento memento = figureStates.get(figure);
+				if ( memento != null ) memento.restore();
+			}
+		}
+
+	}
+
+	public boolean isLocked() {
+		return locked;
+	}
+
+	public void executeBatch(final List<Action> actions) {
+		if ( actions != null ) {
+			
+			Display.getCurrent().asyncExec( new Runnable() {				
+				public void run() {
+					for ( Action a : actions ) {
+						a.execute(HighlightingSupportAdapter.this);
+					}
+				}
+			});
+		}
+	}
 }
 }

+ 128 - 128
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/highlighting/IHighlightingSupport.java

@@ -1,128 +1,128 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.highlighting;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * @author Alexander Nyssen
- * @author Andreas Muelder
- * 
- */
-public interface IHighlightingSupport {
-
-	/**
-	 * Prevent user from editing
-	 */
-	void lockEditor();
-
-	boolean isLocked();
-	/**
-	 * Allow user to edit model again
-	 */
-	void releaseEditor();
-
-	void highlight(EObject semanticElement, HighlightingParameters parameters);
-
-	/**
-	 * Highlight a model element. Fading time may be zero to indicate that
-	 * hightlighting should take place immediately.
-	 * 
-	 * @param modelElement
-	 * @param parameterObject
-	 */
-	void fadeIn(EObject semanticElement, HighlightingParameters parameters);
-
-	/**
-	 * Unhighlight a model element. Fading time may be zero to indicate that
-	 * hightlighting should be directly removed.
-	 * 
-	 * @param modelElement
-	 * @param fadeOutTime
-	 */
-	void fadeOut(EObject semanticElement, HighlightingParameters parameters);
-
-	/**
-	 * Shortly highlight the given model element. The given fading time will be
-	 * used for entering and leaving the highlighted state.
-	 * 
-	 * @param modelElement
-	 * @param parameters
-	 */
-	void flash(EObject semanticElemesnt, HighlightingParameters parameters);
-
-	/**
-	 * 
-	 * @param actions
-	 */
-	void executeBatch(List<Action> actions);
-	
-	
-	public static interface Action {
-		public void execute(IHighlightingSupport hs);
-	}
-	
-
-	public static class Highlight implements Action {
-
-		protected EObject semanticElement;
-		protected HighlightingParameters highligtingParams;
-		
-		public Highlight(EObject semanticElement, HighlightingParameters parameters) {
-			this.semanticElement = semanticElement;
-			this.highligtingParams = parameters;
-		}
-		
-		public void execute(IHighlightingSupport hs) {
-			hs.highlight(semanticElement, highligtingParams);
-		}
-		
-	}
-
-	
-	public static class HighlightingSupportNullImpl implements
-			IHighlightingSupport {
-
-		public void lockEditor() {
-		}
-
-		public void releaseEditor() {
-		}
-
-		public void fadeIn(EObject semanticElement,
-				HighlightingParameters parameters) {
-		}
-
-		public void fadeOut(EObject semanticElement,
-				HighlightingParameters parameters) {
-		}
-
-		public void flash(EObject semanticElement,
-				HighlightingParameters parameters) {
-		}
-
-		public void highlight(EObject semanticElement,
-				HighlightingParameters parameters) {
-			
-		}
-
-		public boolean isLocked() {
-			return false;
-		}
-
-		public void executeBatch(List<Action> actions) {
-		}
-		
-		
-	}
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.highlighting;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * @author Alexander Nyssen
+ * @author Andreas Muelder
+ * 
+ */
+public interface IHighlightingSupport {
+
+	/**
+	 * Prevent user from editing
+	 */
+	void lockEditor();
+
+	boolean isLocked();
+	/**
+	 * Allow user to edit model again
+	 */
+	void releaseEditor();
+
+	void highlight(EObject semanticElement, HighlightingParameters parameters);
+
+	/**
+	 * Highlight a model element. Fading time may be zero to indicate that
+	 * hightlighting should take place immediately.
+	 * 
+	 * @param modelElement
+	 * @param parameterObject
+	 */
+	void fadeIn(EObject semanticElement, HighlightingParameters parameters);
+
+	/**
+	 * Unhighlight a model element. Fading time may be zero to indicate that
+	 * hightlighting should be directly removed.
+	 * 
+	 * @param modelElement
+	 * @param fadeOutTime
+	 */
+	void fadeOut(EObject semanticElement, HighlightingParameters parameters);
+
+	/**
+	 * Shortly highlight the given model element. The given fading time will be
+	 * used for entering and leaving the highlighted state.
+	 * 
+	 * @param modelElement
+	 * @param parameters
+	 */
+	void flash(EObject semanticElemesnt, HighlightingParameters parameters);
+
+	/**
+	 * 
+	 * @param actions
+	 */
+	void executeBatch(List<Action> actions);
+	
+	
+	public static interface Action {
+		public void execute(IHighlightingSupport hs);
+	}
+	
+
+	public static class Highlight implements Action {
+
+		protected EObject semanticElement;
+		protected HighlightingParameters highligtingParams;
+		
+		public Highlight(EObject semanticElement, HighlightingParameters parameters) {
+			this.semanticElement = semanticElement;
+			this.highligtingParams = parameters;
+		}
+		
+		public void execute(IHighlightingSupport hs) {
+			hs.highlight(semanticElement, highligtingParams);
+		}
+		
+	}
+
+	
+	public static class HighlightingSupportNullImpl implements
+			IHighlightingSupport {
+
+		public void lockEditor() {
+		}
+
+		public void releaseEditor() {
+		}
+
+		public void fadeIn(EObject semanticElement,
+				HighlightingParameters parameters) {
+		}
+
+		public void fadeOut(EObject semanticElement,
+				HighlightingParameters parameters) {
+		}
+
+		public void flash(EObject semanticElement,
+				HighlightingParameters parameters) {
+		}
+
+		public void highlight(EObject semanticElement,
+				HighlightingParameters parameters) {
+			
+		}
+
+		public boolean isLocked() {
+			return false;
+		}
+
+		public void executeBatch(List<Action> actions) {
+		}
+		
+		
+	}
+}

+ 109 - 109
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/palette/CreationTool.java

@@ -1,109 +1,109 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.palette;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * CreationTool based on
- * {@link org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool} which allow to
- * disable initial direct editing on element creation. Default behavior of
- * direct editing is enabled.
- * 
- * @author muehlbrandt
- * 
- */
-public class CreationTool extends
-		org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool {
-	
-	private boolean performDirectEdit;
-	
-	/**
-	 * Default constructor
-	 * @param elementType The type the tool should create.
-	 * @param performDirectEdit flag to set direct editing enabled or disabled.
-	 */
-	public CreationTool(IElementType elementType, boolean performDirectEdit) {
-		super(elementType);
-		Assert.isNotNull(performDirectEdit);
-		this.performDirectEdit = performDirectEdit;
-	}
-	
-	/**
-	 * Select the newly added shape view by default
-	 * @param viewer
-	 * @param objects
-	 */
-	@SuppressWarnings("rawtypes")
-	protected void selectAddedObject(EditPartViewer viewer, Collection objects) {
-		final List<Object> editparts = new ArrayList<Object>();
-		for (Iterator i = objects.iterator(); i.hasNext();) {
-			Object object = i.next();
-			if (object instanceof IAdaptable) {
-				Object editPart = viewer.getEditPartRegistry().get(
-						((IAdaptable) object).getAdapter(View.class));
-				if (editPart != null)
-					editparts.add(editPart);
-			}
-		}
-
-		if (!editparts.isEmpty()) {
-			viewer.setSelection(new StructuredSelection(editparts));
-
-			if (performDirectEdit) {
-				// automatically put the first shape into edit-mode
-				Display.getCurrent().asyncExec(new Runnable() {
-					public void run() {
-						EditPart editPart = (EditPart) editparts.get(0);
-						// add active test since test scripts are failing on
-						// this basically, the editpart has been deleted when
-						// this code is being executed. (see RATLC00527114)
-						if (editPart.isActive()) {
-							editPart.performRequest(new Request(
-									RequestConstants.REQ_DIRECT_EDIT));
-							revealEditPart((EditPart) editparts.get(0));
-						}
-					}
-				});
-			}
-		}
-	}
-	
-	/**
-	 * Get the current state of direct editing behavior.
-	 * @return {@code true} if direct editing is enabled on element creation. Otherwise {@code false}.
-	 */
-	public boolean isPerformDirectEdit() {
-		return performDirectEdit;
-	}
-
-	/**
-	 * Set the direct editing flag to allow or disallow direct editing on element creation
-	 * @param performDirectEdit
-	 */
-	public void setPerformDirectEdit(boolean performDirectEdit) {
-		this.performDirectEdit = performDirectEdit;
-	}
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.palette;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * CreationTool based on
+ * {@link org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool} which allow to
+ * disable initial direct editing on element creation. Default behavior of
+ * direct editing is enabled.
+ * 
+ * @author muehlbrandt
+ * 
+ */
+public class CreationTool extends
+		org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool {
+	
+	private boolean performDirectEdit;
+	
+	/**
+	 * Default constructor
+	 * @param elementType The type the tool should create.
+	 * @param performDirectEdit flag to set direct editing enabled or disabled.
+	 */
+	public CreationTool(IElementType elementType, boolean performDirectEdit) {
+		super(elementType);
+		Assert.isNotNull(performDirectEdit);
+		this.performDirectEdit = performDirectEdit;
+	}
+	
+	/**
+	 * Select the newly added shape view by default
+	 * @param viewer
+	 * @param objects
+	 */
+	@SuppressWarnings("rawtypes")
+	protected void selectAddedObject(EditPartViewer viewer, Collection objects) {
+		final List<Object> editparts = new ArrayList<Object>();
+		for (Iterator i = objects.iterator(); i.hasNext();) {
+			Object object = i.next();
+			if (object instanceof IAdaptable) {
+				Object editPart = viewer.getEditPartRegistry().get(
+						((IAdaptable) object).getAdapter(View.class));
+				if (editPart != null)
+					editparts.add(editPart);
+			}
+		}
+
+		if (!editparts.isEmpty()) {
+			viewer.setSelection(new StructuredSelection(editparts));
+
+			if (performDirectEdit) {
+				// automatically put the first shape into edit-mode
+				Display.getCurrent().asyncExec(new Runnable() {
+					public void run() {
+						EditPart editPart = (EditPart) editparts.get(0);
+						// add active test since test scripts are failing on
+						// this basically, the editpart has been deleted when
+						// this code is being executed. (see RATLC00527114)
+						if (editPart.isActive()) {
+							editPart.performRequest(new Request(
+									RequestConstants.REQ_DIRECT_EDIT));
+							revealEditPart((EditPart) editparts.get(0));
+						}
+					}
+				});
+			}
+		}
+	}
+	
+	/**
+	 * Get the current state of direct editing behavior.
+	 * @return {@code true} if direct editing is enabled on element creation. Otherwise {@code false}.
+	 */
+	public boolean isPerformDirectEdit() {
+		return performDirectEdit;
+	}
+
+	/**
+	 * Set the direct editing flag to allow or disallow direct editing on element creation
+	 * @param performDirectEdit
+	 */
+	public void setPerformDirectEdit(boolean performDirectEdit) {
+		this.performDirectEdit = performDirectEdit;
+	}
+}

+ 109 - 109
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/parsers/StringAttributeParser.java

@@ -1,109 +1,109 @@
-/**
- * Copyright (c) 2013 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.parsers;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-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.common.ui.services.parser.IParser;
-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.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.yakindu.base.xtext.utils.gmf.directedit.IEAttributeProvider;
-
-/**
- * Direct editing parser that allows editing of an EAttribute of type String.
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class StringAttributeParser implements IParser {
-
-	private final String pluginId;
-	private IEAttributeProvider provider;
-
-	public StringAttributeParser(IEAttributeProvider provider, String pluginId) {
-		this.provider = provider;
-		this.pluginId = pluginId;
-	}
-
-	public StringAttributeParser(final EAttribute attribute, String pluginId) {
-		this.provider = new IEAttributeProvider() {
-			public EAttribute getAttribute() {
-				return attribute;
-			}
-		};
-		this.pluginId = pluginId;
-	}
-
-	public String getEditString(IAdaptable adapter, int flags) {
-		EObject element = (EObject) adapter.getAdapter(EObject.class);
-		EAttribute attribute = provider.getAttribute();
-		Assert.isTrue(attribute.getEAttributeType() == EcorePackage.Literals.ESTRING);
-		String string = (String) element.eGet(attribute);
-		if (string != null && !string.trim().isEmpty()) {
-			return String.valueOf(string);
-		} else {
-			return createEmptyStringLabel(attribute);
-		}
-	}
-
-	protected String createEmptyStringLabel(EAttribute attribute) {
-		return "<" + attribute.getName() + ">";
-	}
-
-	public IParserEditStatus isValidEditString(IAdaptable element,
-			String editString) {
-		return new ParserEditStatus(pluginId, IParserEditStatus.OK, "");
-	}
-
-	public ICommand getParseCommand(IAdaptable adapter, String newString,
-			int flags) {
-		if (newString == null) {
-			return UnexecutableCommand.INSTANCE;
-		}
-		EObject element = (EObject) adapter.getAdapter(EObject.class);
-		TransactionalEditingDomain editingDomain = TransactionUtil
-				.getEditingDomain(element);
-		if (editingDomain == null) {
-			return UnexecutableCommand.INSTANCE;
-		}
-		SetRequest request = new SetRequest(element, provider.getAttribute(),
-				newString);
-		return new SetValueCommand(request);
-	}
-
-	public String getPrintString(IAdaptable adapter, int flags) {
-		EObject element = (EObject) adapter.getAdapter(EObject.class);
-		return String.valueOf(element.eGet(provider.getAttribute()));
-	}
-
-	public boolean isAffectingEvent(Object event, int flags) {
-		if (event instanceof Notification) {
-			return (((Notification) event).getFeature() == provider
-					.getAttribute());
-		}
-		return false;
-	}
-
-	public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
-		return null;
-	}
-}
+/**
+ * Copyright (c) 2013 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.parsers;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+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.common.ui.services.parser.IParser;
+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.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.yakindu.base.xtext.utils.gmf.directedit.IEAttributeProvider;
+
+/**
+ * Direct editing parser that allows editing of an EAttribute of type String.
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class StringAttributeParser implements IParser {
+
+	private final String pluginId;
+	private IEAttributeProvider provider;
+
+	public StringAttributeParser(IEAttributeProvider provider, String pluginId) {
+		this.provider = provider;
+		this.pluginId = pluginId;
+	}
+
+	public StringAttributeParser(final EAttribute attribute, String pluginId) {
+		this.provider = new IEAttributeProvider() {
+			public EAttribute getAttribute() {
+				return attribute;
+			}
+		};
+		this.pluginId = pluginId;
+	}
+
+	public String getEditString(IAdaptable adapter, int flags) {
+		EObject element = (EObject) adapter.getAdapter(EObject.class);
+		EAttribute attribute = provider.getAttribute();
+		Assert.isTrue(attribute.getEAttributeType() == EcorePackage.Literals.ESTRING);
+		String string = (String) element.eGet(attribute);
+		if (string != null && !string.trim().isEmpty()) {
+			return String.valueOf(string);
+		} else {
+			return createEmptyStringLabel(attribute);
+		}
+	}
+
+	protected String createEmptyStringLabel(EAttribute attribute) {
+		return "<" + attribute.getName() + ">";
+	}
+
+	public IParserEditStatus isValidEditString(IAdaptable element,
+			String editString) {
+		return new ParserEditStatus(pluginId, IParserEditStatus.OK, "");
+	}
+
+	public ICommand getParseCommand(IAdaptable adapter, String newString,
+			int flags) {
+		if (newString == null) {
+			return UnexecutableCommand.INSTANCE;
+		}
+		EObject element = (EObject) adapter.getAdapter(EObject.class);
+		TransactionalEditingDomain editingDomain = TransactionUtil
+				.getEditingDomain(element);
+		if (editingDomain == null) {
+			return UnexecutableCommand.INSTANCE;
+		}
+		SetRequest request = new SetRequest(element, provider.getAttribute(),
+				newString);
+		return new SetValueCommand(request);
+	}
+
+	public String getPrintString(IAdaptable adapter, int flags) {
+		EObject element = (EObject) adapter.getAdapter(EObject.class);
+		return String.valueOf(element.eGet(provider.getAttribute()));
+	}
+
+	public boolean isAffectingEvent(Object event, int flags) {
+		if (event instanceof Notification) {
+			return (((Notification) event).getFeature() == provider
+					.getAttribute());
+		}
+		return false;
+	}
+
+	public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+		return null;
+	}
+}

File diff suppressed because it is too large
+ 534 - 534
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/TreeLayout.java


+ 82 - 82
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/TreeLayoutConstraint.java

@@ -1,82 +1,82 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class TreeLayoutConstraint extends Rectangle {
-
-	public static final int DEFAULT_INNER_RANK_INDEX = -1;
-	
-	private static final long serialVersionUID = 1L;
-
-	private boolean isRoot;
-
-	private int treeInnerRankIndex;
-
-	private IFigure treeParentFigure;
-
-	public TreeLayoutConstraint(Rectangle bounds, boolean isRoot,
-			int innerRankIndex) {
-		super(bounds);
-		this.isRoot = isRoot;
-		this.treeInnerRankIndex = innerRankIndex;
-	}
-
-	public TreeLayoutConstraint(TreeLayoutConstraint treeLayoutConstraint) {
-		this(treeLayoutConstraint, treeLayoutConstraint.isRoot(),
-				treeLayoutConstraint.getTreeInnerRankIndex());
-	}
-
-	public boolean isRoot() {
-		return isRoot;
-	}
-
-	public void setRoot(boolean isRoot) {
-		this.isRoot = isRoot;
-	}
-
-	public int getTreeInnerRankIndex() {
-		return treeInnerRankIndex;
-	}
-
-	public void setTreeInnerRankIndex(int treePosition) {
-		this.treeInnerRankIndex = treePosition;
-	}
-
-	public IFigure getTreeParentFigure() {
-		return treeParentFigure;
-	}
-
-	public void setTreeParentFigure(IFigure treeParentFigure) {
-		this.treeParentFigure = treeParentFigure;
-	}
-
-	public TreeLayoutConstraint getCopy() {
-
-		if (getClass() == TreeLayoutConstraint.class) {
-			/* avoid clone() call cost see bug #260740 */
-			return new TreeLayoutConstraint(this);
-		} else {
-			try {
-				return (TreeLayoutConstraint) clone();
-			} catch (CloneNotSupportedException exc) {
-				return new TreeLayoutConstraint(this);
-			}
-		}
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class TreeLayoutConstraint extends Rectangle {
+
+	public static final int DEFAULT_INNER_RANK_INDEX = -1;
+	
+	private static final long serialVersionUID = 1L;
+
+	private boolean isRoot;
+
+	private int treeInnerRankIndex;
+
+	private IFigure treeParentFigure;
+
+	public TreeLayoutConstraint(Rectangle bounds, boolean isRoot,
+			int innerRankIndex) {
+		super(bounds);
+		this.isRoot = isRoot;
+		this.treeInnerRankIndex = innerRankIndex;
+	}
+
+	public TreeLayoutConstraint(TreeLayoutConstraint treeLayoutConstraint) {
+		this(treeLayoutConstraint, treeLayoutConstraint.isRoot(),
+				treeLayoutConstraint.getTreeInnerRankIndex());
+	}
+
+	public boolean isRoot() {
+		return isRoot;
+	}
+
+	public void setRoot(boolean isRoot) {
+		this.isRoot = isRoot;
+	}
+
+	public int getTreeInnerRankIndex() {
+		return treeInnerRankIndex;
+	}
+
+	public void setTreeInnerRankIndex(int treePosition) {
+		this.treeInnerRankIndex = treePosition;
+	}
+
+	public IFigure getTreeParentFigure() {
+		return treeParentFigure;
+	}
+
+	public void setTreeParentFigure(IFigure treeParentFigure) {
+		this.treeParentFigure = treeParentFigure;
+	}
+
+	public TreeLayoutConstraint getCopy() {
+
+		if (getClass() == TreeLayoutConstraint.class) {
+			/* avoid clone() call cost see bug #260740 */
+			return new TreeLayoutConstraint(this);
+		} else {
+			try {
+				return (TreeLayoutConstraint) clone();
+			} catch (CloneNotSupportedException exc) {
+				return new TreeLayoutConstraint(this);
+			}
+		}
+	}
+}

+ 428 - 428
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/TreeLayoutUtil.java

@@ -1,428 +1,428 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.draw2d.ConnectionLayer;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gef.LayerConstants;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * 
- * @author Markus Muehlbrandt
- * 
- */
-public class TreeLayoutUtil {
-
-	public static final String TREE_LAYOUT_ANNOTATION = "TreeLayoutAnnotation";
-
-	public static final String TREE_NODE_POSITION = "TreeNodePosition";
-
-	public static final String TREE_NODE_PARENT_URI = "TreeNodeParentURI";
-
-	/**
-	 * Util for TreeLayouting
-	 */
-	private TreeLayoutUtil() {
-		// not intended to be instantiated.
-	}
-
-	public static List<IGraphicalEditPart> getSiblings(IGraphicalEditPart child) {
-
-		final View parentView = TreeLayoutUtil.getTreeNodeParentView(child
-				.getNotationView());
-
-		if (parentView != null) {
-			final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) child
-					.findEditPart(child.getParent(), parentView.getElement());
-			if (parentEditPart != null) {
-				final List<IGraphicalEditPart> treeChildren = getOrderedTreeChildren(parentEditPart);
-				if (treeChildren.remove(child)) {
-					return treeChildren;
-				}
-			}
-		}
-		return Collections.emptyList();
-	}
-
-	public static ArrayList<IGraphicalEditPart> getOrderedTreeChildren(
-			IGraphicalEditPart parentTreeNodeEditPart) {
-
-		final List<IGraphicalEditPart> children = new ArrayList<IGraphicalEditPart>();
-
-		final DiagramEditPart diagramEditPart = UIUtils.getDiagramEditPart();
-		if (diagramEditPart != null) {
-			final ConnectionLayer connectionLayer = (ConnectionLayer) diagramEditPart
-					.getLayer(LayerConstants.CONNECTION_LAYER);
-			for (final Connection connection : getTreeFigureIncomingConnections(
-					connectionLayer, parentTreeNodeEditPart.getFigure())) {
-				final Object object = parentTreeNodeEditPart.getParent()
-						.getViewer().getVisualPartMap()
-						.get(connection.getSourceAnchor().getOwner());
-				if (object instanceof IGraphicalEditPart) {
-					children.add((IGraphicalEditPart) object);
-				}
-			}
-		}
-
-		final IGraphicalEditPart[] orderedChildren = new IGraphicalEditPart[children
-				.size()];
-		final List<IGraphicalEditPart> unorderedChildren = new ArrayList<IGraphicalEditPart>();
-
-		for (final IGraphicalEditPart editPart : children) {
-
-			final int treePosition = getTreeNodePosition(editPart);
-			if (treePosition == -1 || treePosition >= orderedChildren.length
-					|| orderedChildren[treePosition] != null) {
-				unorderedChildren.add(editPart);
-			} else {
-				orderedChildren[treePosition] = editPart;
-			}
-		}
-
-		for (final IGraphicalEditPart editPart : unorderedChildren) {
-			orderedChildren[getNextEmptyIndex(orderedChildren)] = editPart;
-		}
-
-		return new ArrayList<IGraphicalEditPart>(Arrays.asList(orderedChildren));
-	}
-
-	public static int getNextEmptyIndex(IGraphicalEditPart[] list) {
-		for (int index = 0; index < list.length; index++) {
-			if (list[index] == null) {
-				return index;
-			}
-		}
-		return -1;
-	}
-
-	public static int getConstrainedTreeNodePosition(IFigure figure) {
-		final Object constraint = figure.getParent().getLayoutManager()
-				.getConstraint(figure);
-		if (constraint instanceof TreeLayoutConstraint) {
-			return ((TreeLayoutConstraint) constraint).getTreeInnerRankIndex();
-		}
-		return -1;
-	}
-
-	/**
-	 * Returns the parent view of a tree node from the parent view annotation.
-	 * 
-	 * @param editPart
-	 * @return
-	 */
-	public static View getTreeNodeParentView(View view) {
-		final EAnnotation xmiIdAnnotation = view
-				.getEAnnotation(TREE_LAYOUT_ANNOTATION);
-		if (xmiIdAnnotation != null) {
-			return (View) view.eResource().getEObject(
-					xmiIdAnnotation.getDetails().get(TREE_NODE_PARENT_URI));
-		}
-		return null;
-	}
-
-	/**
-	 * Returns the index of a tree node from the view position annotation.
-	 * 
-	 * @param editPart
-	 * @return
-	 */
-	public static int getTreeNodePosition(IGraphicalEditPart editPart) {
-		final EAnnotation xmiIdAnnotation = editPart.getNotationView()
-				.getEAnnotation(TREE_LAYOUT_ANNOTATION);
-		if (xmiIdAnnotation != null) {
-			final String pos = xmiIdAnnotation.getDetails().get(
-					TREE_NODE_POSITION);
-			if (pos != null) {
-				return Integer.parseInt(pos);
-			}
-		}
-		return getConstrainedTreeNodePosition(editPart.getFigure());
-	}
-
-	/**
-	 * Returns a list of {@link View} elements of the given edit parts.
-	 * 
-	 * @param editParts
-	 * @return
-	 */
-	public static List<View> getViews(List<IGraphicalEditPart> editParts) {
-		final List<View> viewList = new ArrayList<View>();
-		for (final IGraphicalEditPart editPart : editParts) {
-			viewList.add(editPart.getNotationView());
-		}
-		return viewList;
-	}
-
-	/**
-	 * Calculates the new tree node list index based on the given location.
-	 * Currently works only with horizontal tree node alignment!
-	 * 
-	 * @param location
-	 * @param siblings
-	 * @return
-	 */
-	public static int getNewTreeNodePosition(Point location,
-			List<IGraphicalEditPart> siblings) {
-
-		int position = -1;
-
-		if (siblings.isEmpty()) {
-			return 0;
-		}
-
-		if (location != null) {
-			int minPosDelta = Integer.MAX_VALUE;
-			int minNegDelta = Integer.MIN_VALUE;
-			int upperIndex = siblings.size() - 1;
-			int lowerIndex = 0;
-			for (int i = 0; i < siblings.size(); i++) {
-
-				// convert to absolute coordinates to consider zoom level.
-				final IFigure figure = siblings.get(i).getFigure();
-				final Rectangle absoluteBounds = figure.getBounds().getCopy();
-				figure.translateToAbsolute(absoluteBounds);
-
-				// TODO: Look for Layout settings. Maybe layout is vertical
-				// aligned.
-				final int deltaY = location.y - absoluteBounds.y;
-
-				if (deltaY > 0 && deltaY < minPosDelta) {
-					if (siblings.size() == 1) {
-						lowerIndex = 1;
-						upperIndex = 1;
-					} else {
-						minPosDelta = deltaY;
-						lowerIndex = i;
-					}
-				} else if (deltaY < 0 && deltaY > minNegDelta) {
-					if (siblings.size() == 1) {
-						lowerIndex = 0;
-						upperIndex = 0;
-					} else {
-						minNegDelta = deltaY;
-						upperIndex = i;
-					}
-				}
-			}
-
-			if (lowerIndex == 0 && upperIndex == 0) {
-				position = 0;
-			} else if (lowerIndex < upperIndex
-					|| (siblings.size() == 1 && lowerIndex == 1 && upperIndex == 1)) {
-				position = upperIndex;
-			} else if (lowerIndex == siblings.size() - 1
-					&& upperIndex == siblings.size() - 1) {
-				position = upperIndex + 1;
-			}
-		}
-		return position;
-	}
-
-	public static void setTreeNodesPositionAnnotation(List<View> viewElements) {
-		if (viewElements != null) {
-			for (int index = 0; index < viewElements.size(); index++) {
-				final View view = viewElements.get(index);
-				EAnnotation xmiIdAnnotation = view
-						.getEAnnotation(TREE_LAYOUT_ANNOTATION);
-				if (xmiIdAnnotation == null) {
-					xmiIdAnnotation = EcoreFactory.eINSTANCE
-							.createEAnnotation();
-					xmiIdAnnotation.setSource(TREE_LAYOUT_ANNOTATION);
-				}
-				xmiIdAnnotation.getDetails().put(TREE_NODE_POSITION,
-						Integer.toString(index));
-				xmiIdAnnotation.setEModelElement(view);
-			}
-		}
-	}
-
-	public static void setTreeNodeParentAnnotation(View child, View parent) {
-		EAnnotation xmiIdAnnotation = child
-				.getEAnnotation(TREE_LAYOUT_ANNOTATION);
-		if (xmiIdAnnotation == null) {
-			xmiIdAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
-			xmiIdAnnotation.setSource(TREE_LAYOUT_ANNOTATION);
-		}
-		xmiIdAnnotation.getDetails().put(TREE_NODE_PARENT_URI,
-				parent.eResource().getURIFragment(parent));
-		xmiIdAnnotation.setEModelElement(child);
-	}
-
-	// private static void setParentAnnotation(IFigure childFigure,
-	// IFigure parentFigure, EditPartViewer viewer) {
-	// final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) viewer
-	// .getVisualPartMap().get(parentFigure);
-	// final IGraphicalEditPart childEditPart = (IGraphicalEditPart) viewer
-	// .getVisualPartMap().get(childFigure);
-	// try {
-	// CommandUtil
-	// .executeUndoableOperation(new SetTreeParentAnnotationCommand(
-	// childEditPart.getNotationView(), parentEditPart
-	// .getNotationView()));
-	// } catch (final ExecutionException e) {
-	// e.printStackTrace();
-	// }
-	// }
-	//
-	// private static IFigure getAnnotatedParentFigure(IFigure figure,
-	// EditPartViewer viewer) {
-	// final IGraphicalEditPart editPart = (IGraphicalEditPart) viewer
-	// .getVisualPartMap().get(figure);
-	// final View view = editPart.getNotationView();
-	//
-	// final EAnnotation xmiIdAnnotation = view
-	// .getEAnnotation(TREE_LAYOUT_ANNOTATION);
-	//
-	// if (xmiIdAnnotation != null) {
-	// final String parentURI = xmiIdAnnotation.getDetails().get(
-	// TREE_NODE_PARENT_URI);
-	// if (parentURI != null) {
-	// final EObject object = view.eResource().getEObject(parentURI);
-	// final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) viewer
-	// .getEditPartRegistry().get(object);
-	// return parentEditPart != null ? parentEditPart.getFigure()
-	// : null;
-	// }
-	// }
-	// return null;
-	// }
-
-	/**
-	 * Returns only elements parent figure is a direct parent. Indirect
-	 * connections are filtered out. Use if children can have many parents.
-	 * 
-	 * @param connectionLayer
-	 * @param parentFigure
-	 * @return
-	 */
-	public static List<Connection> getTreeFigureIncomingConnections(
-			ConnectionLayer connectionLayer, IFigure parentFigure) {
-
-		final List<Connection> connectionList = getIncomingConnections(
-				connectionLayer, parentFigure);
-		final List<Connection> indirectChildren = new ArrayList<Connection>();
-
-		final int parentFigureTreeLevel = getDeepestTreeLevel(connectionLayer,
-				parentFigure);
-		for (final Connection connection : connectionList) {
-			final IFigure childFigure = connection.getSourceAnchor().getOwner();
-
-			final int childTreeLevel = getDeepestTreeLevel(connectionLayer,
-					childFigure);
-
-			if (childTreeLevel == parentFigureTreeLevel + 1) {
-				
-				//get LayoutConstraint of child Figure;
-				Object object = parentFigure.getParent().getLayoutManager()
-						.getConstraint(childFigure);
-				if (object instanceof TreeLayoutConstraint) {
-					TreeLayoutConstraint childConstraint = (TreeLayoutConstraint) object;
-					
-					final IFigure constrainedParentFig = childConstraint
-							.getTreeParentFigure();
-					
-					if (constrainedParentFig == null) {
-						childConstraint.setTreeParentFigure(parentFigure);
-					} else if (constrainedParentFig != parentFigure) {
-							indirectChildren.add(connection);
-					}
-				}
-			} 
-			else {
-				indirectChildren.add(connection);
-			}
-		}
-		connectionList.removeAll(indirectChildren);
-		return connectionList;
-	}
-
-	private static int getDeepestTreeLevel(ConnectionLayer connectionLayer,
-			IFigure figure) {
-		final List<Connection> connectionList = getOutgoingConnections(
-				connectionLayer, figure);
-		if (connectionList.size() > 0) {
-			final int[] ret = new int[connectionList.size()];
-			for (int i = 0; i < connectionList.size(); i++) {
-				ret[i] = 1 + getDeepestTreeLevel(connectionLayer,
-						connectionList.get(i).getTargetAnchor().getOwner());
-			}
-			int maxLevel = ret[0];
-			if (ret.length > 1) {
-				for (int i = 1; i < ret.length; i++) {
-					if (ret[i] > maxLevel) {
-						maxLevel = ret[i];
-					}
-				}
-			}
-			return maxLevel;
-		}
-		return 0;
-	}
-
-	/**
-	 * Returns incoming connection figures of the figure parameter.
-	 * 
-	 * @param connectionLayer
-	 * @param figure
-	 * @return
-	 */
-	public static List<Connection> getIncomingConnections(
-			ConnectionLayer connectionLayer, IFigure figure) {
-
-		final List<Connection> incomingConnectionList = new ArrayList<Connection>();
-
-		for (final Object object : connectionLayer.getChildren()) {
-			if (object instanceof Connection) {
-				final Connection connection = (Connection) object;
-				if (connection.getTargetAnchor().getOwner() == figure) {
-					incomingConnectionList.add(connection);
-				}
-			}
-		}
-		return incomingConnectionList;
-	}
-
-	/**
-	 * Returns outgoing connection figures of the figure parameter.
-	 * 
-	 * @param connectionLayer
-	 * @param figure
-	 * @return
-	 */
-	public static List<Connection> getOutgoingConnections(
-			ConnectionLayer connectionLayer, IFigure figure) {
-
-		final List<Connection> outgoingConnectionList = new ArrayList<Connection>();
-
-		for (final Object object : connectionLayer.getChildren()) {
-			if (object instanceof Connection) {
-				final Connection connection = (Connection) object;
-				if (connection.getSourceAnchor().getOwner() == figure) {
-					outgoingConnectionList.add(connection);
-				}
-			}
-		}
-		return outgoingConnectionList;
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.ConnectionLayer;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gef.LayerConstants;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ * 
+ */
+public class TreeLayoutUtil {
+
+	public static final String TREE_LAYOUT_ANNOTATION = "TreeLayoutAnnotation";
+
+	public static final String TREE_NODE_POSITION = "TreeNodePosition";
+
+	public static final String TREE_NODE_PARENT_URI = "TreeNodeParentURI";
+
+	/**
+	 * Util for TreeLayouting
+	 */
+	private TreeLayoutUtil() {
+		// not intended to be instantiated.
+	}
+
+	public static List<IGraphicalEditPart> getSiblings(IGraphicalEditPart child) {
+
+		final View parentView = TreeLayoutUtil.getTreeNodeParentView(child
+				.getNotationView());
+
+		if (parentView != null) {
+			final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) child
+					.findEditPart(child.getParent(), parentView.getElement());
+			if (parentEditPart != null) {
+				final List<IGraphicalEditPart> treeChildren = getOrderedTreeChildren(parentEditPart);
+				if (treeChildren.remove(child)) {
+					return treeChildren;
+				}
+			}
+		}
+		return Collections.emptyList();
+	}
+
+	public static ArrayList<IGraphicalEditPart> getOrderedTreeChildren(
+			IGraphicalEditPart parentTreeNodeEditPart) {
+
+		final List<IGraphicalEditPart> children = new ArrayList<IGraphicalEditPart>();
+
+		final DiagramEditPart diagramEditPart = UIUtils.getDiagramEditPart();
+		if (diagramEditPart != null) {
+			final ConnectionLayer connectionLayer = (ConnectionLayer) diagramEditPart
+					.getLayer(LayerConstants.CONNECTION_LAYER);
+			for (final Connection connection : getTreeFigureIncomingConnections(
+					connectionLayer, parentTreeNodeEditPart.getFigure())) {
+				final Object object = parentTreeNodeEditPart.getParent()
+						.getViewer().getVisualPartMap()
+						.get(connection.getSourceAnchor().getOwner());
+				if (object instanceof IGraphicalEditPart) {
+					children.add((IGraphicalEditPart) object);
+				}
+			}
+		}
+
+		final IGraphicalEditPart[] orderedChildren = new IGraphicalEditPart[children
+				.size()];
+		final List<IGraphicalEditPart> unorderedChildren = new ArrayList<IGraphicalEditPart>();
+
+		for (final IGraphicalEditPart editPart : children) {
+
+			final int treePosition = getTreeNodePosition(editPart);
+			if (treePosition == -1 || treePosition >= orderedChildren.length
+					|| orderedChildren[treePosition] != null) {
+				unorderedChildren.add(editPart);
+			} else {
+				orderedChildren[treePosition] = editPart;
+			}
+		}
+
+		for (final IGraphicalEditPart editPart : unorderedChildren) {
+			orderedChildren[getNextEmptyIndex(orderedChildren)] = editPart;
+		}
+
+		return new ArrayList<IGraphicalEditPart>(Arrays.asList(orderedChildren));
+	}
+
+	public static int getNextEmptyIndex(IGraphicalEditPart[] list) {
+		for (int index = 0; index < list.length; index++) {
+			if (list[index] == null) {
+				return index;
+			}
+		}
+		return -1;
+	}
+
+	public static int getConstrainedTreeNodePosition(IFigure figure) {
+		final Object constraint = figure.getParent().getLayoutManager()
+				.getConstraint(figure);
+		if (constraint instanceof TreeLayoutConstraint) {
+			return ((TreeLayoutConstraint) constraint).getTreeInnerRankIndex();
+		}
+		return -1;
+	}
+
+	/**
+	 * Returns the parent view of a tree node from the parent view annotation.
+	 * 
+	 * @param editPart
+	 * @return
+	 */
+	public static View getTreeNodeParentView(View view) {
+		final EAnnotation xmiIdAnnotation = view
+				.getEAnnotation(TREE_LAYOUT_ANNOTATION);
+		if (xmiIdAnnotation != null) {
+			return (View) view.eResource().getEObject(
+					xmiIdAnnotation.getDetails().get(TREE_NODE_PARENT_URI));
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the index of a tree node from the view position annotation.
+	 * 
+	 * @param editPart
+	 * @return
+	 */
+	public static int getTreeNodePosition(IGraphicalEditPart editPart) {
+		final EAnnotation xmiIdAnnotation = editPart.getNotationView()
+				.getEAnnotation(TREE_LAYOUT_ANNOTATION);
+		if (xmiIdAnnotation != null) {
+			final String pos = xmiIdAnnotation.getDetails().get(
+					TREE_NODE_POSITION);
+			if (pos != null) {
+				return Integer.parseInt(pos);
+			}
+		}
+		return getConstrainedTreeNodePosition(editPart.getFigure());
+	}
+
+	/**
+	 * Returns a list of {@link View} elements of the given edit parts.
+	 * 
+	 * @param editParts
+	 * @return
+	 */
+	public static List<View> getViews(List<IGraphicalEditPart> editParts) {
+		final List<View> viewList = new ArrayList<View>();
+		for (final IGraphicalEditPart editPart : editParts) {
+			viewList.add(editPart.getNotationView());
+		}
+		return viewList;
+	}
+
+	/**
+	 * Calculates the new tree node list index based on the given location.
+	 * Currently works only with horizontal tree node alignment!
+	 * 
+	 * @param location
+	 * @param siblings
+	 * @return
+	 */
+	public static int getNewTreeNodePosition(Point location,
+			List<IGraphicalEditPart> siblings) {
+
+		int position = -1;
+
+		if (siblings.isEmpty()) {
+			return 0;
+		}
+
+		if (location != null) {
+			int minPosDelta = Integer.MAX_VALUE;
+			int minNegDelta = Integer.MIN_VALUE;
+			int upperIndex = siblings.size() - 1;
+			int lowerIndex = 0;
+			for (int i = 0; i < siblings.size(); i++) {
+
+				// convert to absolute coordinates to consider zoom level.
+				final IFigure figure = siblings.get(i).getFigure();
+				final Rectangle absoluteBounds = figure.getBounds().getCopy();
+				figure.translateToAbsolute(absoluteBounds);
+
+				// TODO: Look for Layout settings. Maybe layout is vertical
+				// aligned.
+				final int deltaY = location.y - absoluteBounds.y;
+
+				if (deltaY > 0 && deltaY < minPosDelta) {
+					if (siblings.size() == 1) {
+						lowerIndex = 1;
+						upperIndex = 1;
+					} else {
+						minPosDelta = deltaY;
+						lowerIndex = i;
+					}
+				} else if (deltaY < 0 && deltaY > minNegDelta) {
+					if (siblings.size() == 1) {
+						lowerIndex = 0;
+						upperIndex = 0;
+					} else {
+						minNegDelta = deltaY;
+						upperIndex = i;
+					}
+				}
+			}
+
+			if (lowerIndex == 0 && upperIndex == 0) {
+				position = 0;
+			} else if (lowerIndex < upperIndex
+					|| (siblings.size() == 1 && lowerIndex == 1 && upperIndex == 1)) {
+				position = upperIndex;
+			} else if (lowerIndex == siblings.size() - 1
+					&& upperIndex == siblings.size() - 1) {
+				position = upperIndex + 1;
+			}
+		}
+		return position;
+	}
+
+	public static void setTreeNodesPositionAnnotation(List<View> viewElements) {
+		if (viewElements != null) {
+			for (int index = 0; index < viewElements.size(); index++) {
+				final View view = viewElements.get(index);
+				EAnnotation xmiIdAnnotation = view
+						.getEAnnotation(TREE_LAYOUT_ANNOTATION);
+				if (xmiIdAnnotation == null) {
+					xmiIdAnnotation = EcoreFactory.eINSTANCE
+							.createEAnnotation();
+					xmiIdAnnotation.setSource(TREE_LAYOUT_ANNOTATION);
+				}
+				xmiIdAnnotation.getDetails().put(TREE_NODE_POSITION,
+						Integer.toString(index));
+				xmiIdAnnotation.setEModelElement(view);
+			}
+		}
+	}
+
+	public static void setTreeNodeParentAnnotation(View child, View parent) {
+		EAnnotation xmiIdAnnotation = child
+				.getEAnnotation(TREE_LAYOUT_ANNOTATION);
+		if (xmiIdAnnotation == null) {
+			xmiIdAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+			xmiIdAnnotation.setSource(TREE_LAYOUT_ANNOTATION);
+		}
+		xmiIdAnnotation.getDetails().put(TREE_NODE_PARENT_URI,
+				parent.eResource().getURIFragment(parent));
+		xmiIdAnnotation.setEModelElement(child);
+	}
+
+	// private static void setParentAnnotation(IFigure childFigure,
+	// IFigure parentFigure, EditPartViewer viewer) {
+	// final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) viewer
+	// .getVisualPartMap().get(parentFigure);
+	// final IGraphicalEditPart childEditPart = (IGraphicalEditPart) viewer
+	// .getVisualPartMap().get(childFigure);
+	// try {
+	// CommandUtil
+	// .executeUndoableOperation(new SetTreeParentAnnotationCommand(
+	// childEditPart.getNotationView(), parentEditPart
+	// .getNotationView()));
+	// } catch (final ExecutionException e) {
+	// e.printStackTrace();
+	// }
+	// }
+	//
+	// private static IFigure getAnnotatedParentFigure(IFigure figure,
+	// EditPartViewer viewer) {
+	// final IGraphicalEditPart editPart = (IGraphicalEditPart) viewer
+	// .getVisualPartMap().get(figure);
+	// final View view = editPart.getNotationView();
+	//
+	// final EAnnotation xmiIdAnnotation = view
+	// .getEAnnotation(TREE_LAYOUT_ANNOTATION);
+	//
+	// if (xmiIdAnnotation != null) {
+	// final String parentURI = xmiIdAnnotation.getDetails().get(
+	// TREE_NODE_PARENT_URI);
+	// if (parentURI != null) {
+	// final EObject object = view.eResource().getEObject(parentURI);
+	// final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) viewer
+	// .getEditPartRegistry().get(object);
+	// return parentEditPart != null ? parentEditPart.getFigure()
+	// : null;
+	// }
+	// }
+	// return null;
+	// }
+
+	/**
+	 * Returns only elements parent figure is a direct parent. Indirect
+	 * connections are filtered out. Use if children can have many parents.
+	 * 
+	 * @param connectionLayer
+	 * @param parentFigure
+	 * @return
+	 */
+	public static List<Connection> getTreeFigureIncomingConnections(
+			ConnectionLayer connectionLayer, IFigure parentFigure) {
+
+		final List<Connection> connectionList = getIncomingConnections(
+				connectionLayer, parentFigure);
+		final List<Connection> indirectChildren = new ArrayList<Connection>();
+
+		final int parentFigureTreeLevel = getDeepestTreeLevel(connectionLayer,
+				parentFigure);
+		for (final Connection connection : connectionList) {
+			final IFigure childFigure = connection.getSourceAnchor().getOwner();
+
+			final int childTreeLevel = getDeepestTreeLevel(connectionLayer,
+					childFigure);
+
+			if (childTreeLevel == parentFigureTreeLevel + 1) {
+				
+				//get LayoutConstraint of child Figure;
+				Object object = parentFigure.getParent().getLayoutManager()
+						.getConstraint(childFigure);
+				if (object instanceof TreeLayoutConstraint) {
+					TreeLayoutConstraint childConstraint = (TreeLayoutConstraint) object;
+					
+					final IFigure constrainedParentFig = childConstraint
+							.getTreeParentFigure();
+					
+					if (constrainedParentFig == null) {
+						childConstraint.setTreeParentFigure(parentFigure);
+					} else if (constrainedParentFig != parentFigure) {
+							indirectChildren.add(connection);
+					}
+				}
+			} 
+			else {
+				indirectChildren.add(connection);
+			}
+		}
+		connectionList.removeAll(indirectChildren);
+		return connectionList;
+	}
+
+	private static int getDeepestTreeLevel(ConnectionLayer connectionLayer,
+			IFigure figure) {
+		final List<Connection> connectionList = getOutgoingConnections(
+				connectionLayer, figure);
+		if (connectionList.size() > 0) {
+			final int[] ret = new int[connectionList.size()];
+			for (int i = 0; i < connectionList.size(); i++) {
+				ret[i] = 1 + getDeepestTreeLevel(connectionLayer,
+						connectionList.get(i).getTargetAnchor().getOwner());
+			}
+			int maxLevel = ret[0];
+			if (ret.length > 1) {
+				for (int i = 1; i < ret.length; i++) {
+					if (ret[i] > maxLevel) {
+						maxLevel = ret[i];
+					}
+				}
+			}
+			return maxLevel;
+		}
+		return 0;
+	}
+
+	/**
+	 * Returns incoming connection figures of the figure parameter.
+	 * 
+	 * @param connectionLayer
+	 * @param figure
+	 * @return
+	 */
+	public static List<Connection> getIncomingConnections(
+			ConnectionLayer connectionLayer, IFigure figure) {
+
+		final List<Connection> incomingConnectionList = new ArrayList<Connection>();
+
+		for (final Object object : connectionLayer.getChildren()) {
+			if (object instanceof Connection) {
+				final Connection connection = (Connection) object;
+				if (connection.getTargetAnchor().getOwner() == figure) {
+					incomingConnectionList.add(connection);
+				}
+			}
+		}
+		return incomingConnectionList;
+	}
+
+	/**
+	 * Returns outgoing connection figures of the figure parameter.
+	 * 
+	 * @param connectionLayer
+	 * @param figure
+	 * @return
+	 */
+	public static List<Connection> getOutgoingConnections(
+			ConnectionLayer connectionLayer, IFigure figure) {
+
+		final List<Connection> outgoingConnectionList = new ArrayList<Connection>();
+
+		for (final Object object : connectionLayer.getChildren()) {
+			if (object instanceof Connection) {
+				final Connection connection = (Connection) object;
+				if (connection.getSourceAnchor().getOwner() == figure) {
+					outgoingConnectionList.add(connection);
+				}
+			}
+		}
+		return outgoingConnectionList;
+	}
+}

+ 56 - 56
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/UIUtils.java

@@ -1,56 +1,56 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout;
-
-import org.eclipse.emf.ecore.EObject;
-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.resources.editor.parts.DiagramDocumentEditor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Utility class for UI actions.
- * 
- * @author Markus Muehlbrandt
- */
-public final class UIUtils {
-	private UIUtils() {
-		// This class is not intended to be instantiated.
-	}
-
-	public static DiagramDocumentEditor getActiveEditor() {
-		final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-		final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
-		if (workbenchPage != null) {
-			final IEditorPart editor = workbenchPage.getActiveEditor();
-			if (editor instanceof DiagramDocumentEditor) {
-				return (DiagramDocumentEditor)editor;
-			}
-		}
-		return null;
-	}
-
-	public static DiagramEditPart getDiagramEditPart() {
-		final DiagramDocumentEditor editor = getActiveEditor();
-		if (editor != null) {
-			return editor.getDiagramEditPart();
-		}
-		return null;
-	}
-
-	public static IGraphicalEditPart getEditPart(EObject eObject) {
-		final DiagramEditPart ep = getActiveEditor().getDiagramEditPart();
-		return (IGraphicalEditPart)ep.findEditPart(ep, eObject);
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout;
+
+import org.eclipse.emf.ecore.EObject;
+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.resources.editor.parts.DiagramDocumentEditor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Utility class for UI actions.
+ * 
+ * @author Markus Muehlbrandt
+ */
+public final class UIUtils {
+	private UIUtils() {
+		// This class is not intended to be instantiated.
+	}
+
+	public static DiagramDocumentEditor getActiveEditor() {
+		final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+		if (workbenchPage != null) {
+			final IEditorPart editor = workbenchPage.getActiveEditor();
+			if (editor instanceof DiagramDocumentEditor) {
+				return (DiagramDocumentEditor)editor;
+			}
+		}
+		return null;
+	}
+
+	public static DiagramEditPart getDiagramEditPart() {
+		final DiagramDocumentEditor editor = getActiveEditor();
+		if (editor != null) {
+			return editor.getDiagramEditPart();
+		}
+		return null;
+	}
+
+	public static IGraphicalEditPart getEditPart(EObject eObject) {
+		final DiagramEditPart ep = getActiveEditor().getDiagramEditPart();
+		return (IGraphicalEditPart)ep.findEditPart(ep, eObject);
+	}
+}

+ 60 - 60
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/CommandUtil.java

@@ -1,60 +1,60 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public final class CommandUtil {
-
-	private CommandUtil() {
-	}
-
-	public static List<IFile> getAffectedFiles(ResourceSet resourceSet) {
-		final List<IFile> affectedFiles = new ArrayList<IFile>();
-		final TransactionalEditingDomain domain = TransactionUtil
-				.getEditingDomain(resourceSet);
-		for (final Resource next : resourceSet.getResources()) {
-			if (!domain.isReadOnly(next)) {
-				final IFile file = WorkspaceSynchronizer
-						.getUnderlyingFile(next);
-				Assert.isNotNull(file, next.getURI() + "");
-				affectedFiles.add(file);
-			}
-		}
-		return affectedFiles;
-	}
-	
-	public static IStatus executeUndoableOperation(IUndoableOperation undoableOperation)
-			throws ExecutionException {
-		IOperationHistory history = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
-		return history.execute(undoableOperation, new NullProgressMonitor(), null);
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public final class CommandUtil {
+
+	private CommandUtil() {
+	}
+
+	public static List<IFile> getAffectedFiles(ResourceSet resourceSet) {
+		final List<IFile> affectedFiles = new ArrayList<IFile>();
+		final TransactionalEditingDomain domain = TransactionUtil
+				.getEditingDomain(resourceSet);
+		for (final Resource next : resourceSet.getResources()) {
+			if (!domain.isReadOnly(next)) {
+				final IFile file = WorkspaceSynchronizer
+						.getUnderlyingFile(next);
+				Assert.isNotNull(file, next.getURI() + "");
+				affectedFiles.add(file);
+			}
+		}
+		return affectedFiles;
+	}
+	
+	public static IStatus executeUndoableOperation(IUndoableOperation undoableOperation)
+			throws ExecutionException {
+		IOperationHistory history = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
+		return history.execute(undoableOperation, new NullProgressMonitor(), null);
+	}
+}

+ 70 - 70
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/InitializeTreeNodeAnnotationsCommand.java

@@ -1,70 +1,70 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.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.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class InitializeTreeNodeAnnotationsCommand extends
-		AbstractTransactionalCommand {
-
-	private final IGraphicalEditPart treeRootNodeEditPart;
-
-	public InitializeTreeNodeAnnotationsCommand(
-			TransactionalEditingDomain domain,
-			IGraphicalEditPart treeRootNodeEditPart) {
-		super(domain, "InitializeTreeNodeAnnotationsCommand", null);
-		this.treeRootNodeEditPart = treeRootNodeEditPart;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-		if (CommandUtil.executeUndoableOperation(
-				annotateElements(TreeLayoutUtil
-						.getOrderedTreeChildren(treeRootNodeEditPart))).isOK()) {
-			return CommandResult.newOKCommandResult();
-		}
-		return CommandResult.newErrorCommandResult(new ExecutionException(
-				"Error while annotating model elements!"));
-	}
-
-	private CompositeTransactionalCommand annotateElements(
-			List<IGraphicalEditPart> elements) {
-		final CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(
-				getEditingDomain(), "AnnotateChildren");
-		cmd.add(new SetTreeNodesPositionAnnotationCommand(getEditingDomain(),
-				TreeLayoutUtil.getViews(elements)));
-		for (final IGraphicalEditPart editPart : elements) {
-			final List<IGraphicalEditPart> children = TreeLayoutUtil
-					.getOrderedTreeChildren(editPart);
-			if (!children.isEmpty()) {
-				cmd.add(annotateElements(children));
-			}
-		}
-		return cmd;
-	}
-
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.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.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class InitializeTreeNodeAnnotationsCommand extends
+		AbstractTransactionalCommand {
+
+	private final IGraphicalEditPart treeRootNodeEditPart;
+
+	public InitializeTreeNodeAnnotationsCommand(
+			TransactionalEditingDomain domain,
+			IGraphicalEditPart treeRootNodeEditPart) {
+		super(domain, "InitializeTreeNodeAnnotationsCommand", null);
+		this.treeRootNodeEditPart = treeRootNodeEditPart;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+		if (CommandUtil.executeUndoableOperation(
+				annotateElements(TreeLayoutUtil
+						.getOrderedTreeChildren(treeRootNodeEditPart))).isOK()) {
+			return CommandResult.newOKCommandResult();
+		}
+		return CommandResult.newErrorCommandResult(new ExecutionException(
+				"Error while annotating model elements!"));
+	}
+
+	private CompositeTransactionalCommand annotateElements(
+			List<IGraphicalEditPart> elements) {
+		final CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(
+				getEditingDomain(), "AnnotateChildren");
+		cmd.add(new SetTreeNodesPositionAnnotationCommand(getEditingDomain(),
+				TreeLayoutUtil.getViews(elements)));
+		for (final IGraphicalEditPart editPart : elements) {
+			final List<IGraphicalEditPart> children = TreeLayoutUtil
+					.getOrderedTreeChildren(editPart);
+			if (!children.isEmpty()) {
+				cmd.add(annotateElements(children));
+			}
+		}
+		return cmd;
+	}
+
+}

+ 52 - 52
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/SetTreeNodesPositionAnnotationCommand.java

@@ -1,52 +1,52 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.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.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.View;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class SetTreeNodesPositionAnnotationCommand extends
-		AbstractTransactionalCommand {
-
-	private final List<View> viewElements;
-
-	public SetTreeNodesPositionAnnotationCommand(
-			TransactionalEditingDomain domain, List<View> viewElements) {
-		super(domain, "SetTreeNodesPositionAnnotationCommand", null);
-		this.viewElements = viewElements;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-
-		if (viewElements != null) {
-			TreeLayoutUtil.setTreeNodesPositionAnnotation(viewElements);
-			return CommandResult.newOKCommandResult();
-		}
-
-		return CommandResult
-				.newErrorCommandResult("SetTreeNodesPositionAnnotationCommand: viewElements is null!");
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.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.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class SetTreeNodesPositionAnnotationCommand extends
+		AbstractTransactionalCommand {
+
+	private final List<View> viewElements;
+
+	public SetTreeNodesPositionAnnotationCommand(
+			TransactionalEditingDomain domain, List<View> viewElements) {
+		super(domain, "SetTreeNodesPositionAnnotationCommand", null);
+		this.viewElements = viewElements;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+
+		if (viewElements != null) {
+			TreeLayoutUtil.setTreeNodesPositionAnnotation(viewElements);
+			return CommandResult.newOKCommandResult();
+		}
+
+		return CommandResult
+				.newErrorCommandResult("SetTreeNodesPositionAnnotationCommand: viewElements is null!");
+	}
+}

+ 46 - 46
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/SetTreeParentAnnotationCommand.java

@@ -1,46 +1,46 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.commands;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.View;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class SetTreeParentAnnotationCommand extends
-		AbstractTransactionalCommand {
-
-	private final View child;
-
-	private final View parent;
-
-	public SetTreeParentAnnotationCommand(View child, View parent) {
-		super(TransactionUtil.getEditingDomain(child),
-				"SetTreeParentAnnotation", null);
-		this.child = child;
-		this.parent = parent;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-		TreeLayoutUtil.setTreeNodeParentAnnotation(child, parent);
-		return CommandResult.newOKCommandResult();
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class SetTreeParentAnnotationCommand extends
+		AbstractTransactionalCommand {
+
+	private final View child;
+
+	private final View parent;
+
+	public SetTreeParentAnnotationCommand(View child, View parent) {
+		super(TransactionUtil.getEditingDomain(child),
+				"SetTreeParentAnnotation", null);
+		this.child = child;
+		this.parent = parent;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+		TreeLayoutUtil.setTreeNodeParentAnnotation(child, parent);
+		return CommandResult.newOKCommandResult();
+	}
+}

+ 94 - 94
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnCreationCommand.java

@@ -1,94 +1,94 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.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.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.View;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class UpdateAnnotationsOnCreationCommand extends
-		AbstractTransactionalCommand {
-
-	public static final String TREE_NODE_PARENT = "TreeNodeParent";
-
-	public static final String ELEMENTS_TO_MERGE = "ElementsToMerge";
-
-	private final CreateViewAndElementRequest request;
-
-	public UpdateAnnotationsOnCreationCommand(
-			TransactionalEditingDomain domain,
-			CreateViewAndElementRequest request) {
-		super(domain, "Update Annotations On Creation", null);
-		this.request = request;
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-		final Object parent = request.getExtendedData().get(TREE_NODE_PARENT);
-		if (parent != null && parent instanceof IGraphicalEditPart) {
-			final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) parent;
-			final List<IGraphicalEditPart> editPartList = TreeLayoutUtil
-					.getOrderedTreeChildren(parentEditPart);
-
-			// Look if creation is done in context of merging elements, remove
-			// elements to merge and update
-			// annotation of elements.
-			final Object object = request.getExtendedData().get(
-					ELEMENTS_TO_MERGE);
-			if (object != null && object instanceof List<?>) {
-				final List<IGraphicalEditPart> elements = (List<IGraphicalEditPart>) object;
-				editPartList.removeAll(elements);
-				final List<View> viewList = TreeLayoutUtil.getViews(elements);
-				TreeLayoutUtil.setTreeNodesPositionAnnotation(viewList);
-			}
-
-			final int position = TreeLayoutUtil.getNewTreeNodePosition(
-					request.getLocation(), editPartList);
-			if (position != -1 && !request.getViewDescriptors().isEmpty()) {
-				final ViewDescriptor viewDescriptor = request
-						.getViewDescriptors().get(0);
-				final View newView = (View) viewDescriptor
-						.getAdapter(View.class);
-				final List<View> viewList = TreeLayoutUtil
-						.getViews(editPartList);
-				if (position == viewList.size()) {
-					viewList.add(newView);
-				} else {
-					viewList.add(position, newView);
-				}
-				TreeLayoutUtil.setTreeNodesPositionAnnotation(viewList);
-				TreeLayoutUtil.setTreeNodeParentAnnotation(newView,
-						parentEditPart.getNotationView());
-
-				return CommandResult.newOKCommandResult();
-			}
-		}
-		return CommandResult.newErrorCommandResult(new ExecutionException(
-				"ParentTreeNode EditPart not found."));
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.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.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class UpdateAnnotationsOnCreationCommand extends
+		AbstractTransactionalCommand {
+
+	public static final String TREE_NODE_PARENT = "TreeNodeParent";
+
+	public static final String ELEMENTS_TO_MERGE = "ElementsToMerge";
+
+	private final CreateViewAndElementRequest request;
+
+	public UpdateAnnotationsOnCreationCommand(
+			TransactionalEditingDomain domain,
+			CreateViewAndElementRequest request) {
+		super(domain, "Update Annotations On Creation", null);
+		this.request = request;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+		final Object parent = request.getExtendedData().get(TREE_NODE_PARENT);
+		if (parent != null && parent instanceof IGraphicalEditPart) {
+			final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) parent;
+			final List<IGraphicalEditPart> editPartList = TreeLayoutUtil
+					.getOrderedTreeChildren(parentEditPart);
+
+			// Look if creation is done in context of merging elements, remove
+			// elements to merge and update
+			// annotation of elements.
+			final Object object = request.getExtendedData().get(
+					ELEMENTS_TO_MERGE);
+			if (object != null && object instanceof List<?>) {
+				final List<IGraphicalEditPart> elements = (List<IGraphicalEditPart>) object;
+				editPartList.removeAll(elements);
+				final List<View> viewList = TreeLayoutUtil.getViews(elements);
+				TreeLayoutUtil.setTreeNodesPositionAnnotation(viewList);
+			}
+
+			final int position = TreeLayoutUtil.getNewTreeNodePosition(
+					request.getLocation(), editPartList);
+			if (position != -1 && !request.getViewDescriptors().isEmpty()) {
+				final ViewDescriptor viewDescriptor = request
+						.getViewDescriptors().get(0);
+				final View newView = (View) viewDescriptor
+						.getAdapter(View.class);
+				final List<View> viewList = TreeLayoutUtil
+						.getViews(editPartList);
+				if (position == viewList.size()) {
+					viewList.add(newView);
+				} else {
+					viewList.add(position, newView);
+				}
+				TreeLayoutUtil.setTreeNodesPositionAnnotation(viewList);
+				TreeLayoutUtil.setTreeNodeParentAnnotation(newView,
+						parentEditPart.getNotationView());
+
+				return CommandResult.newOKCommandResult();
+			}
+		}
+		return CommandResult.newErrorCommandResult(new ExecutionException(
+				"ParentTreeNode EditPart not found."));
+	}
+}

+ 61 - 61
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnDestroyElementCommand.java

@@ -1,61 +1,61 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.commands;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-import org.yakindu.base.gmf.runtime.treelayout.UIUtils;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class UpdateAnnotationsOnDestroyElementCommand extends
-		AbstractTransactionalCommand {
-
-	private final DestroyElementRequest request;
-
-	private final IGraphicalEditPart parentTreeNodeEditPart;
-
-	public UpdateAnnotationsOnDestroyElementCommand(
-			DestroyElementRequest request,
-			IGraphicalEditPart parentTreeNodeEditPart) {
-		super(request.getEditingDomain(), request.getLabel(), null);
-		Assert.isNotNull(request, "request is null.");
-		Assert.isNotNull(parentTreeNodeEditPart,
-				"parentTreeNodeEditPart is null.");
-		this.request = request;
-		this.parentTreeNodeEditPart = parentTreeNodeEditPart;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-		parentTreeNodeEditPart.getParent().refresh();
-		final List<IGraphicalEditPart> treeChildren = TreeLayoutUtil
-				.getOrderedTreeChildren(parentTreeNodeEditPart);
-		treeChildren.remove(UIUtils.getEditPart(request.getElementToDestroy()));
-		TreeLayoutUtil.setTreeNodesPositionAnnotation(TreeLayoutUtil
-				.getViews(treeChildren));
-
-		return CommandResult.newOKCommandResult();
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.commands;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+import org.yakindu.base.gmf.runtime.treelayout.UIUtils;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class UpdateAnnotationsOnDestroyElementCommand extends
+		AbstractTransactionalCommand {
+
+	private final DestroyElementRequest request;
+
+	private final IGraphicalEditPart parentTreeNodeEditPart;
+
+	public UpdateAnnotationsOnDestroyElementCommand(
+			DestroyElementRequest request,
+			IGraphicalEditPart parentTreeNodeEditPart) {
+		super(request.getEditingDomain(), request.getLabel(), null);
+		Assert.isNotNull(request, "request is null.");
+		Assert.isNotNull(parentTreeNodeEditPart,
+				"parentTreeNodeEditPart is null.");
+		this.request = request;
+		this.parentTreeNodeEditPart = parentTreeNodeEditPart;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+		parentTreeNodeEditPart.getParent().refresh();
+		final List<IGraphicalEditPart> treeChildren = TreeLayoutUtil
+				.getOrderedTreeChildren(parentTreeNodeEditPart);
+		treeChildren.remove(UIUtils.getEditPart(request.getElementToDestroy()));
+		TreeLayoutUtil.setTreeNodesPositionAnnotation(TreeLayoutUtil
+				.getViews(treeChildren));
+
+		return CommandResult.newOKCommandResult();
+	}
+}

+ 84 - 84
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnMoveCommand.java

@@ -1,84 +1,84 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.commands;
-
-import java.util.ArrayList;
-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.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.View;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutConstraint;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class UpdateAnnotationsOnMoveCommand extends
-		AbstractTransactionalCommand {
-
-	private final IGraphicalEditPart editPart;
-
-	private final TreeLayoutConstraint layoutConstraint;
-
-	public UpdateAnnotationsOnMoveCommand(
-			TransactionalEditingDomain editingDomain,
-			IGraphicalEditPart editPart, TreeLayoutConstraint layoutConstraint) {
-		super(editingDomain, "Move TreeNode", null);
-		this.editPart = editPart;
-		this.layoutConstraint = layoutConstraint;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-
-		final View parentView = TreeLayoutUtil.getTreeNodeParentView(editPart
-				.getNotationView());
-
-		if (parentView != null) {
-			final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) editPart
-					.findEditPart(editPart.getParent(), parentView.getElement());
-			if (parentEditPart != null) {
-				final List<IGraphicalEditPart> treeChildren = new ArrayList<IGraphicalEditPart>(
-
-				TreeLayoutUtil.getOrderedTreeChildren(parentEditPart));
-				if (!treeChildren.isEmpty()) {
-					final int oldPos = treeChildren.indexOf(editPart);
-					final int newPos = layoutConstraint.getTreeInnerRankIndex();
-
-					if (newPos != -1) {
-						if (oldPos != newPos) {
-							final IGraphicalEditPart element = treeChildren
-									.get(oldPos);
-							treeChildren.remove(oldPos);
-							treeChildren.add(newPos, element);
-							TreeLayoutUtil
-									.setTreeNodesPositionAnnotation(TreeLayoutUtil
-											.getViews(treeChildren));
-						}
-					}
-					return CommandResult.newOKCommandResult();
-				}
-
-			}
-		}
-		return CommandResult
-				.newErrorCommandResult("Parent view or parent edit part not found!");
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.commands;
+
+import java.util.ArrayList;
+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.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutConstraint;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class UpdateAnnotationsOnMoveCommand extends
+		AbstractTransactionalCommand {
+
+	private final IGraphicalEditPart editPart;
+
+	private final TreeLayoutConstraint layoutConstraint;
+
+	public UpdateAnnotationsOnMoveCommand(
+			TransactionalEditingDomain editingDomain,
+			IGraphicalEditPart editPart, TreeLayoutConstraint layoutConstraint) {
+		super(editingDomain, "Move TreeNode", null);
+		this.editPart = editPart;
+		this.layoutConstraint = layoutConstraint;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+
+		final View parentView = TreeLayoutUtil.getTreeNodeParentView(editPart
+				.getNotationView());
+
+		if (parentView != null) {
+			final IGraphicalEditPart parentEditPart = (IGraphicalEditPart) editPart
+					.findEditPart(editPart.getParent(), parentView.getElement());
+			if (parentEditPart != null) {
+				final List<IGraphicalEditPart> treeChildren = new ArrayList<IGraphicalEditPart>(
+
+				TreeLayoutUtil.getOrderedTreeChildren(parentEditPart));
+				if (!treeChildren.isEmpty()) {
+					final int oldPos = treeChildren.indexOf(editPart);
+					final int newPos = layoutConstraint.getTreeInnerRankIndex();
+
+					if (newPos != -1) {
+						if (oldPos != newPos) {
+							final IGraphicalEditPart element = treeChildren
+									.get(oldPos);
+							treeChildren.remove(oldPos);
+							treeChildren.add(newPos, element);
+							TreeLayoutUtil
+									.setTreeNodesPositionAnnotation(TreeLayoutUtil
+											.getViews(treeChildren));
+						}
+					}
+					return CommandResult.newOKCommandResult();
+				}
+
+			}
+		}
+		return CommandResult
+				.newErrorCommandResult("Parent view or parent edit part not found!");
+	}
+}

+ 79 - 79
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/commands/UpdateAnnotationsOnReorientRelationshipCommand.java

@@ -1,79 +1,79 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.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.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-import org.yakindu.base.gmf.runtime.treelayout.UIUtils;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class UpdateAnnotationsOnReorientRelationshipCommand extends
-		AbstractTransactionalCommand {
-
-	private final ReorientRelationshipRequest request;
-
-	private final IGraphicalEditPart sourceEditPart;
-
-	public UpdateAnnotationsOnReorientRelationshipCommand(
-			ReorientRelationshipRequest request,
-			IGraphicalEditPart sourceEditPart) {
-		super(request.getEditingDomain(), request.getLabel(), null);
-		this.request = request;
-		this.sourceEditPart = sourceEditPart;
-	}
-
-	@Override
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
-			IAdaptable info) throws ExecutionException {
-
-		// Update annotations of old connection end;
-		final IGraphicalEditPart oldEnd = UIUtils.getEditPart(request
-				.getOldRelationshipEnd());
-		if (oldEnd != null) {
-
-			final List<IGraphicalEditPart> treeChildren = TreeLayoutUtil
-					.getOrderedTreeChildren(oldEnd);
-			treeChildren.remove(sourceEditPart);
-			TreeLayoutUtil.setTreeNodesPositionAnnotation(TreeLayoutUtil
-					.getViews(treeChildren));
-		}
-
-		// Update annotations of new connection end;
-		final IGraphicalEditPart newEnd = UIUtils.getEditPart(request
-				.getNewRelationshipEnd());
-		if (newEnd != null) {
-			final List<IGraphicalEditPart> treeChildren = TreeLayoutUtil
-					.getOrderedTreeChildren(newEnd);
-			treeChildren.add(sourceEditPart);
-
-			TreeLayoutUtil.setTreeNodesPositionAnnotation(TreeLayoutUtil
-					.getViews(treeChildren));
-
-			// Update parentAnnotation to new end
-			TreeLayoutUtil.setTreeNodeParentAnnotation(
-					sourceEditPart.getNotationView(), newEnd.getNotationView());
-		}
-
-		return CommandResult.newOKCommandResult();
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+import org.yakindu.base.gmf.runtime.treelayout.UIUtils;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class UpdateAnnotationsOnReorientRelationshipCommand extends
+		AbstractTransactionalCommand {
+
+	private final ReorientRelationshipRequest request;
+
+	private final IGraphicalEditPart sourceEditPart;
+
+	public UpdateAnnotationsOnReorientRelationshipCommand(
+			ReorientRelationshipRequest request,
+			IGraphicalEditPart sourceEditPart) {
+		super(request.getEditingDomain(), request.getLabel(), null);
+		this.request = request;
+		this.sourceEditPart = sourceEditPart;
+	}
+
+	@Override
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+
+		// Update annotations of old connection end;
+		final IGraphicalEditPart oldEnd = UIUtils.getEditPart(request
+				.getOldRelationshipEnd());
+		if (oldEnd != null) {
+
+			final List<IGraphicalEditPart> treeChildren = TreeLayoutUtil
+					.getOrderedTreeChildren(oldEnd);
+			treeChildren.remove(sourceEditPart);
+			TreeLayoutUtil.setTreeNodesPositionAnnotation(TreeLayoutUtil
+					.getViews(treeChildren));
+		}
+
+		// Update annotations of new connection end;
+		final IGraphicalEditPart newEnd = UIUtils.getEditPart(request
+				.getNewRelationshipEnd());
+		if (newEnd != null) {
+			final List<IGraphicalEditPart> treeChildren = TreeLayoutUtil
+					.getOrderedTreeChildren(newEnd);
+			treeChildren.add(sourceEditPart);
+
+			TreeLayoutUtil.setTreeNodesPositionAnnotation(TreeLayoutUtil
+					.getViews(treeChildren));
+
+			// Update parentAnnotation to new end
+			TreeLayoutUtil.setTreeNodeParentAnnotation(
+					sourceEditPart.getNotationView(), newEnd.getNotationView());
+		}
+
+		return CommandResult.newOKCommandResult();
+	}
+}

+ 234 - 234
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/treelayout/policies/TreeLayoutEditPolicy.java

@@ -1,234 +1,234 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	Markus Muehlbrandt - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.treelayout.policies;
-
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.RoundedRectangle;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.AlignmentRequest;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.CreateRequest;
-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.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutConstraint;
-import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
-import org.yakindu.base.gmf.runtime.treelayout.commands.UpdateAnnotationsOnCreationCommand;
-import org.yakindu.base.gmf.runtime.treelayout.commands.UpdateAnnotationsOnMoveCommand;
-
-/**
- * 
- * @author Markus Muehlbrandt
- *
- */
-public class TreeLayoutEditPolicy extends XYLayoutEditPolicy {
-
-	private IFigure feedbackFigure;
-
-	@Override
-	protected Command getCreateCommand(CreateRequest request) {
-		final CompoundCommand cmd = new CompoundCommand();
-		cmd.add(super.getCreateCommand(request));
-		if (request instanceof CreateViewAndElementRequest) {
-			final CreateViewAndElementRequest req = (CreateViewAndElementRequest) request;
-			if (shouldUpdateAnnotationsOnCreation(req)) {
-				cmd.add(new ICommandProxy(
-						new UpdateAnnotationsOnCreationCommand(getHost()
-								.getEditingDomain(), req)));
-			}
-		}
-		return cmd;
-	}
-
-	protected boolean shouldUpdateAnnotationsOnCreation(
-			CreateViewAndElementRequest request) {
-		return true;
-	}
-
-	@Override
-	protected Object getConstraintFor(ChangeBoundsRequest request,
-			GraphicalEditPart child) {
-
-		if (request instanceof AlignmentRequest) {
-			return super.getConstraintFor(request, child);
-		}
-		final Rectangle rect = (Rectangle) super.getConstraintFor(request,
-				child);
-		final Rectangle cons = getCurrentConstraintFor(child);
-		final int newTreePosition = TreeLayoutUtil.getNewTreeNodePosition(
-				request.getLocation(),
-				TreeLayoutUtil.getSiblings((IGraphicalEditPart) child));
-		if (cons instanceof TreeLayoutConstraint) {
-			final TreeLayoutConstraint treeLayoutConstraint = (TreeLayoutConstraint) cons;
-			return new TreeLayoutConstraint(rect,
-					treeLayoutConstraint.isRoot(), newTreePosition);
-		}
-		return new TreeLayoutConstraint(rect, false, newTreePosition);
-	}
-
-	@Override
-	protected Command createChangeConstraintCommand(EditPart child,
-			Object constraint) {
-		if (constraint instanceof TreeLayoutConstraint) {
-			if (((TreeLayoutConstraint) constraint).isRoot()) {
-				return UnexecutableCommand.INSTANCE;
-			} else {
-				return new ICommandProxy(new UpdateAnnotationsOnMoveCommand(
-						getHost().getEditingDomain(),
-						(IGraphicalEditPart) child,
-						(TreeLayoutConstraint) constraint));
-			}
-
-		}
-		return super.createChangeConstraintCommand(child, constraint);
-	}
-
-	@Override
-	protected void showLayoutTargetFeedback(Request request) {
-		if (request instanceof ChangeBoundsRequest) {
-			final ChangeBoundsRequest changeBoundsRequest = (ChangeBoundsRequest) request;
-			if (!changeBoundsRequest.getEditParts().isEmpty()
-					&& !(changeBoundsRequest.getEditParts().get(0) instanceof LabelEditPart)) {
-
-				final IGraphicalEditPart editPart = (IGraphicalEditPart) changeBoundsRequest
-						.getEditParts().get(0);
-
-				final List<IGraphicalEditPart> siblingList = TreeLayoutUtil
-						.getSiblings(editPart);
-
-				if (!siblingList.isEmpty()) {
-					final int newTreePosition = TreeLayoutUtil
-							.getNewTreeNodePosition(
-									changeBoundsRequest.getLocation(),
-									TreeLayoutUtil.getSiblings(editPart));
-					Point point;
-					if (newTreePosition == 0) {
-						// top end
-						point = getFeedBackFigurePoint(editPart.getFigure(),
-								siblingList, 0, 0);
-					} else if (newTreePosition == siblingList.size()) {
-						// Bottom end
-						point = getFeedBackFigurePoint(editPart.getFigure(),
-								siblingList, siblingList.size(),
-								siblingList.size());
-					} else {
-						// Between siblings
-						point = getFeedBackFigurePoint(editPart.getFigure(),
-								siblingList, newTreePosition - 1,
-								newTreePosition);
-					}
-
-					final Rectangle bounds = getFeedbackFigureBounds();
-					siblingList.get(0).getFigure().translateToAbsolute(bounds);
-					bounds.setLocation(point);
-					getFeedbackFigure().setBounds(bounds);
-					getFeedbackFigure().translateToRelative(
-							getFeedbackFigure().getBounds());
-					getFeedbackLayer().add(getFeedbackFigure());
-					getFeedbackLayer().repaint();
-				}
-			}
-		}
-	}
-
-	@Override
-	protected void eraseLayoutTargetFeedback(Request request) {
-		super.eraseLayoutTargetFeedback(request);
-		getFeedbackLayer().getChildren().remove(getFeedbackFigure());
-		getFeedbackLayer().repaint();
-	}
-
-	/**
-	 * Calculates FeedbackfigurePoint in absolute coordinates
-	 * 
-	 * @param childFigure
-	 * @param siblingList
-	 * @param lowerIndex
-	 * @param upperIndex
-	 * @return
-	 */
-	private Point getFeedBackFigurePoint(IFigure childFigure,
-			List<IGraphicalEditPart> siblingList, int lowerIndex, int upperIndex) {
-		final Point point = new Point();
-
-		IFigure topFigure;
-		IFigure bottomFigure;
-
-		if (lowerIndex == siblingList.size()) {
-			topFigure = siblingList.get(lowerIndex - 1).getFigure();
-			bottomFigure = siblingList.get(upperIndex - 1).getFigure();
-		} else {
-			topFigure = siblingList.get(lowerIndex).getFigure();
-			bottomFigure = siblingList.get(upperIndex).getFigure();
-		}
-
-		final Rectangle absTopFigBounds = topFigure.getBounds().getCopy();
-		topFigure.translateToAbsolute(absTopFigBounds);
-
-		final Rectangle absBottomFigBounds = bottomFigure.getBounds().getCopy();
-		bottomFigure.translateToAbsolute(absBottomFigBounds);
-
-		final Rectangle feedbackFigBounds = getFeedbackFigureBounds();
-		topFigure.translateToAbsolute(feedbackFigBounds);
-
-		point.x = absTopFigBounds.x
-				- (feedbackFigBounds.width - absTopFigBounds.width) / 2;
-
-		if (lowerIndex == 0 && upperIndex == 0) {
-			// Top end
-			point.y = absTopFigBounds.y
-					+ (absBottomFigBounds.y - absTopFigBounds.y) / 2 - 5;
-		} else if (lowerIndex == siblingList.size()
-				&& upperIndex == siblingList.size()) {
-			// bottom end
-			point.y = absTopFigBounds.y
-					+ (absBottomFigBounds.y - absTopFigBounds.y) / 2
-					+ absBottomFigBounds.height + 5;
-		} else {
-			point.y = absTopFigBounds.y
-					+ (absBottomFigBounds.y - absTopFigBounds.y) / 2
-					+ absBottomFigBounds.height / 2;
-		}
-		return point;
-	}
-
-	private IFigure getFeedbackFigure() {
-		if (feedbackFigure == null) {
-			final RoundedRectangle pl = new RoundedRectangle();
-			pl.setForegroundColor(ColorConstants.black);
-			pl.setBackgroundColor(ColorConstants.black);
-			pl.setBounds(getFeedbackFigureBounds());
-			feedbackFigure = pl;
-		}
-		return feedbackFigure;
-	}
-
-	private Rectangle getFeedbackFigureBounds() {
-		return new Rectangle(0, 0, 120, 2);
-	}
-
-	@Override
-	public IGraphicalEditPart getHost() {
-		return (IGraphicalEditPart) super.getHost();
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	Markus Muehlbrandt - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.treelayout.policies;
+
+import java.util.List;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RoundedRectangle;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.AlignmentRequest;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.CreateRequest;
+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.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutConstraint;
+import org.yakindu.base.gmf.runtime.treelayout.TreeLayoutUtil;
+import org.yakindu.base.gmf.runtime.treelayout.commands.UpdateAnnotationsOnCreationCommand;
+import org.yakindu.base.gmf.runtime.treelayout.commands.UpdateAnnotationsOnMoveCommand;
+
+/**
+ * 
+ * @author Markus Muehlbrandt
+ *
+ */
+public class TreeLayoutEditPolicy extends XYLayoutEditPolicy {
+
+	private IFigure feedbackFigure;
+
+	@Override
+	protected Command getCreateCommand(CreateRequest request) {
+		final CompoundCommand cmd = new CompoundCommand();
+		cmd.add(super.getCreateCommand(request));
+		if (request instanceof CreateViewAndElementRequest) {
+			final CreateViewAndElementRequest req = (CreateViewAndElementRequest) request;
+			if (shouldUpdateAnnotationsOnCreation(req)) {
+				cmd.add(new ICommandProxy(
+						new UpdateAnnotationsOnCreationCommand(getHost()
+								.getEditingDomain(), req)));
+			}
+		}
+		return cmd;
+	}
+
+	protected boolean shouldUpdateAnnotationsOnCreation(
+			CreateViewAndElementRequest request) {
+		return true;
+	}
+
+	@Override
+	protected Object getConstraintFor(ChangeBoundsRequest request,
+			GraphicalEditPart child) {
+
+		if (request instanceof AlignmentRequest) {
+			return super.getConstraintFor(request, child);
+		}
+		final Rectangle rect = (Rectangle) super.getConstraintFor(request,
+				child);
+		final Rectangle cons = getCurrentConstraintFor(child);
+		final int newTreePosition = TreeLayoutUtil.getNewTreeNodePosition(
+				request.getLocation(),
+				TreeLayoutUtil.getSiblings((IGraphicalEditPart) child));
+		if (cons instanceof TreeLayoutConstraint) {
+			final TreeLayoutConstraint treeLayoutConstraint = (TreeLayoutConstraint) cons;
+			return new TreeLayoutConstraint(rect,
+					treeLayoutConstraint.isRoot(), newTreePosition);
+		}
+		return new TreeLayoutConstraint(rect, false, newTreePosition);
+	}
+
+	@Override
+	protected Command createChangeConstraintCommand(EditPart child,
+			Object constraint) {
+		if (constraint instanceof TreeLayoutConstraint) {
+			if (((TreeLayoutConstraint) constraint).isRoot()) {
+				return UnexecutableCommand.INSTANCE;
+			} else {
+				return new ICommandProxy(new UpdateAnnotationsOnMoveCommand(
+						getHost().getEditingDomain(),
+						(IGraphicalEditPart) child,
+						(TreeLayoutConstraint) constraint));
+			}
+
+		}
+		return super.createChangeConstraintCommand(child, constraint);
+	}
+
+	@Override
+	protected void showLayoutTargetFeedback(Request request) {
+		if (request instanceof ChangeBoundsRequest) {
+			final ChangeBoundsRequest changeBoundsRequest = (ChangeBoundsRequest) request;
+			if (!changeBoundsRequest.getEditParts().isEmpty()
+					&& !(changeBoundsRequest.getEditParts().get(0) instanceof LabelEditPart)) {
+
+				final IGraphicalEditPart editPart = (IGraphicalEditPart) changeBoundsRequest
+						.getEditParts().get(0);
+
+				final List<IGraphicalEditPart> siblingList = TreeLayoutUtil
+						.getSiblings(editPart);
+
+				if (!siblingList.isEmpty()) {
+					final int newTreePosition = TreeLayoutUtil
+							.getNewTreeNodePosition(
+									changeBoundsRequest.getLocation(),
+									TreeLayoutUtil.getSiblings(editPart));
+					Point point;
+					if (newTreePosition == 0) {
+						// top end
+						point = getFeedBackFigurePoint(editPart.getFigure(),
+								siblingList, 0, 0);
+					} else if (newTreePosition == siblingList.size()) {
+						// Bottom end
+						point = getFeedBackFigurePoint(editPart.getFigure(),
+								siblingList, siblingList.size(),
+								siblingList.size());
+					} else {
+						// Between siblings
+						point = getFeedBackFigurePoint(editPart.getFigure(),
+								siblingList, newTreePosition - 1,
+								newTreePosition);
+					}
+
+					final Rectangle bounds = getFeedbackFigureBounds();
+					siblingList.get(0).getFigure().translateToAbsolute(bounds);
+					bounds.setLocation(point);
+					getFeedbackFigure().setBounds(bounds);
+					getFeedbackFigure().translateToRelative(
+							getFeedbackFigure().getBounds());
+					getFeedbackLayer().add(getFeedbackFigure());
+					getFeedbackLayer().repaint();
+				}
+			}
+		}
+	}
+
+	@Override
+	protected void eraseLayoutTargetFeedback(Request request) {
+		super.eraseLayoutTargetFeedback(request);
+		getFeedbackLayer().getChildren().remove(getFeedbackFigure());
+		getFeedbackLayer().repaint();
+	}
+
+	/**
+	 * Calculates FeedbackfigurePoint in absolute coordinates
+	 * 
+	 * @param childFigure
+	 * @param siblingList
+	 * @param lowerIndex
+	 * @param upperIndex
+	 * @return
+	 */
+	private Point getFeedBackFigurePoint(IFigure childFigure,
+			List<IGraphicalEditPart> siblingList, int lowerIndex, int upperIndex) {
+		final Point point = new Point();
+
+		IFigure topFigure;
+		IFigure bottomFigure;
+
+		if (lowerIndex == siblingList.size()) {
+			topFigure = siblingList.get(lowerIndex - 1).getFigure();
+			bottomFigure = siblingList.get(upperIndex - 1).getFigure();
+		} else {
+			topFigure = siblingList.get(lowerIndex).getFigure();
+			bottomFigure = siblingList.get(upperIndex).getFigure();
+		}
+
+		final Rectangle absTopFigBounds = topFigure.getBounds().getCopy();
+		topFigure.translateToAbsolute(absTopFigBounds);
+
+		final Rectangle absBottomFigBounds = bottomFigure.getBounds().getCopy();
+		bottomFigure.translateToAbsolute(absBottomFigBounds);
+
+		final Rectangle feedbackFigBounds = getFeedbackFigureBounds();
+		topFigure.translateToAbsolute(feedbackFigBounds);
+
+		point.x = absTopFigBounds.x
+				- (feedbackFigBounds.width - absTopFigBounds.width) / 2;
+
+		if (lowerIndex == 0 && upperIndex == 0) {
+			// Top end
+			point.y = absTopFigBounds.y
+					+ (absBottomFigBounds.y - absTopFigBounds.y) / 2 - 5;
+		} else if (lowerIndex == siblingList.size()
+				&& upperIndex == siblingList.size()) {
+			// bottom end
+			point.y = absTopFigBounds.y
+					+ (absBottomFigBounds.y - absTopFigBounds.y) / 2
+					+ absBottomFigBounds.height + 5;
+		} else {
+			point.y = absTopFigBounds.y
+					+ (absBottomFigBounds.y - absTopFigBounds.y) / 2
+					+ absBottomFigBounds.height / 2;
+		}
+		return point;
+	}
+
+	private IFigure getFeedbackFigure() {
+		if (feedbackFigure == null) {
+			final RoundedRectangle pl = new RoundedRectangle();
+			pl.setForegroundColor(ColorConstants.black);
+			pl.setBackgroundColor(ColorConstants.black);
+			pl.setBounds(getFeedbackFigureBounds());
+			feedbackFigure = pl;
+		}
+		return feedbackFigure;
+	}
+
+	private Rectangle getFeedbackFigureBounds() {
+		return new Rectangle(0, 0, 120, 2);
+	}
+
+	@Override
+	public IGraphicalEditPart getHost() {
+		return (IGraphicalEditPart) super.getHost();
+	}
+}

+ 67 - 67
plugins/org.yakindu.gmf.runtime/src/org/yakindu/base/gmf/runtime/util/EditPartUtils.java

@@ -1,67 +1,67 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.gmf.runtime.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.NodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-
-public class EditPartUtils {
-
-	@SuppressWarnings("unchecked")
-	public static IGraphicalEditPart findEditPartForSemanticElement(
-			EditPart editPart, EObject semanticElement) {
-		if (semanticElement == null) {
-			return null;
-		}
-		if (editPart instanceof IGraphicalEditPart) {
-			EObject resolveSemanticElement = ((IGraphicalEditPart) editPart)
-					.resolveSemanticElement();
-
-			if (resolveSemanticElement != null
-					&& EcoreUtil.getURI(resolveSemanticElement).equals(
-							EcoreUtil.getURI(semanticElement))) {
-				return (IGraphicalEditPart) editPart;
-			}
-		}
-
-		for (Object child : editPart.getChildren()) {
-			IGraphicalEditPart recursiveEditPart = findEditPartForSemanticElement(
-					(EditPart) child, semanticElement);
-			if (recursiveEditPart != null) {
-				return recursiveEditPart;
-			}
-		}
-
-		if (editPart instanceof NodeEditPart) {
-			List<Connection> connections = new ArrayList<Connection>();
-			connections
-					.addAll(((NodeEditPart) editPart).getSourceConnections());
-			connections
-					.addAll(((NodeEditPart) editPart).getTargetConnections());
-			for (Object connection : connections) {
-				EObject resolveSemanticElement = ((IGraphicalEditPart) connection)
-						.resolveSemanticElement();
-				if (EcoreUtil.equals(resolveSemanticElement, semanticElement)) {
-					return (IGraphicalEditPart) connection;
-				}
-			}
-		}
-		return null;
-	}
-
-}
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.base.gmf.runtime.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.NodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+
+public class EditPartUtils {
+
+	@SuppressWarnings("unchecked")
+	public static IGraphicalEditPart findEditPartForSemanticElement(
+			EditPart editPart, EObject semanticElement) {
+		if (semanticElement == null) {
+			return null;
+		}
+		if (editPart instanceof IGraphicalEditPart) {
+			EObject resolveSemanticElement = ((IGraphicalEditPart) editPart)
+					.resolveSemanticElement();
+
+			if (resolveSemanticElement != null
+					&& EcoreUtil.getURI(resolveSemanticElement).equals(
+							EcoreUtil.getURI(semanticElement))) {
+				return (IGraphicalEditPart) editPart;
+			}
+		}
+
+		for (Object child : editPart.getChildren()) {
+			IGraphicalEditPart recursiveEditPart = findEditPartForSemanticElement(
+					(EditPart) child, semanticElement);
+			if (recursiveEditPart != null) {
+				return recursiveEditPart;
+			}
+		}
+
+		if (editPart instanceof NodeEditPart) {
+			List<Connection> connections = new ArrayList<Connection>();
+			connections
+					.addAll(((NodeEditPart) editPart).getSourceConnections());
+			connections
+					.addAll(((NodeEditPart) editPart).getTargetConnections());
+			for (Object connection : connections) {
+				EObject resolveSemanticElement = ((IGraphicalEditPart) connection)
+						.resolveSemanticElement();
+				if (EcoreUtil.equals(resolveSemanticElement, semanticElement)) {
+					return (IGraphicalEditPart) connection;
+				}
+			}
+		}
+		return null;
+	}
+
+}

+ 0 - 2
plugins/org.yakindu.gmf.runtime/.gitignore

@@ -1,2 +0,0 @@
-/bin/
-/target/