Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-10-25 13:26:15 +0000
committercletavernie2011-10-25 13:26:15 +0000
commitc4c61404d724ba69d714ccab0c5ab797feff6b47 (patch)
tree34d177cd82bec3843c75e7b4879e0c7cd0838a8b /plugins
parenta81088d2b067355d41629d5f5e6abc5f1612bcc0 (diff)
downloadorg.eclipse.papyrus-c4c61404d724ba69d714ccab0c5ab797feff6b47.tar.gz
org.eclipse.papyrus-c4c61404d724ba69d714ccab0c5ab797feff6b47.tar.xz
org.eclipse.papyrus-c4c61404d724ba69d714ccab0c5ab797feff6b47.zip
359057: [Architecture - SVN - Build] The Papyrus architecture should be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359057
Diffstat (limited to 'plugins')
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.classpath7
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.project28
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF14
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/about.html28
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/build.properties7
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gifbin0 -> 206 bytes
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/plugin.properties16
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/plugin.xml14
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/Activator.java67
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java34
-rw-r--r--plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java156
12 files changed, 378 insertions, 0 deletions
diff --git a/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.classpath b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.project b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.project
new file mode 100644
index 00000000000..b75a69d1b13
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..36df415c5e5
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..e03ec880360
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.layouttool.algorithms.verticalsymmetryalgorithm.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.layouttool,
+ org.eclipse.zest.layouts
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
diff --git a/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/about.html b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/about.html
new file mode 100644
index 00000000000..35b45e096ae
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/build.properties b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/build.properties
new file mode 100644
index 00000000000..4a5c7b0c5f8
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gif b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gif
new file mode 100644
index 00000000000..30791a1f2a4
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/icons/vertsym.gif
Binary files differ
diff --git a/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/plugin.properties b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/plugin.properties
new file mode 100644
index 00000000000..7cda391c15f
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/plugin.xml b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/plugin.xml
new file mode 100644
index 00000000000..e5f22b74e4d
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.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.layouttool.algorithms">
+ <client
+ class="org.eclipse.papyrus.layouttool.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/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/Activator.java b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/Activator.java
new file mode 100644
index 00000000000..983aba052f3
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/Activator.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * 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.layouttool.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.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)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/VerticalSymmetryAlgorithm.java
new file mode 100644
index 00000000000..c62d81d8240
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/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.layouttool.algorithms.verticalsymmetryalgorithm;
+
+import org.eclipse.papyrus.layouttool.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.layouttool.managealgorithms.AlgorithmFactory#createAlgorithm()
+ */
+ public AbstractLayoutAlgorithm createAlgorithm() {
+ return new VerticalSymmetryLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING);
+ }
+
+}
diff --git a/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/algorithms/verticalsymmetryalgorithm/VerticalSymmetryLayoutAlgorithm.java
new file mode 100644
index 00000000000..ffe0308dc29
--- /dev/null
+++ b/plugins/layout/org.eclipse.papyrus.layouttool.algorithms.verticalSymmetryAlgorithm/src/org/eclipse/papyrus/layouttool/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.layouttool.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) {
+
+ }
+
+}

Back to the top