Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2012-01-25 09:00:18 +0000
committervlorenzo2012-01-25 09:00:18 +0000
commite7d4e18aa154f0d207ab3ea2289af2281a24b484 (patch)
treebe75c1048f0ea965d87543eeb36874c03f506070 /extraplugins
parent61a94c536692811ad1c860d05efeba82ddc53eb4 (diff)
downloadorg.eclipse.papyrus-e7d4e18aa154f0d207ab3ea2289af2281a24b484.tar.gz
org.eclipse.papyrus-e7d4e18aa154f0d207ab3ea2289af2281a24b484.tar.xz
org.eclipse.papyrus-e7d4e18aa154f0d207ab3ea2289af2281a24b484.zip
365919: [Architecture - SVN - Build] Rewrite the Build
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365919 The folder layout is an extra plugin
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/icons/gridAlgorithm_tmp.gifbin0 -> 244 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/GridAlgorithm.java35
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/icons/horizontalAlgorithm.gifbin0 -> 204 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/HorizontalAlgorithm.java35
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/icons/horizsym.gifbin0 -> 211 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryAlgorithm.java34
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryLayoutAlgorithm.java158
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/icons/HorizontalTree.gifbin0 -> 215 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/HorizontalTreeAlgorithm.java34
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/icons/radialAlgorithm3.gifbin0 -> 208 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/RadialAlgorithm.java34
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/icons/springAlgorithm2.gifbin0 -> 205 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/SpringAlgorithm.java34
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/icons/treeTransparent.gifbin0 -> 265 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/TreeAlgorithm.java35
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/icons/verticalAlgorithm.gifbin0 -> 204 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/VerticalAlgorithm.java35
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gifbin0 -> 206 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.xml14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java34
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java156
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.project28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/META-INF/MANIFEST.MF14
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.xml13
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/Activator.java69
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFLayoutAreaCreator.java203
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFSubEditor.java225
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/.classpath7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/.project34
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/META-INF/MANIFEST.MF18
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/about.html28
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/build.properties7
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/icons/compare_view.gifbin0 -> 224 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/icons/layoutIcon.gifbin0 -> 242 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/icons/layout_area.gifbin0 -> 203 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/icons/sample.gifbin0 -> 983 bytes
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/plugin.properties16
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/plugin.xml52
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.algorithms.exsd144
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.exsd123
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/Activator.java116
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/EditorPropertyTester.java53
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutTool.java68
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAlgorithms.java135
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAreaInterface.java26
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolExtensionPointManager.java158
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolToolbar.java482
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolController.java259
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolInterface.java102
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/AlgorithmFactory.java30
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/ZestAlgortihms.java153
-rw-r--r--extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/utils/Constants.java51
138 files changed, 5038 insertions, 0 deletions
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.project
new file mode 100644
index 00000000000..7dd58508a64
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.gridAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..23aa1baa703
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon May 25 10:53:10 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..c1c9bb7e835
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.zest.layouts,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.gridalgori
+ thm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.gridAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/build.properties
new file mode 100644
index 00000000000..a9ba701c271
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:19 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/icons/gridAlgorithm_tmp.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/icons/gridAlgorithm_tmp.gif
new file mode 100644
index 00000000000..e7c52e423ce
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/icons/gridAlgorithm_tmp.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.properties
new file mode 100644
index 00000000000..6a60169c94a
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Grid Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.xml
new file mode 100644
index 00000000000..3ef74a92c38
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.gridalgorithm.GridAlgorithm"
+ icon="icons/gridAlgorithm_tmp.gif"
+ name="Grid"
+ toolTipText="A grid layout is a special kind of graph layout, where all graph nodes are placed on a 2-dimensional squared grid.">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/Activator.java
new file mode 100644
index 00000000000..1cd8c942f1e
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.gridalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.gridAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/GridAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/GridAlgorithm.java
new file mode 100644
index 00000000000..9dfcc0fc092
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.gridAlgorithm/src/org/eclipse/papyrus/layout/algorithms/gridalgorithm/GridAlgorithm.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.gridalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm;
+
+/**
+ * The Class GridAlgorithm.
+ */
+public class GridAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new GridLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.project
new file mode 100644
index 00000000000..e93844bf083
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..b3ca998794d
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue May 26 16:28:31 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..d094e081506
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.zest.layouts,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.horizontal
+ algorithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/build.properties
new file mode 100644
index 00000000000..a9ba701c271
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:19 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/icons/horizontalAlgorithm.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/icons/horizontalAlgorithm.gif
new file mode 100644
index 00000000000..4349b1bdeca
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/icons/horizontalAlgorithm.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.properties
new file mode 100644
index 00000000000..8e034559742
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Horizontal Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.xml
new file mode 100644
index 00000000000..5e1e57e528d
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.horizontalalgorithm.HorizontalAlgorithm"
+ icon="icons/horizontalAlgorithm.gif"
+ name="Horizontal"
+ toolTipText="A Horizontal algorithm aligns all graph nodes on the centre">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/Activator.java
new file mode 100644
index 00000000000..769892fff9b
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontalalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/HorizontalAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/HorizontalAlgorithm.java
new file mode 100644
index 00000000000..6d3aa2c9e03
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalalgorithm/HorizontalAlgorithm.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontalalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.HorizontalLayoutAlgorithm;
+
+/**
+ * The Class HorizontalAlgorithm.
+ */
+public class HorizontalAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new HorizontalLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.project
new file mode 100644
index 00000000000..886a0c1f5ca
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..801a9740fba
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon Jul 13 15:53:33 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..55d91a095db
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0",
+ org.eclipse.zest.layouts
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.horizontal
+ symmetryalgorithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/build.properties
new file mode 100644
index 00000000000..a1343473079
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:19 CEST 2011
+bin.includes=META-INF/,.,icons/,about.html,plugin.properties,plugin.xml
+output..=bin/
+src.includes=META-INF/,.,icons/,about.html,plugin.properties,plugin.xml
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/icons/horizsym.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/icons/horizsym.gif
new file mode 100644
index 00000000000..77e80f8a1ad
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/icons/horizsym.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.properties
new file mode 100644
index 00000000000..08033d675c4
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Horizontal Symmetry Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.xml
new file mode 100644
index 00000000000..f9bf004d353
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.horizontalsymmetryalgorithm.HorizontalSymmetryAlgorithm"
+ icon="icons/horizsym.gif"
+ name="Horizontal Symmetry"
+ toolTipText="A horizontal symmetry algorithm disposes graph nodes on the other side to the horizontal center of the layout area ">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/Activator.java
new file mode 100644
index 00000000000..b856ecf9db7
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontalsymmetryalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryAlgorithm.java
new file mode 100644
index 00000000000..46080ea271f
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryAlgorithm.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontalsymmetryalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+
+/**
+ * The Class HorizontalSymmetryAlgorithm.
+ */
+public class HorizontalSymmetryAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new HorizontalSymmetryLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryLayoutAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryLayoutAlgorithm.java
new file mode 100644
index 00000000000..3470b8b2549
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontalsymmetryalgorithm/HorizontalSymmetryLayoutAlgorithm.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontalsymmetryalgorithm;
+
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.dataStructures.InternalNode;
+import org.eclipse.zest.layouts.dataStructures.InternalRelationship;
+
+/**
+ * The Class HorizontalSymmetryLayoutAlgorithm.
+ */
+public class HorizontalSymmetryLayoutAlgorithm extends AbstractLayoutAlgorithm {
+
+ /**
+ * Instantiates a new horizontal symmetry layout algorithm.
+ *
+ * @param styles
+ * the styles
+ */
+ public HorizontalSymmetryLayoutAlgorithm(int styles) {
+ super(styles);
+ }
+
+ /**
+ * Instantiates a new horizontal symmetry layout algorithm.
+ */
+ public HorizontalSymmetryLayoutAlgorithm() {
+ this(LayoutStyles.NONE);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#applyLayoutInternal(org.eclipse
+ * .zest.layouts.dataStructures.InternalNode[],
+ * org.eclipse.zest.layouts.dataStructures.InternalRelationship[], double, double, double,
+ * double)
+ */
+ @Override
+ protected void applyLayoutInternal(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider,
+ double boundsX, double boundsY, double boundsWidth, double boundsHeight) {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#getCurrentLayoutStep()
+ */
+ @Override
+ protected int getCurrentLayoutStep() {
+ return 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#getTotalNumberOfLayoutSteps()
+ */
+ @Override
+ protected int getTotalNumberOfLayoutSteps() {
+ return 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#isValidConfiguration(boolean,
+ * boolean)
+ */
+ @Override
+ protected boolean isValidConfiguration(boolean asynchronous, boolean continuous) {
+ if(asynchronous && continuous)
+ return false;
+ else if(asynchronous && !continuous)
+ return true;
+ else if(!asynchronous && continuous)
+ return false;
+ else if(!asynchronous && !continuous)
+ return true;
+
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#postLayoutAlgorithm(org.eclipse
+ * .zest.layouts.dataStructures.InternalNode[],
+ * org.eclipse.zest.layouts.dataStructures.InternalRelationship[])
+ */
+ @Override
+ protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#preLayoutAlgorithm(org.eclipse
+ * .zest.layouts.dataStructures.InternalNode[],
+ * org.eclipse.zest.layouts.dataStructures.InternalRelationship[], double, double, double,
+ * double)
+ */
+ @Override
+ protected void preLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider,
+ double x, double y, double width, double height) {
+ double middle = calculateMiddleArea(y, height);
+ for(InternalNode node : entitiesToLayout) {
+ // node.setLocationInLayout(node.getXInLayout(),middle+(middle - node.getYInLayout()));
+ node.setLocation(node.getInternalX(), (middle + (middle - node.getInternalY())) - node.getHeightInLayout());
+ // node.setInternalLocation(node.getXInLayout(), middle+(middle - node.getYInLayout()));
+ }
+ }
+
+ /**
+ * Calculate middle area.
+ *
+ * @param y
+ * the y
+ * @param height
+ * the height
+ *
+ * @return the double
+ */
+ private double calculateMiddleArea(double y, double height) {
+ return y + ((height - y) / 2);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#setLayoutArea(double,
+ * double, double, double)
+ */
+ @Override
+ public void setLayoutArea(double x, double y, double width, double height) {
+
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.project
new file mode 100644
index 00000000000..13b1e098734
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..4c7603ef746
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue May 26 16:46:37 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..451f1ad16a5
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0",
+ org.eclipse.zest.layouts
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.horizontal
+ treealgorithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/build.properties
new file mode 100644
index 00000000000..a9ba701c271
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:19 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/icons/HorizontalTree.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/icons/HorizontalTree.gif
new file mode 100644
index 00000000000..1495105a6a6
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/icons/HorizontalTree.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.properties
new file mode 100644
index 00000000000..41d119c7057
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Horizontal Tree Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.xml
new file mode 100644
index 00000000000..8b8941e66f6
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.horizontaltreealgorithm.HorizontalTreeAlgorithm"
+ icon="icons/HorizontalTree.gif"
+ name="Horizontal tree"
+ toolTipText="A HorizontalTreeLayoutAlgorithm arranges graph nodes in a layered horizontal tree-like layout">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/Activator.java
new file mode 100644
index 00000000000..aff5af16e97
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontaltreealgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/HorizontalTreeAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/HorizontalTreeAlgorithm.java
new file mode 100644
index 00000000000..e05eb44d511
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.horizontalTreeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/horizontaltreealgorithm/HorizontalTreeAlgorithm.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.horizontaltreealgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.HorizontalTreeLayoutAlgorithm;
+
+/**
+ * The Class HorizontalTreeAlgorithm.
+ */
+public class HorizontalTreeAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new HorizontalTreeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.project
new file mode 100644
index 00000000000..72b06731ed5
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.radialAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..07e64b19290
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed May 20 14:53:29 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..16020fc7bce
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.zest.layouts,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.radialalgo
+ rithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.radialAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/build.properties
new file mode 100644
index 00000000000..4a5c7b0c5f8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:20 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/icons/radialAlgorithm3.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/icons/radialAlgorithm3.gif
new file mode 100644
index 00000000000..d9b38c14fff
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/icons/radialAlgorithm3.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.properties
new file mode 100644
index 00000000000..0448e51e1d5
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Radial Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.xml
new file mode 100644
index 00000000000..bf71480f377
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.radialalgorithm.RadialAlgorithm"
+ icon="icons/radialAlgorithm3.gif"
+ name="Radial"
+ toolTipText="A radial algorithm applies a tree layout to graph nodes, and then displays the tree in a circular fashion with the roots in the centre">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/Activator.java
new file mode 100644
index 00000000000..d2b7561752f
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.radialalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.radialAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/RadialAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/RadialAlgorithm.java
new file mode 100644
index 00000000000..6b1ab45eb6d
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.radialAlgorithm/src/org/eclipse/papyrus/layout/algorithms/radialalgorithm/RadialAlgorithm.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.radialalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.RadialLayoutAlgorithm;
+
+/**
+ * The Class RadialAlgorithm.
+ */
+public class RadialAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.project
new file mode 100644
index 00000000000..d295879be2a
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.springAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..b13d96af241
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon May 25 10:49:19 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..40ea421b35c
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.zest.layouts,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.springalgo
+ rithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.springAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/build.properties
new file mode 100644
index 00000000000..4a5c7b0c5f8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:20 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/icons/springAlgorithm2.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/icons/springAlgorithm2.gif
new file mode 100644
index 00000000000..4ae2299f49b
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/icons/springAlgorithm2.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.properties
new file mode 100644
index 00000000000..8874688745e
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Spring Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.xml
new file mode 100644
index 00000000000..3e1685260fb
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.springalgorithm.SpringAlgorithm"
+ icon="icons/springAlgorithm2.gif"
+ name="Spring"
+ toolTipText="In a Spring Algorithm, on the one hand all nodes try to get as far of each other as possible and on the other hand there are the edges which keep nodes together, higher weight the edges have, stronger are they in pulling nodes near each other">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/Activator.java
new file mode 100644
index 00000000000..f7b2b59cf1f
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.springalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.springAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/SpringAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/SpringAlgorithm.java
new file mode 100644
index 00000000000..cbea9ef5a4a
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.springAlgorithm/src/org/eclipse/papyrus/layout/algorithms/springalgorithm/SpringAlgorithm.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.springalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.SpringLayoutAlgorithm;
+
+/**
+ * The Class SpringAlgorithm.
+ */
+public class SpringAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.project
new file mode 100644
index 00000000000..e2e4c0d7d73
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.treeAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..0dfe695608b
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon May 25 10:27:15 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..4956dce5cd8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0",
+ org.eclipse.zest.layouts
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.treealgori
+ thm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.treeAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/build.properties
new file mode 100644
index 00000000000..4a5c7b0c5f8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:20 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/icons/treeTransparent.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/icons/treeTransparent.gif
new file mode 100644
index 00000000000..67d68372076
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/icons/treeTransparent.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.properties
new file mode 100644
index 00000000000..be779ff45da
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Tree Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.xml
new file mode 100644
index 00000000000..daa75d5e3e4
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.treealgorithm.TreeAlgorithm"
+ icon="icons/treeTransparent.gif"
+ name="Tree"
+ toolTipText="The TreeLayoutAlgorithm arranges graph nodes in a layered vertical tree-like layout">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/Activator.java
new file mode 100644
index 00000000000..046e79d0b90
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.treealgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.treeAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/TreeAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/TreeAlgorithm.java
new file mode 100644
index 00000000000..3c7ddcf0ec1
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.treeAlgorithm/src/org/eclipse/papyrus/layout/algorithms/treealgorithm/TreeAlgorithm.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.treealgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm;
+
+/**
+ * The Class TreeAlgorithm.
+ */
+public class TreeAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new TreeLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.project
new file mode 100644
index 00000000000..4fecaf20362
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.verticalAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..bd6af1a78d3
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue May 26 16:40:39 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..3689c3e04f8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.zest.layouts,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.verticalal
+ gorithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.verticalAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/build.properties
new file mode 100644
index 00000000000..4a5c7b0c5f8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:20 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/icons/verticalAlgorithm.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/icons/verticalAlgorithm.gif
new file mode 100644
index 00000000000..abf0e621de5
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/icons/verticalAlgorithm.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.properties
new file mode 100644
index 00000000000..beaab48b3d4
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Vertical Algorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.xml
new file mode 100644
index 00000000000..40538a36661
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.verticalalgorithm.VerticalAlgorithm"
+ icon="icons/verticalAlgorithm.gif"
+ name="Vertical"
+ toolTipText="A Vertical algorithm aligns all graph nodes on the middle">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/Activator.java
new file mode 100644
index 00000000000..fc806bdc442
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.verticalalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.verticalAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/VerticalAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/VerticalAlgorithm.java
new file mode 100644
index 00000000000..7ae8390fdc6
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalalgorithm/VerticalAlgorithm.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.verticalalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.VerticalLayoutAlgorithm;
+
+/**
+ * The Class VerticalAlgorithm.
+ */
+public class VerticalAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new VerticalLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.project b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.project
new file mode 100644
index 00000000000..554a4960b97
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..36df415c5e5
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Jul 15 15:00:32 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..3e0c750d034
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0",
+ org.eclipse.zest.layouts
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.algorithms.verticalsy
+ mmetryalgorithm.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/build.properties
new file mode 100644
index 00000000000..4a5c7b0c5f8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:20 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,icons/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gif b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gif
new file mode 100644
index 00000000000..30791a1f2a4
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.properties
new file mode 100644
index 00000000000..7cda391c15f
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus VerticalSymmetryAlgorithm Plug-in (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.xml
new file mode 100644
index 00000000000..b835bd71804
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout.algorithms">
+ <client
+ class="org.eclipse.papyrus.layout.algorithms.verticalsymmetryalgorithm.VerticalSymmetryAlgorithm"
+ icon="icons/vertsym.gif"
+ name="Vertical Symmetry"
+ toolTipText="A vertical symmetry algorithm disposes graph nodes on the other side to the vertical center of the layout area">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/Activator.java
new file mode 100644
index 00000000000..efadbaeb80f
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.verticalsymmetryalgorithm;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java
new file mode 100644
index 00000000000..52c688a265b
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.verticalsymmetryalgorithm;
+
+import org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory;
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+
+/**
+ * The Class VerticalSymmetryAlgorithm.
+ */
+public class VerticalSymmetryAlgorithm implements AlgorithmFactory {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new VerticalSymmetryLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java
new file mode 100644
index 00000000000..18ba797206b
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layout/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.algorithms.verticalsymmetryalgorithm;
+
+import org.eclipse.zest.layouts.LayoutStyles;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.dataStructures.InternalNode;
+import org.eclipse.zest.layouts.dataStructures.InternalRelationship;
+
+/**
+ * The Class VerticalSymmetryLayoutAlgorithm.
+ */
+public class VerticalSymmetryLayoutAlgorithm extends AbstractLayoutAlgorithm {
+
+ /**
+ * Instantiates a new vertical symmetry layout algorithm.
+ *
+ * @param styles
+ * the styles
+ */
+ public VerticalSymmetryLayoutAlgorithm(int styles) {
+ super(styles);
+ }
+
+ /**
+ * Instantiates a new vertical symmetry layout algorithm.
+ */
+ public VerticalSymmetryLayoutAlgorithm() {
+ this(LayoutStyles.NONE);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#applyLayoutInternal(org.eclipse
+ * .zest.layouts.dataStructures.InternalNode[],
+ * org.eclipse.zest.layouts.dataStructures.InternalRelationship[], double, double, double,
+ * double)
+ */
+ @Override
+ protected void applyLayoutInternal(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider,
+ double boundsX, double boundsY, double boundsWidth, double boundsHeight) {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#getCurrentLayoutStep()
+ */
+ @Override
+ protected int getCurrentLayoutStep() {
+ return 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#getTotalNumberOfLayoutSteps()
+ */
+ @Override
+ protected int getTotalNumberOfLayoutSteps() {
+ return 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#isValidConfiguration(boolean,
+ * boolean)
+ */
+ @Override
+ protected boolean isValidConfiguration(boolean asynchronous, boolean continuous) {
+ if(asynchronous && continuous) {
+ return false;
+ } else if(asynchronous && !continuous) {
+ return true;
+ } else if(!asynchronous && continuous) {
+ return false;
+ } else if(!asynchronous && !continuous) {
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#postLayoutAlgorithm(org.eclipse
+ * .zest.layouts.dataStructures.InternalNode[],
+ * org.eclipse.zest.layouts.dataStructures.InternalRelationship[])
+ */
+ @Override
+ protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#preLayoutAlgorithm(org.eclipse
+ * .zest.layouts.dataStructures.InternalNode[],
+ * org.eclipse.zest.layouts.dataStructures.InternalRelationship[], double, double, double,
+ * double)
+ */
+ @Override
+ protected void preLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider,
+ double x, double y, double width, double height) {
+ double middle = calculateMiddleArea(x, width);
+ for(InternalNode node : entitiesToLayout) {
+ node.setLocation((middle + (middle - node.getInternalX())) - node.getWidthInLayout(), node.getInternalY());
+ }
+ }
+
+ /**
+ * Calculate middle area.
+ *
+ * @param x
+ * the x
+ * @param width
+ * the width
+ *
+ * @return the double
+ */
+ private double calculateMiddleArea(double x, double width) {
+ return x + ((width - x) / 2);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm#setLayoutArea(double,
+ * double, double, double)
+ */
+ @Override
+ public void setLayoutArea(double x, double y, double width, double height) {
+
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.project b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.project
new file mode 100644
index 00000000000..4ade303dbe8
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout.subeditor.gmf</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..7515a5f08ad
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue May 12 09:36:51 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..ef528da893d
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.papyrus.layout;bundle-version="0.9.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.layout.subeditor.gmf.Activat
+ or
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.layout.subeditor.gmf;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/about.html b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/build.properties
new file mode 100644
index 00000000000..dfe8eecb382
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:20 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,build.properties,about.html,plugin.properties
+output..=bin/
+src.includes=META-INF/,.,plugin.xml,build.properties,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.properties
new file mode 100644
index 00000000000..ba021c921c0
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Layout tools sub editor for GMF pluguin (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.xml
new file mode 100644
index 00000000000..e303dab1955
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.layout">
+ <client
+ editor="org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor"
+ interface="org.eclipse.papyrus.layout.subeditor.gmf.GMFSubEditor"
+ interfaceLayoutArea="org.eclipse.papyrus.layout.subeditor.gmf.GMFLayoutAreaCreator">
+ </client>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/Activator.java
new file mode 100644
index 00000000000..cfad2aa51a0
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.subeditor.gmf;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout.subeditor.gmf";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFLayoutAreaCreator.java b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFLayoutAreaCreator.java
new file mode 100644
index 00000000000..cd789539118
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFLayoutAreaCreator.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.subeditor.gmf;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.core.internal.commands.SendToBackCommand;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+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.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.layout.LayoutToolAreaInterface;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The Class GMFLayoutAreaCreator.
+ */
+public class GMFLayoutAreaCreator implements LayoutToolAreaInterface {
+
+ /** The margin. */
+ private int margin = 10;
+
+ /** The my edit part node. */
+ private static EditPart myEditPartNode;
+
+ /** The node. */
+ private static Node node;
+
+ /** The edit part parent. */
+ private static EditPart editPartParent;
+
+ /** The idwp. */
+ private IDiagramWorkbenchPart idwp;
+
+ /** The ted. */
+ private static TransactionalEditingDomain ted;
+
+ /** The childs. */
+ private List<EditPart> childs;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayoutToolAreaInterface#paintLayoutArea()
+ */
+ public void paintLayoutArea() {
+ idwp = (IDiagramWorkbenchPart)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .getActiveEditor();
+ editPartParent = idwp.getDiagramEditPart();
+ childs = editPartParent.getChildren();
+ if(myEditPartNode == null || !childs.contains(myEditPartNode)) {
+ createLayoutArea();
+ } else if(myEditPartNode != null && childs.contains(myEditPartNode)) {
+ deleteLayoutArea();
+ createLayoutArea();
+ }
+ }
+
+ /**
+ * Gets the area.
+ *
+ * @return the area
+ */
+ public static EditPart getArea() {
+ return myEditPartNode;
+ }
+
+ /**
+ * Delete layout area.
+ */
+ public static void deleteLayoutArea() {
+ if(myEditPartNode != null) {
+ CommandStack cs = ((GraphicalEditPart)editPartParent).getViewer().getEditDomain().getCommandStack();
+ CompositeCommand mycommand = new CompositeCommand("mcb");
+ DeleteCommand dc = new DeleteCommand(ted, (View)myEditPartNode.getModel());
+ mycommand.add(dc);
+ cs.execute(new ICommandProxy(mycommand));
+ myEditPartNode = null;
+ node = null;
+ }
+ }
+
+ /**
+ * Gets the bounds.
+ *
+ * @return the bounds
+ */
+ public static Rectangle getBounds() {
+ if(myEditPartNode != null) {
+ return ((GraphicalEditPart)myEditPartNode).getFigure().getBounds();
+ }
+ return null;
+ }
+
+ /**
+ * Gets the transactional editing domain.
+ *
+ * @return the transactional editing domain
+ */
+ private TransactionalEditingDomain getTransactionalEditingDomain() {
+ TransactionalEditingDomain ted = null;
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .getActiveEditor();
+ if(activeEditor instanceof IDiagramWorkbenchPart) {
+ IDiagramWorkbenchPart workbenchPart = (IDiagramWorkbenchPart)activeEditor;
+ ted = (TransactionalEditingDomain)workbenchPart.getAdapter(EditingDomain.class);
+ if(ted == null) {
+ if(workbenchPart instanceof DiagramEditor) {
+ DiagramEditor editor = (DiagramEditor)workbenchPart;
+ ted = editor.getEditingDomain();
+ }
+ }
+ }
+ return ted;
+ }
+
+ /**
+ * Creates the layout area.
+ */
+ private void createLayoutArea() {
+ CommandStack cs = ((GraphicalEditPart)editPartParent).getViewer().getEditDomain().getCommandStack();
+ CompositeCommand command2 = new CompositeCommand("cb2");
+ CreateViewRequest.ViewDescriptor viewDescriptor = new CreateViewRequest.ViewDescriptor(null, Node.class,
+ "Note", -1, false, PreferencesHint.USE_DEFAULTS);
+ ted = getTransactionalEditingDomain();
+ CreateCommand cc = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, (View)editPartParent
+ .getModel());
+ command2.add(cc);
+ cs.execute(new ICommandProxy(command2));
+ node = (Node)((CreateViewRequest.ViewDescriptor)cc.getCommandResult().getReturnValue())
+ .getAdapter(Node.class);
+ for(EditPart n : childs) {
+ if(n.getModel().equals(node))
+ myEditPartNode = n;
+ }
+ ((GraphicalEditPart)myEditPartNode).getFigure().setBackgroundColor(null);
+ ((GraphicalEditPart)myEditPartNode).getFigure().setOpaque(false);
+ CompositeCommand command = new CompositeCommand("cb");
+ SetBoundsCommand sbc = new SetBoundsCommand(getTransactionalEditingDomain(), "changebounds",
+ new EObjectAdapter((View)myEditPartNode.getModel()), calculateBoundsLayoutArea());
+ command.add(sbc);
+
+ SendToBackCommand stbc = new SendToBackCommand(getTransactionalEditingDomain(), (View)myEditPartNode
+ .getModel());
+ command.add(stbc);
+ cs.execute(new ICommandProxy(command));
+ }
+
+ /**
+ * Calculate bounds layout area.
+ *
+ * @return the rectangle
+ */
+ private Rectangle calculateBoundsLayoutArea() {
+ int minX = ((Bounds)((Node)childs.get(0).getModel()).getLayoutConstraint()).getX();
+ int maxX = ((Bounds)((Node)childs.get(0).getModel()).getLayoutConstraint()).getX();
+ int minY = ((Bounds)((Node)childs.get(0).getModel()).getLayoutConstraint()).getY();
+ int maxY = ((Bounds)((Node)childs.get(0).getModel()).getLayoutConstraint()).getY();
+ for(EditPart e : childs) {
+ if(e != childs.get(childs.size() - 1)) {
+ minX = Math.min(minX, ((GraphicalEditPart)e).getFigure().getBounds().x - this.margin);
+ maxX = Math.max(maxX, ((GraphicalEditPart)e).getFigure().getBounds().x
+ + ((GraphicalEditPart)e).getFigure().getBounds().width + this.margin);
+ minY = Math.min(minY, ((GraphicalEditPart)e).getFigure().getBounds().y - this.margin);
+ maxY = Math.max(maxY, ((GraphicalEditPart)e).getFigure().getBounds().y
+ + ((GraphicalEditPart)e).getFigure().getBounds().height + this.margin);
+ }
+ }
+ maxX = maxX - minX;
+ maxY = maxY - minY;
+ if(minX == 0 && minY == 0 && maxX == 0 && maxY == 0) {
+ return new Rectangle(20, 20, 20, 20);
+ }
+ return new Rectangle(minX, minY, maxX, maxY);
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFSubEditor.java b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFSubEditor.java
new file mode 100644
index 00000000000..0c23be5a3eb
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout.subeditor.gmf/src/org/eclipse/papyrus/layout/subeditor/gmf/GMFSubEditor.java
@@ -0,0 +1,225 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout.subeditor.gmf;
+
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.draw2d.Animation;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.layout.Activator;
+import org.eclipse.papyrus.layout.LayouttoolInterface;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The Class GMFSubEditor.
+ */
+public class GMFSubEditor implements LayouttoolInterface {
+
+ /** The command. */
+ CompositeCommand command = new CompositeCommand("Apply Layout");
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#execute(java.util.Map)
+ */
+ public void execute(Map<EditPart, Rectangle> map) {
+ TransactionalEditingDomain ted = getTransactionalEditingDomain();
+ if(ted != null) {
+ CommandStack cs = null;
+ // Add a command to apply new bounds of all nodes
+ for(Entry<EditPart, Rectangle> s : map.entrySet()) {
+ SetBoundsCommand boundsCommand = new SetBoundsCommand(ted, "apply layout", new EObjectAdapter((View)s
+ .getKey().getModel()), s.getValue());
+ command.add(boundsCommand);
+ GraphicalEditPart gep = (GraphicalEditPart)s.getKey();
+ if(cs == null) {
+ cs = gep.getViewer().getEditDomain().getCommandStack();
+ }
+ }
+ try {
+ // Execute layout commands with animation
+ Animation.markBegin();
+ cs.execute(new ICommandProxy(command));
+ Animation.run(1000);
+ } catch (Exception e) {
+ Activator.getDefault().log(e.getMessage() + " : Cannot apply new bounds of all nodes", e);
+ }
+ }
+ }
+
+ /**
+ * Gets the transactional editing domain.
+ *
+ * @return the transactional editing domain
+ */
+ private TransactionalEditingDomain getTransactionalEditingDomain() {
+ TransactionalEditingDomain ted = null;
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .getActiveEditor();
+ if(activeEditor instanceof IDiagramWorkbenchPart) {
+ IDiagramWorkbenchPart workbenchPart = (IDiagramWorkbenchPart)activeEditor;
+ ted = (TransactionalEditingDomain)workbenchPart.getAdapter(EditingDomain.class);
+ if(ted == null) {
+ if(workbenchPart instanceof DiagramEditor) {
+ DiagramEditor editor = (DiagramEditor)workbenchPart;
+ ted = editor.getEditingDomain();
+ }
+ }
+ }
+ return ted;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#getBounds(org.eclipse.gef.EditPart)
+ */
+ public Rectangle getBounds(EditPart element) {
+ if(element.getModel() instanceof Node) {
+ Node node = (Node)element.getModel();
+ if(node.getLayoutConstraint() instanceof Bounds) {
+ Bounds bounds = (Bounds)node.getLayoutConstraint();
+ return new Rectangle(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#getTarget(org.eclipse.gef.EditPart)
+ */
+ public EditPart getTarget(EditPart element) {
+ if(element.getModel() instanceof Edge) {
+ Edge edge = (Edge)element.getModel();
+ removeBendPoints(edge);
+ AbstractConnectionEditPart acep = (AbstractConnectionEditPart)element;
+ return acep.getTarget();
+ }
+ return null;
+ }
+
+ /**
+ * Removes the bend points.
+ *
+ * @param edge
+ * the edge
+ */
+ public void removeBendPoints(Edge edge) {
+ SetConnectionBendpointsCommand scbc = new SetConnectionBendpointsCommand(getTransactionalEditingDomain());
+ scbc.setEdgeAdapter(new EObjectAdapter((View)edge));
+ scbc.setNewPointList(new PointList(), new Point(), new Point());
+ command.add(scbc);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#getLayoutArea(org.eclipse.gef.EditPart[])
+ */
+ public Rectangle getLayoutArea(EditPart[] element) {
+ Rectangle bounds;
+ if(GMFLayoutAreaCreator.getBounds() != null) {
+ bounds = GMFLayoutAreaCreator.getBounds();
+ GMFLayoutAreaCreator.deleteLayoutArea();
+ return bounds;
+ }
+ for(EditPart e : element) {
+ if(e.getModel() instanceof Node) {
+ if(e.getParent() instanceof GraphicalEditPart) {
+ GraphicalEditPart gep = (GraphicalEditPart)e.getParent();
+ bounds = gep.getFigure().getBounds();
+ bounds.x = 0;
+ bounds.y = 0;
+ return bounds;
+ }
+ }
+ }
+ return new Rectangle(0, 0, 1000, 1000);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#getSource(org.eclipse.gef.EditPart)
+ */
+ public EditPart getSource(EditPart element) {
+ if(element.getModel() instanceof Edge) {
+ Edge edge = (Edge)element.getModel();
+ removeBendPoints(edge);
+ AbstractConnectionEditPart acep = (AbstractConnectionEditPart)element;
+ return acep.getSource();
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#isNode(org.eclipse.gef.EditPart)
+ */
+ public boolean isNode(EditPart element) {
+ if(element.getModel() instanceof Node) {
+ if(GMFLayoutAreaCreator.getArea() != null && element.equals(GMFLayoutAreaCreator.getArea())) {
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#isRelationship(org.eclipse.gef.EditPart)
+ */
+ public boolean isRelationship(EditPart element) {
+ if(element.getModel() instanceof Edge) {
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.layout.LayouttoolInterface#getEditorClass()
+ */
+ public Class getEditorClass() {
+ return IDiagramWorkbenchPart.class;
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/.classpath b/extraplugins/layout/org.eclipse.papyrus.layout/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/.project b/extraplugins/layout/org.eclipse.papyrus.layout/.project
new file mode 100644
index 00000000000..a741aadfc86
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layout</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/.settings/org.eclipse.jdt.core.prefs b/extraplugins/layout/org.eclipse.papyrus.layout/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..8cc865a6b17
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon May 04 09:26:43 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/META-INF/MANIFEST.MF b/extraplugins/layout/org.eclipse.papyrus.layout/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..026e0afe26b
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.gef,
+ org.eclipse.zest.layouts,
+ org.eclipse.core.expressions
+Export-Package: org.eclipse.papyrus.layout,
+ org.eclipse.papyrus.layout.managealgorithms
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.layout.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.layout;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/about.html b/extraplugins/layout/org.eclipse.papyrus.layout/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>September 30, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/build.properties b/extraplugins/layout/org.eclipse.papyrus.layout/build.properties
new file mode 100644
index 00000000000..20049a3f54a
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/build.properties
@@ -0,0 +1,7 @@
+#
+#Thu Sep 15 16:42:18 CEST 2011
+bin.includes=plugin.xml,META-INF/,.,icons/,schema/,about.html,plugin.properties
+output..=bin/
+src.includes=plugin.xml,META-INF/,.,icons/,schema/,about.html,plugin.properties
+source..=src/
+bin..=bin/
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/icons/compare_view.gif b/extraplugins/layout/org.eclipse.papyrus.layout/icons/compare_view.gif
new file mode 100644
index 00000000000..dc549bce841
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/icons/compare_view.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/icons/layoutIcon.gif b/extraplugins/layout/org.eclipse.papyrus.layout/icons/layoutIcon.gif
new file mode 100644
index 00000000000..f36379904c1
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/icons/layoutIcon.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/icons/layout_area.gif b/extraplugins/layout/org.eclipse.papyrus.layout/icons/layout_area.gif
new file mode 100644
index 00000000000..ab9dd4378a0
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/icons/layout_area.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/icons/sample.gif b/extraplugins/layout/org.eclipse.papyrus.layout/icons/sample.gif
new file mode 100644
index 00000000000..34fb3c9d8cb
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/icons/sample.gif
Binary files differ
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/plugin.properties b/extraplugins/layout/org.eclipse.papyrus.layout/plugin.properties
new file mode 100644
index 00000000000..33f8e11e9a0
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/plugin.properties
@@ -0,0 +1,16 @@
+####################################################################################
+# Copyright (c) 2008 Atos Origin.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+#
+##################################################################################
+pluginName=Papyrus Layout tools (Incubation)
+providerName=Eclipse Modeling Project
+
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/plugin.xml b/extraplugins/layout/org.eclipse.papyrus.layout/plugin.xml
new file mode 100644
index 00000000000..562b3b2245f
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/plugin.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="org.eclipse.papyrus.layout" name="layouttool" schema="schema/org.eclipse.papyrus.layouttool.exsd"/>
+ <extension-point id="org.eclipse.papyrus.layout.algorithms" name="algorithms" schema="schema/org.eclipse.papyrus.layouttool.algorithms.exsd"/>
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar
+ id="org.eclipse.papyrus.layouttool.toolbarlayout">
+ <dynamic
+ class="org.eclipse.papyrus.layout.LayoutToolToolbar"
+ id="org.eclipse.papyrus.layouttool.dynamic3">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeEditor">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.layouttool.isCorrectEditor">
+ </test>
+ </with>
+ </visibleWhen>
+ </dynamic>
+ </toolbar>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.layout.EditorPropertyTester"
+ id="org.eclipse.papyrus.layouttool.propertyTester"
+ namespace="org.eclipse.papyrus.layouttool"
+ properties="isCorrectEditor"
+ type="org.eclipse.ui.IWorkbenchPart">
+ </propertyTester>
+ </extension>
+ <!-- commented for papyrus M4 build-->
+ <!-- <extension
+ point="org.eclipse.papyrus.editor.perspectiveconfiguration">
+ <configuration
+ perspectiveID="org.eclipse.papyrus.infra.core.perspective">
+ <toolbar
+ toolbarID="org.eclipse.papyrus.layouttool.toolbarlayout">
+ </toolbar>
+ </configuration>
+ </extension>
+ -->
+
+</plugin>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.algorithms.exsd b/extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.algorithms.exsd
new file mode 100644
index 00000000000..21a4a6fe5cc
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.algorithms.exsd
@@ -0,0 +1,144 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.layout" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.papyrus.layout" id="org.eclipse.papyrus.layout.algorithms" name="algorithms"/>
+ </appInfo>
+ <documentation>
+ You can easily add an algorithm to the toolbar button.
+All algorithms added to this extension point are sort alphabetically.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="client"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="client">
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ Name of the algorithm displays in the toolbar
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ Class wich implements algorithm
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.layout.managealgorithms.AlgorithmFactory"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string" use="required">
+ <annotation>
+ <documentation>
+ Icon shows in the toolbar, on the left of the name
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="resource"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="toolTipText" type="string">
+ <annotation>
+ <documentation>
+ Text shows when mouse is over the algorithm, this attribute is optional
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="path" type="string">
+ <annotation>
+ <documentation>
+ Add this algorithm in a sub-menu. This attribute is optional and when it’s empty, algorithm is added on the root. Sub-menu are separated with ‘.’
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ This example shows how to add an algorithm with an icon, a name, a toolTip text and here class wich create the algorithm :
+&lt;plugin&gt;
+ &lt;extension point=&quot;org.eclipse.papyrus.layout.algorithms&quot;&gt;
+ &lt;client
+ class=&quot;org.eclipse.papyrus.treealgorithm.TreeAlgorithm&quot;
+ icon=&quot;icons/treeTransparent.gif&quot;
+ name=&quot;Tree&quot;
+ toolTipText=&quot;The TreeLayoutAlgorithm arranges graph nodes in a layered vertical tree-like layout&quot;&gt;
+ &lt;/client&gt;
+ &lt;/extension&gt;
+&lt;/plugin&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.exsd b/extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.exsd
new file mode 100644
index 00000000000..8a183427c60
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/schema/org.eclipse.papyrus.layout.exsd
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.layout" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.papyrus.layout" id="org.eclipse.papyrus.layout" name="layouttool"/>
+ </appInfo>
+ <documentation>
+ This extension point is use to add a class for an editor to collect information essential to apply layout like bounds of nodes, relationships .....
+It&apos;s also used to add a layout area.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="client"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="client">
+ <complexType>
+ <attribute name="interface" type="string" use="required">
+ <annotation>
+ <documentation>
+ You must have a class which implement LayouttoolInterface to add an editor.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.layout.LayouttoolInterface"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="interfaceLayoutArea" type="string">
+ <annotation>
+ <documentation>
+ You must have a class which implements LayoutToolAreaInterface if you want to add a layout area in your editor. This attribute is optional.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.layout.LayoutToolAreaInterface"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ Here is an example for Topcased editor :
+&lt;extension point=&quot;org.eclipse.papyrus.layout&quot;&gt;
+ &lt;client
+ editor=&quot;org.topcased.modeler.editor.Modeler&quot;
+ interface=&quot;org.topcased.subeditor.topcased.TopcasedSubEditor&quot;
+ interfaceLayoutArea=&quot;org.topcased.subeditor.topcased.LayoutAreaCreator&quot;&gt;
+ &lt;/client&gt;
+ &lt;/extension&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ The interface must implement the interface
+ org.eclipse.papyrus.layout.LayouttoolInterface
+The interfaceLayoutArea must implement the interface
+ org.eclipse.papyrus.layout.LayoutToolAreaInterface
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/Activator.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/Activator.java
new file mode 100644
index 00000000000..c9461939bf0
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/Activator.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Allanic Alexia (Atos Origin) alexia.allanic@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.layout;
+
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.layout";
+
+ // The shared instance
+ /** The plugin. */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @param path
+ * the path
+ *
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Log.
+ *
+ * @param string
+ * the string
+ * @param e
+ * the e
+ */
+ public void log(String string, Exception e) {
+ getLog().log(new Status(Status.ERROR, PLUGIN_ID, string, e));
+ }
+
+ /**
+ * Log.
+ *
+ * @param string
+ * the string
+ * @param severity
+ * the severity
+ */
+ public void log(String string, int severity) {
+ getLog().log(new Status(severity, PLUGIN_ID, string));
+ }
+
+ /**
+ * Log.
+ *
+ * @param string
+ * the string
+ */
+ public void log(String string) {
+ log(string, Status.WARNING);
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/EditorPropertyTester.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/EditorPropertyTester.java
new file mode 100644
index 00000000000..de93a9a9e54
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/EditorPropertyTester.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - EditorPropertyTester Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * The Class EditorPropertyTester.
+ */
+public class EditorPropertyTester extends PropertyTester {
+
+ /**
+ * Instantiates a new editor property tester.
+ */
+ public EditorPropertyTester() {
+ }
+
+ /**
+ * Test if the current editor is a registered editor.
+ *
+ * @param receiver
+ * the receiver
+ * @param property
+ * the property
+ * @param args
+ * the args
+ * @param expectedValue
+ * the expected value
+ *
+ * @return true, if test
+ */
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if(receiver instanceof IWorkbenchPart && "isCorrectEditor".equals(property)) {
+ IWorkbenchPart part = (IWorkbenchPart)receiver;
+ return LayoutToolExtensionPointManager.getInstance().getSubEditor(part) != null;
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutTool.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutTool.java
new file mode 100644
index 00000000000..8bd38fbfd29
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutTool.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayoutTool Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.papyrus.layout.managealgorithms.ZestAlgortihms;
+
+/**
+ * The class LayoutTool.
+ */
+public class LayoutTool {
+
+ /** The instance. */
+ private static LayoutTool instance = new LayoutTool();
+
+ /**
+ * Gets the single instance of LayoutTool.
+ *
+ * @return single instance of LayoutTool
+ */
+ public static LayoutTool getInstance() {
+ return instance;
+ }
+
+ /**
+ * Instantiates a new layout tool.
+ */
+ private LayoutTool() {
+ }
+
+ /*
+ * Apply a layout
+ */
+ /**
+ * Apply layout.
+ *
+ * @param algoName
+ * the algo name
+ * @param parts
+ * the parts
+ */
+ public void applyLayout(String algoName, List<EditPart> parts) {
+ Collection<LayoutToolAlgorithms> algorithmes = ZestAlgortihms.getRegisteredAlgorithmes();
+ for(LayoutToolAlgorithms algorithme : algorithmes) {
+ if(algorithme.getName().equals(algoName)) {
+ LayouttoolController controller = new LayouttoolController(parts, algorithme.getAlgorithm());
+ controller.execute();
+ break;
+ }
+ }
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAlgorithms.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAlgorithms.java
new file mode 100644
index 00000000000..a65fae7c045
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAlgorithms.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayoutToolAlgorithms Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+
+/**
+ * The class LayoutToolAlgorithms contains all information needed for an algorithm.
+ */
+public class LayoutToolAlgorithms {
+
+ /** The algorithm. */
+ private AbstractLayoutAlgorithm algorithm = null;
+
+ /** The name. */
+ private String name = null;
+
+ /** The icon. */
+ private Image icon = null;
+
+ /** The tool tip text. */
+ private String toolTipText = null;
+
+ /** The path. */
+ private String path = null;
+
+ /**
+ * Gets the path.
+ *
+ * @return path
+ */
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * Sets the path.
+ *
+ * @param path
+ * the path
+ */
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ /**
+ * Gets the tool tip text.
+ *
+ * @return toolTip text
+ */
+ public String getToolTipText() {
+ return toolTipText;
+ }
+
+ /**
+ * Sets the tool tip text.
+ *
+ * @param toolTipText
+ * the toolTip text
+ */
+ public void setToolTipText(String toolTipText) {
+ this.toolTipText = toolTipText;
+ }
+
+ /**
+ * Sets the algorithm.
+ *
+ * @param algorithm
+ * the algorithm to apply
+ */
+ public void setAlgorithm(AbstractLayoutAlgorithm algorithm) {
+ this.algorithm = algorithm;
+ }
+
+ /**
+ * Gets the algorithm.
+ *
+ * @return algorithm
+ */
+ public AbstractLayoutAlgorithm getAlgorithm() {
+ return algorithm;
+ }
+
+ /**
+ * Sets the name.
+ *
+ * @param name
+ * the name of the algorithm
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Gets the name.
+ *
+ * @return name of the algorithm
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the icon.
+ *
+ * @param icon
+ * display on the toolbar
+ */
+ public void setIcon(Image icon) {
+ this.icon = icon;
+ }
+
+ /**
+ * Gets the icon.
+ *
+ * @return icon
+ */
+ public Image getIcon() {
+ return icon;
+ }
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAreaInterface.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAreaInterface.java
new file mode 100644
index 00000000000..7e7f90dab11
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolAreaInterface.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayoutToolAreaInterface Interface
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+/**
+ * The class LayoutToolAreaInterface.
+ */
+public interface LayoutToolAreaInterface {
+
+ /**
+ * Paint layout area.
+ */
+ void paintLayoutArea();
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolExtensionPointManager.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolExtensionPointManager.java
new file mode 100644
index 00000000000..1626828a301
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolExtensionPointManager.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayoutToolExtensionPointManager Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.layout.utils.Constants;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The Class LayoutToolExtensionPointManager.
+ */
+public class LayoutToolExtensionPointManager {
+
+ /** The instance. */
+ private static LayoutToolExtensionPointManager instance = new LayoutToolExtensionPointManager();
+
+ /** The configuration elements layout tools. */
+ private IConfigurationElement[] configurationElementsLayoutTools = Platform.getExtensionRegistry()
+ .getConfigurationElementsFor(Constants.EXTENSION_POINT_ID);
+
+ /**
+ * Instantiates a new layout tool extension point manager.
+ */
+ private LayoutToolExtensionPointManager() {
+ }
+
+ /**
+ * Gets the single instance of LayoutToolExtensionPointManager.
+ *
+ * @return single instance of LayoutToolExtensionPointManager
+ */
+ public static LayoutToolExtensionPointManager getInstance() {
+ return instance;
+ }
+
+ /**
+ * Gets the layout area creator.
+ *
+ * @return layout area creator
+ */
+ public LayoutToolAreaInterface getLayoutAreaCreator() {
+ try {
+ for(IConfigurationElement e : configurationElementsLayoutTools) {
+
+ Class<?> o;
+ LayouttoolInterface interfaceL = (LayouttoolInterface)Platform.getBundle(e.getContributor().getName())
+ .loadClass(e.getAttribute(Constants.EXTENSION_INTERFACE)).newInstance();
+ o = interfaceL.getEditorClass();
+ IWorkbenchPart activeEditor = getActiveEditor();
+ if(activeEditor != null) {
+ if(o.isAssignableFrom(activeEditor.getClass())) {
+ if(e.getAttribute(Constants.EXTENSION_INTERFACE_LAYOUT_AREA) != null) {
+ return (LayoutToolAreaInterface)e
+ .createExecutableExtension(Constants.EXTENSION_INTERFACE_LAYOUT_AREA);
+ }
+ }
+ }
+ }
+ } catch (InvalidRegistryObjectException e1) {
+ Activator.getDefault().log(e1.getMessage(), e1);
+ } catch (CoreException e) {
+ Activator.getDefault().log(e.getMessage(), e);
+ } catch (InstantiationException e) {
+ Activator.getDefault().log(e.getMessage(), e);
+ } catch (IllegalAccessException e) {
+ Activator.getDefault().log(e.getMessage(), e);
+ } catch (ClassNotFoundException e) {
+ Activator.getDefault().log(e.getMessage(), e);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the sub editor.
+ *
+ * @param part
+ * the part
+ *
+ * @return subEditor class
+ */
+ public LayouttoolInterface getSubEditor(IWorkbenchPart part) {
+ try {
+ for(IConfigurationElement e : configurationElementsLayoutTools) {
+ Class<?> o;
+ LayouttoolInterface interfaceL = (LayouttoolInterface)Platform.getBundle(e.getContributor().getName())
+ .loadClass(e.getAttribute(Constants.EXTENSION_INTERFACE)).newInstance();
+ o = interfaceL.getEditorClass();
+ IWorkbenchPart activeEditor = null;
+ if(part != null) {
+ activeEditor = part;
+ } else {
+ activeEditor = getActiveEditor();
+ }
+ if(activeEditor != null) {
+ if(o.isAssignableFrom(activeEditor.getClass())) {
+ return (LayouttoolInterface)e.createExecutableExtension(Constants.EXTENSION_INTERFACE);
+ }
+ }
+ }
+ } catch (InvalidRegistryObjectException e1) {
+ e1.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * Gets the sub editor.
+ *
+ * @return subEditor class
+ */
+ public LayouttoolInterface getSubEditor() {
+ return getSubEditor(null);
+ }
+
+ /**
+ * Gets the active editor.
+ *
+ * @return active editor
+ */
+ public IEditorPart getActiveEditor() {
+ IEditorPart editor = null;
+ if(PlatformUI.getWorkbench() != null) {
+ if(PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
+ if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
+ if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() != null) {
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ }
+ }
+ }
+ }
+ return editor;
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolToolbar.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolToolbar.java
new file mode 100644
index 00000000000..ab65ed155b7
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayoutToolToolbar.java
@@ -0,0 +1,482 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayoutToolToolbar Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.layout.managealgorithms.ZestAlgortihms;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swt.widgets.ToolTip;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The class LayoutToolToolbar.
+ */
+public class LayoutToolToolbar extends ContributionItem {
+
+ /** The image layout. */
+ private static Image imageLayout = null;
+
+ /** The selection. */
+ private ISelection theSelection;
+
+ /** The algorithmes. */
+ private Collection<LayoutToolAlgorithms> algorithmes = ZestAlgortihms.getRegisteredAlgorithmes();
+
+ /** The menu. */
+ private Menu menu = null;
+
+ /** The current algorithm. */
+ private LayoutToolAlgorithms currentAlgorithm;
+
+ /** The toolbar. */
+ private ToolBar toolbar;
+
+ /** The item for menu. */
+ private ToolItem itemForMenu;
+
+ /** The item drop down. */
+ private ToolItem itemDropDown;
+
+ /** The current tool tip. */
+ private ToolTip currentToolTip = null;
+
+ /** The item layout text. */
+ private String itemLayoutText = "Add layout area";
+
+ /** The layout tool tip text. */
+ private String layoutToolTipText = "Draw a layout area resizable around nodes, algorithms will be apply to this area";
+
+ /** The layout tool tip. */
+ private ToolTip layoutToolTip = null;
+
+ static {
+ try {
+ imageLayout = new Image(Display.getDefault(), Activator.getDefault().getBundle().getEntry(
+ "icons/layoutIcon.gif").openStream());
+ } catch (IOException e) {
+ Activator.getDefault().log("Cannot load layoutIcon", e);
+ }
+ }
+
+ /**
+ * Instantiates a new layout tool toolbar.
+ */
+ public LayoutToolToolbar() {
+ this("LayoutToolToolbar");
+ }
+
+ /**
+ * Instantiates a new layout tool toolbar.
+ *
+ * @param id
+ * the id
+ */
+ public LayoutToolToolbar(String id) {
+ super(id);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.ToolBar, int)
+ */
+ @Override
+ public void fill(final ToolBar toolBar, int index) {
+ this.toolbar = toolBar;
+ itemDropDown = new ToolItem(toolBar, SWT.DROP_DOWN);
+ if(currentAlgorithm == null) {
+ itemDropDown.setImage(imageLayout);
+ } else {
+ itemDropDown.setImage(currentAlgorithm.getIcon());
+ }
+ itemDropDown.setText("");
+ getMenu(toolBar);
+ itemDropDown.addListener(SWT.Selection, new Listener() {
+
+ public void handleEvent(Event event) {
+ getMenu(toolbar);
+ if(event.detail == SWT.ARROW) {
+ Rectangle bounds = itemDropDown.getBounds();
+ Point point = toolBar.toDisplay(bounds.x, bounds.y + bounds.height);
+ menu.setLocation(point);
+ menu.setVisible(true);
+ }
+ }
+ });
+
+ Listener selectionListener = new Listener() {
+
+ public void handleEvent(Event event) {
+ getSelection();
+ if(currentAlgorithm == null && event.y == 0 && itemForMenu.getData() != null
+ && itemForMenu.getData().equals(itemLayoutText)) {
+ createLayoutArea();
+ }
+ if(hasElementsSelected()) {
+ if(event.y == 0) {
+ if(currentAlgorithm != null) {
+ callAlgorithm();
+ }
+ }
+ for(MenuItem menuItem : menu.getItems()) {
+ menuItem.setEnabled(true);
+ }
+ } else {
+ for(MenuItem menuItem : menu.getItems()) {
+ if(!menuItem.getText().equals(itemLayoutText)) {
+ menuItem.setEnabled(false);
+ }
+ }
+ }
+
+ }
+
+ };
+ itemDropDown.addListener(SWT.Selection, selectionListener);
+ }
+
+ /**
+ * Gets the menu.
+ *
+ * @param parent
+ * the parent
+ *
+ * @return Menu
+ */
+ public Menu getMenu(Control parent) {
+ menu = new Menu(parent);
+ insertIntoMenuAlgorithms();
+ if(menu.getItems().length > 0) {
+ if(parent instanceof ToolBar) {
+ toolbar = (ToolBar)parent;
+ if(toolbar.getItems().length == 1) {
+ itemForMenu = toolbar.getItem(0);
+ }
+ }
+ }
+ createLayoutAreaIcon();
+ return menu;
+ }
+
+ /**
+ * Add algorithms into the menu.
+ */
+ private void insertIntoMenuAlgorithms() {
+ if(algorithmes == null || algorithmes.isEmpty()) {
+ Activator.getDefault().log("Algorithms not found");
+ return;
+ }
+ Map<String, Menu> mapMenuPath = new HashMap<String, Menu>();
+ for(final LayoutToolAlgorithms a : algorithmes) {
+ Menu submenu = menu;
+ if(a.getPath() != null) {
+ String[] pathSplit = a.getPath().split("\\.");
+ String subString = "";
+ for(int i = 0; i < pathSplit.length; i++) {
+ subString += pathSplit[i];
+ if(!mapMenuPath.keySet().contains(subString)) {
+ MenuItem itemPath = new MenuItem(submenu, SWT.CASCADE);
+ itemPath.setText(pathSplit[i]);
+ submenu = new Menu(submenu);
+ itemPath.setMenu(submenu);
+ mapMenuPath.put(subString, submenu);
+ } else {
+ for(String path : mapMenuPath.keySet()) {
+ if(subString.equals(path)) {
+ submenu = mapMenuPath.get(path);
+ }
+ }
+ }
+ subString += ".";
+ }
+ }
+ final MenuItem item = new MenuItem(submenu, SWT.RADIO);
+ item.setText(a.getName());
+ item.setImage(a.getIcon());
+ item.setData(a);
+ if(a.getToolTipText() != null) {
+ final ToolTip toolTip = new ToolTip(menu.getShell(), SWT.NONE);
+ toolTip.setText(item.getText());
+ toolTip.setMessage(((LayoutToolAlgorithms)item.getData()).getToolTipText());
+ item.addListener(SWT.Arm, new Listener() {
+
+ public void handleEvent(Event event) {
+ if(currentToolTip != null) {
+ currentToolTip.setVisible(false);
+ }
+ if(layoutToolTip != null) {
+ layoutToolTip.setVisible(false);
+ }
+ currentToolTip = toolTip;
+ Point mouse = Display.getDefault().getCursorLocation();
+ int x = mouse.x + 20;
+ int y = mouse.y + 30;
+ toolTip.setLocation(new Point(x, y));
+ toolTip.setVisible(true);
+ }
+ });
+ } else {
+ item.addListener(SWT.Arm, new Listener() {
+
+ public void handleEvent(Event event) {
+ if(currentToolTip != null) {
+ currentToolTip.setVisible(false);
+ currentToolTip = null;
+ }
+ if(layoutToolTip != null) {
+ layoutToolTip.setVisible(false);
+ }
+ }
+ });
+ }
+ item.addSelectionListener(new SelectionListener() {
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ if(((MenuItem)e.getSource()).getSelection()) {
+ if(currentToolTip != null) {
+ currentToolTip.setVisible(false);
+ }
+ handleSelected(e, item);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Handle selected.
+ *
+ * @param e
+ * the e
+ * @param item
+ * the item
+ */
+ private void handleSelected(SelectionEvent e, MenuItem item) {
+ LayoutToolAlgorithms layoutToolAlgorithms = (LayoutToolAlgorithms)item.getData();
+ if(itemForMenu != null) {
+ itemForMenu.setImage(layoutToolAlgorithms.getIcon());
+ if(layoutToolAlgorithms.getToolTipText() != null) {
+ itemForMenu.setToolTipText(layoutToolAlgorithms.getToolTipText());
+ } else {
+ itemForMenu.setToolTipText(null);
+ }
+ }
+ currentAlgorithm = layoutToolAlgorithms;
+ callAlgorithm();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.ContributionItem#dispose()
+ */
+ public void dispose() {
+ }
+
+ /**
+ * Run.
+ *
+ * @param action
+ * the action
+ */
+ public void run(IAction action) {
+ callAlgorithm();
+ }
+
+ /**
+ * Call algorithm.
+ */
+ private void callAlgorithm() {
+ if(currentAlgorithm == null) {
+ MessageDialog.openWarning(Display.getDefault().getActiveShell(), "Warning", "Please choose an algorithm");
+ return;
+ }
+ LayoutTool.getInstance().applyLayout(currentAlgorithm.getName(), getEditPartSelected());
+ }
+
+ /**
+ * Selection changed.
+ *
+ * @param action
+ * the action
+ * @param selection
+ * the selection
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ theSelection = selection;
+ }
+
+ /**
+ * Gets the selection.
+ *
+ * @return selection
+ */
+ public ISelection getSelection() {
+ theSelection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getSite()
+ .getSelectionProvider().getSelection();
+ return theSelection;
+ }
+
+ /**
+ * Gets the edit part selected.
+ *
+ * @return list editParts selected
+ */
+ public List<EditPart> getEditPartSelected() {
+ List<EditPart> editParts = new ArrayList<EditPart>();
+ if(theSelection instanceof IStructuredSelection) {
+ IStructuredSelection selec = (IStructuredSelection)theSelection;
+ List objects = selec.toList();
+ for(Object iter : objects) {
+ if(iter instanceof EditPart) {
+ EditPart e = (EditPart)iter;
+ editParts.add(e);
+ }
+ }
+ }
+ sort(editParts);
+ return editParts;
+ }
+
+ /**
+ * Sort editParts to have editParts which have less parents in first.
+ *
+ * @param editParts
+ * the edit parts
+ */
+ public static void sort(List<EditPart> editParts) {
+ Collections.sort(editParts, new Comparator<EditPart>() {
+
+ public int compare(EditPart arg0, EditPart arg1) {
+ return getNbParents(arg0) - getNbParents(arg1);
+ }
+ });
+ }
+
+ /**
+ * Gets the nb parents.
+ *
+ * @param part
+ * editPart
+ *
+ * @return number parents of the editPart
+ */
+ private static int getNbParents(EditPart part) {
+ int result = 0;
+ EditPart tmp = part;
+ while(tmp.getParent() != null) {
+ result++;
+ tmp = tmp.getParent();
+ }
+ return result;
+ }
+
+ /**
+ * Checks for elements selected.
+ *
+ * @return false if 0 or 1 element selected else return true
+ */
+ private boolean hasElementsSelected() {
+ List<EditPart> l = getEditPartSelected();
+ return !(l.size() <= 1);
+ }
+
+ /**
+ * create layout area.
+ */
+ private void createLayoutArea() {
+ LayoutToolExtensionPointManager.getInstance().getLayoutAreaCreator().paintLayoutArea();
+ }
+
+ /**
+ * create layout area icon.
+ */
+ private void createLayoutAreaIcon() {
+ if(LayoutToolExtensionPointManager.getInstance().getLayoutAreaCreator() != null) {
+ new MenuItem(menu, SWT.SEPARATOR);
+
+ final MenuItem itemLayout = new MenuItem(menu, SWT.PUSH);
+ itemLayout.setText(itemLayoutText);
+ try {
+ itemLayout.setImage(new Image(Display.getDefault(), Activator.getDefault().getBundle().getEntry(
+ "icons/layout_area.gif").openStream()));
+ } catch (IOException e) {
+ Activator.getDefault().log("Cannot load layout area icon", e);
+ }
+ layoutToolTip = new ToolTip(menu.getShell(), SWT.NONE);
+ itemLayout.addListener(SWT.Arm, new Listener() {
+
+ public void handleEvent(Event event) {
+ if(currentToolTip != null) {
+ currentToolTip.setVisible(false);
+ }
+ layoutToolTip.setText(itemLayout.getText());
+ layoutToolTip.setMessage(layoutToolTipText);
+ layoutToolTip.setVisible(true);
+ Point mouse = Display.getDefault().getCursorLocation();
+ int x = mouse.x + 20;
+ int y = mouse.y + 30;
+ layoutToolTip.setLocation(new Point(x, y));
+ }
+ });
+ itemLayout.addSelectionListener(new SelectionListener() {
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ if(layoutToolTip != null) {
+ layoutToolTip.setVisible(false);
+ }
+ createLayoutArea();
+ currentAlgorithm = null;
+ itemForMenu.setImage(itemLayout.getImage());
+ itemForMenu.setData(itemLayoutText);
+ itemForMenu.setToolTipText(layoutToolTipText);
+ }
+ });
+ }
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolController.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolController.java
new file mode 100644
index 00000000000..d2de2bb2c21
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolController.java
@@ -0,0 +1,259 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayouttoolController Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.zest.layouts.InvalidLayoutConfiguration;
+import org.eclipse.zest.layouts.LayoutAlgorithm;
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+import org.eclipse.zest.layouts.exampleStructures.SimpleNode;
+import org.eclipse.zest.layouts.exampleStructures.SimpleRelationship;
+
+/**
+ * The class LayouttoolController.
+ */
+public class LayouttoolController {
+
+ /** The sub editor. */
+ private LayouttoolInterface subEditor;
+
+ /** The list edit part selected. */
+ private List<EditPart> listEditPartSelected;
+
+ /** The current layout algorithm. */
+ private LayoutAlgorithm currentLayoutAlgorithm;
+
+ /** The list nodes. */
+ private List<SimpleNode> listNodes = new ArrayList<SimpleNode>();
+
+ /** The list nodes edit part. */
+ private List<EditPart> listNodesEditPart = new ArrayList<EditPart>();
+
+ /** The list relationships. */
+ private List<SimpleRelationship> listRelationships = new ArrayList<SimpleRelationship>();
+
+ /**
+ * The Constructor.
+ *
+ * @param list
+ * of EditPart selected
+ * @param currentAlgorithm
+ * algorithm to apply
+ */
+ public LayouttoolController(List<EditPart> list, AbstractLayoutAlgorithm currentAlgorithm) {
+ listEditPartSelected = list;
+ this.currentLayoutAlgorithm = currentAlgorithm;
+ }
+
+ /**
+ * Transform nodes into SimpleNodes and relationships into SimpleRelationship Calculate bounds
+ * of the layout Apply layout.
+ */
+ public void execute() {
+ subEditor = LayoutToolExtensionPointManager.getInstance().getSubEditor();
+ if(subEditor == null) {
+ Activator.getDefault().log("Editor not found");
+ return;
+ }
+ if(listEditPartSelected == null || listEditPartSelected.size() <= 1) {
+ Activator.getDefault().log("Select at least two elements");
+ return;
+ }
+ // create all nodes
+ createNodes();
+ if(listNodes == null || listNodes.size() <= 1) {
+ Activator.getDefault().log("Any node selected");
+ return;
+ }
+ // find relationships of all nodes selected
+ createRelationships();
+ // Create array of EditParts selected
+ EditPart[] arrayEditPart = new EditPart[listEditPartSelected.size()];
+ listEditPartSelected.toArray(arrayEditPart);
+ // Get layout area where algorithms must be apply
+ Rectangle layoutArea = subEditor.getLayoutArea(arrayEditPart);
+ // Create array of simpleNodes
+ SimpleNode[] listSimpleNode = new SimpleNode[listNodes.size()];
+ listNodes.toArray(listSimpleNode);
+ // Create array of simpleRelationships
+ SimpleRelationship[] listSimpleRelationship = new SimpleRelationship[listRelationships.size()];
+ listRelationships.toArray(listSimpleRelationship);
+ try {
+ currentLayoutAlgorithm
+ .applyLayout(listSimpleNode, listSimpleRelationship, layoutArea.preciseX(), layoutArea.preciseY(),
+ layoutArea.preciseWidth() - 40, layoutArea.preciseHeight() - 5, false, false);
+ } catch (InvalidLayoutConfiguration e) {
+ Activator.getDefault().log(e.getMessage() + " : Layout cannot be applied", e);
+ }
+ Map<EditPart, Rectangle> map = matchEditPartCoordinates();
+ subEditor.execute(map);
+ }
+
+ /**
+ * For all nodes, find source relationships and target relationships and create
+ * SimpleRelationships.
+ */
+ private void createRelationships() {
+ for(int i = 0; i < listNodes.size(); i++) {
+ List<EditPart> sources = getSourceRelationships((EditPart)listNodes.get(i).getRealObject());
+ for(EditPart source : sources) {
+ EditPart node = subEditor.getTarget(source);
+ SimpleRelationship relationship = getSimpleRelationship(subEditor.getSource(source), subEditor
+ .getTarget(source));
+ if(!listRelationships.contains(relationship) && listNodesEditPart.contains(node)) {
+ listRelationships.add(relationship);
+ }
+ listNodes.get(i).addRelationship(relationship);
+ }
+ List<EditPart> targets = getTargetRelationships((EditPart)listNodes.get(i).getRealObject());
+ for(EditPart target : targets) {
+ EditPart node = subEditor.getSource(target);
+ SimpleRelationship relationship = getSimpleRelationship(subEditor.getSource(target), subEditor
+ .getTarget(target));
+ if(!listRelationships.contains(relationship) && listNodesEditPart.contains(node)) {
+ listRelationships.add(relationship);
+ }
+ listNodes.get(i).addRelationship(relationship);
+ }
+ }
+ }
+
+ /**
+ * For all nodes selected, create SimpleNodes.
+ */
+ private void createNodes() {
+ for(EditPart editPart : listEditPartSelected) {
+ if(subEditor.isNode(editPart)) {
+ Rectangle coordinates = subEditor.getBounds(editPart);
+ if(coordinates != null) {
+ listNodes.add(getSimpleNode(editPart, coordinates));
+ listNodesEditPart.add(editPart);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the simple relationship.
+ *
+ * @param source
+ * node
+ * @param destination
+ * node
+ *
+ * @return SimpleRelationship
+ */
+ public SimpleRelationship getSimpleRelationship(EditPart source, EditPart destination) {
+ SimpleNode simpleNodeSource = null;
+ SimpleNode simpleNodeDestination = null;
+ EditPart editPart;
+ // for all nodes, search the source SimpleNode and the destination SimpleNode of this
+ // relationship
+ for(SimpleNode sn : listNodes) {
+ editPart = (EditPart)sn.getRealObject();
+ if(editPart.equals(source)) {
+ simpleNodeSource = sn;
+ }
+ if(editPart.equals(destination)) {
+ simpleNodeDestination = sn;
+ }
+ }
+ SimpleRelationship simpleRelationship = new SimpleRelationship(simpleNodeSource, simpleNodeDestination, true);
+ return simpleRelationship;
+ }
+
+ /**
+ * Match each editPart with their new coordinates.
+ *
+ * @return map EditPart with his news coordinates
+ */
+ public Map<EditPart, Rectangle> matchEditPartCoordinates() {
+ Map<EditPart, Rectangle> map = new HashMap<EditPart, Rectangle>();
+ for(SimpleNode node : this.listNodes) {
+ Rectangle coordinates = new Rectangle((int)node.getXInLayout(), (int)node.getYInLayout(), (int)node
+ .getWidthInLayout(), (int)node.getHeightInLayout());
+ map.put((EditPart)node.getRealObject(), coordinates);
+ }
+ return map;
+ }
+
+ /**
+ * Gets the simple node.
+ *
+ * @param element
+ * node
+ * @param coordinates
+ * the coordinates
+ *
+ * @return SimpleNode
+ */
+ public SimpleNode getSimpleNode(EditPart element, Rectangle coordinates) {
+ return getSimpleNode(element, coordinates, false);
+ }
+
+ /**
+ * Gets the simple node.
+ *
+ * @param element
+ * node
+ * @param coordinates
+ * the coordinates
+ * @param ignoreInLayout
+ * ignore a node when apply layout
+ *
+ * @return SimpleNode
+ */
+ public SimpleNode getSimpleNode(EditPart element, Rectangle coordinates, boolean ignoreInLayout) {
+ SimpleNode node = new SimpleNode(element, coordinates.preciseX(), coordinates.preciseY(), coordinates
+ .preciseWidth(), coordinates.preciseHeight());
+ node.ignoreInLayout(ignoreInLayout);
+ return node;
+ }
+
+ /**
+ * Gets the source relationships.
+ *
+ * @param editPart
+ * node
+ *
+ * @return list of EditPart
+ */
+ public List<EditPart> getSourceRelationships(EditPart editPart) {
+ GraphicalEditPart gep = (GraphicalEditPart)editPart;
+ List<EditPart> sourceConnections = gep.getSourceConnections();
+ return sourceConnections;
+ }
+
+ /**
+ * Gets the target relationships.
+ *
+ * @param editPart
+ * node
+ *
+ * @return list of EditPart
+ */
+ public List<EditPart> getTargetRelationships(EditPart editPart) {
+ GraphicalEditPart gep = (GraphicalEditPart)editPart;
+ List<EditPart> targetConnections = gep.getTargetConnections();
+ return targetConnections;
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolInterface.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolInterface.java
new file mode 100644
index 00000000000..0130a532ecf
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/LayouttoolInterface.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - LayouttoolInterface Interface
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout;
+
+import java.util.Map;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+
+/**
+ * The class LayouttoolInterface.
+ */
+public interface LayouttoolInterface {
+
+ /**
+ * Get the registered editor class.
+ *
+ * @return Class
+ */
+ Class getEditorClass();
+
+ /**
+ * Is a node.
+ *
+ * @param element
+ * the element
+ *
+ * @return true, if the EditPart is a node
+ */
+ boolean isNode(EditPart element);
+
+ /**
+ * Is a relationship.
+ *
+ * @param element
+ * the element
+ *
+ * @return true, if the EditPart is a relationship
+ */
+ boolean isRelationship(EditPart element);
+
+ /**
+ * Get bounds of EditPart.
+ *
+ * @param element
+ * the Node to have their coordinates
+ *
+ * @return Rectangle coordinates of the node
+ */
+ Rectangle getBounds(EditPart element);
+
+ /**
+ * Get source of relationship.
+ *
+ * @param element
+ * relationship to have his source
+ *
+ * @return EditPart source node of the relationship
+ */
+ EditPart getSource(EditPart element);
+
+ /**
+ * Get destination of relationship.
+ *
+ * @param element
+ * relationship to have his destination
+ *
+ * @return EditPart destination node of the relationship
+ */
+ EditPart getTarget(EditPart element);
+
+ /**
+ * Get layout area.
+ *
+ * @param element
+ * the element
+ *
+ * @return Rectangle coordinates of layout area
+ */
+ Rectangle getLayoutArea(EditPart[] element);
+
+ /**
+ * Execute layout.
+ *
+ * @param map
+ * the map
+ */
+ void execute(Map<EditPart, Rectangle> map);
+
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/AlgorithmFactory.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/AlgorithmFactory.java
new file mode 100644
index 00000000000..5571cc2fff3
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/AlgorithmFactory.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - AlgorithmFactory Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout.managealgorithms;
+
+import org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm;
+
+/**
+ * The class AlgorithmFactory.
+ */
+public interface AlgorithmFactory {
+
+ /**
+ * Creates the algorithm.
+ *
+ * @return algorithm
+ */
+ AbstractLayoutAlgorithm createAlgorithm();
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/ZestAlgortihms.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/ZestAlgortihms.java
new file mode 100644
index 00000000000..c7c5135e525
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/managealgorithms/ZestAlgortihms.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - ZestAlgortihms Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout.managealgorithms;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.layout.LayoutToolAlgorithms;
+import org.eclipse.papyrus.layout.utils.Constants;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.osgi.framework.Bundle;
+
+/**
+ * The class ZestAlgortihms.
+ */
+public class ZestAlgortihms {
+
+ /**
+ * Gets the registered algorithmes.
+ *
+ * @return collection of algorithms registered
+ */
+ public static Collection<LayoutToolAlgorithms> getRegisteredAlgorithmes() {
+ IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
+ Constants.EXTENSION_POINT_ID_ALGORITHMS);
+ LinkedList<LayoutToolAlgorithms> algo = new LinkedList<LayoutToolAlgorithms>();
+ for(IConfigurationElement e : elements) {
+ try {
+ LayoutToolAlgorithms algorithm = new LayoutToolAlgorithms();
+ AlgorithmFactory factory = (AlgorithmFactory)e
+ .createExecutableExtension(Constants.EXTENSION_CLASS_ALGORITHMS);
+ algorithm.setAlgorithm(factory.createAlgorithm());
+ if(e.getAttribute(Constants.EXTENSION_NAME) != null) {
+ String name = e.getAttribute(Constants.EXTENSION_NAME);
+ name = format(name);
+ algorithm.setName(name);
+ }
+ if(e.getAttribute(Constants.EXTENSION_ICON) != null) {
+ algorithm.setIcon(getIcon(e, e.getAttribute(Constants.EXTENSION_ICON)));
+ }
+ if(e.getAttribute(Constants.EXTENSION_TOOLTIP) != null) {
+ algorithm.setToolTipText(e.getAttribute(Constants.EXTENSION_TOOLTIP));
+ }
+ if(e.getAttribute(Constants.EXTENSION_PATH) != null) {
+ algorithm.setPath(e.getAttribute(Constants.EXTENSION_PATH));
+ }
+ algo.add(algorithm);
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+ if(!algo.isEmpty()) {
+ Collections.sort(algo, new Comparator<LayoutToolAlgorithms>() {
+
+ public int compare(LayoutToolAlgorithms arg0, LayoutToolAlgorithms arg1) {
+ int length0 = 0;
+ if(arg0.getPath() != null) {
+ String[] pathSplit0 = arg0.getPath().split("\\.");
+ length0 = pathSplit0.length;
+ }
+ int length1 = 0;
+ if(arg1.getPath() != null) {
+ String[] pathSplit1 = arg1.getPath().split("\\.");
+ length1 = pathSplit1.length;
+ }
+ if(length1 == length0) {
+ String a = arg0.getPath() + arg0.getName();
+ String b = arg1.getPath() + arg1.getName();
+ if(a == null) {
+ a = "";
+ }
+ if(b == null) {
+ b = "";
+ }
+ return a.compareTo(b);
+ }
+ return length1 - length0;
+ }
+
+ });
+ }
+ }
+ return algo;
+ }
+
+ /**
+ * Format.
+ *
+ * @param name
+ * of algorithm
+ *
+ * @return name formated
+ */
+ private static String format(String name) {
+ String[] split = name.split("\\s");
+ StringBuffer result = new StringBuffer("");
+ for(String s : split) {
+ if(s.length() > 0) {
+ result.append(s.substring(0, 1).toUpperCase());
+ result.append(s.substring(1, s.length()).toLowerCase());
+ result.append(" ");
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * Gets the icon.
+ *
+ * @param e
+ * IConfigurationElement
+ * @param attribute
+ * name of icon
+ *
+ * @return icon of algorithm
+ */
+ private static Image getIcon(IConfigurationElement e, String attribute) {
+ try {
+ Bundle bundle = Platform.getBundle(e.getContributor().getName());
+ if(bundle != null) {
+ URL resource = bundle.getResource(attribute);
+ if(resource != null) {
+ return new Image(Display.getDefault(), resource.openStream());
+ }
+ }
+ } catch (InvalidRegistryObjectException e1) {
+ e1.printStackTrace();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/utils/Constants.java b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/utils/Constants.java
new file mode 100644
index 00000000000..382cbd44344
--- /dev/null
+++ b/extraplugins/layout/org.eclipse.papyrus.layout/src/org/eclipse/papyrus/layout/utils/Constants.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexia Allanic (Atos Origin) alexia.allanic@atosorigin.com - Constants Interface
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.layout.utils;
+
+/**
+ * Constants of layoutTool.
+ */
+public interface Constants {
+
+ /** The EXTENSIO n_ poin t_ id. */
+ String EXTENSION_POINT_ID = "org.eclipse.papyrus.layout";
+
+ /** The EXTENSIO n_ class. */
+ String EXTENSION_CLASS = "editor";
+
+ /** The EXTENSIO n_ interface. */
+ String EXTENSION_INTERFACE = "interface";
+
+ /** The EXTENSIO n_ poin t_ i d_ algorithms. */
+ String EXTENSION_POINT_ID_ALGORITHMS = "org.eclipse.papyrus.layout.algorithms";
+
+ /** The EXTENSIO n_ name. */
+ String EXTENSION_NAME = "name";
+
+ /** The EXTENSIO n_ icon. */
+ String EXTENSION_ICON = "icon";
+
+ /** The EXTENSIO n_ tooltip. */
+ String EXTENSION_TOOLTIP = "toolTipText";
+
+ /** The EXTENSIO n_ path. */
+ String EXTENSION_PATH = "path";
+
+ /** The EXTENSIO n_ clas s_ algorithms. */
+ String EXTENSION_CLASS_ALGORITHMS = "class";
+
+ /** The EXTENSIO n_ interfac e_ layou t_ area. */
+ String EXTENSION_INTERFACE_LAYOUT_AREA = "interfaceLayoutArea";
+}

Back to the top