diff --git a/de.bmotionstudio.gef.editor/.classpath b/de.bmotionstudio.gef.editor/.classpath index eb3d99fb44fbeb8faf5f3a9ce53b8f861b189da0..237e0ae37e8eb0d5c5f6329b7255dfb0828e036e 100644 --- a/de.bmotionstudio.gef.editor/.classpath +++ b/de.bmotionstudio.gef.editor/.classpath @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry exported="true" kind="lib" path="lib/ext/antlr-2.7.7.jar"/> + <classpathentry exported="true" kind="lib" path="lib/ext/asm-4.0.jar"/> + <classpathentry exported="true" kind="lib" path="lib/ext/groovy-2.0.5.jar"/> <classpathentry exported="true" kind="lib" path="lib/ext/xmlpull-1.1.3.1.jar"/> <classpathentry exported="true" kind="lib" path="lib/ext/xstream-1.4.3.jar"/> - <classpathentry exported="true" kind="lib" path="lib/ext/groovy-all-1.8.6.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry exported="true" kind="lib" path="lib/ext/xpp3_min-1.1.4c.jar"/> - <classpathentry exported="true" kind="lib" path="lib/ext/animation-1.2.0.jar"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/de.bmotionstudio.gef.editor/META-INF/MANIFEST.MF b/de.bmotionstudio.gef.editor/META-INF/MANIFEST.MF index 2d871040eff0d77fed5f89404330d9708c2449d2..a1f5b177ffbd9e8a8e6c693ade7c06e116d2ac26 100644 --- a/de.bmotionstudio.gef.editor/META-INF/MANIFEST.MF +++ b/de.bmotionstudio.gef.editor/META-INF/MANIFEST.MF @@ -167,8 +167,9 @@ Export-Package: com.thoughtworks.xstream, org.eclipse.swt.widgets, de.bmotionstudio.gef.editor" Bundle-ClassPath: lib/ext/xpp3_min-1.1.4c.jar, - lib/ext/animation-1.2.0.jar, ., - lib/ext/groovy-all-1.8.6.jar, lib/ext/xstream-1.4.3.jar, - lib/ext/xmlpull-1.1.3.1.jar + lib/ext/xmlpull-1.1.3.1.jar, + lib/ext/groovy-2.0.5.jar, + lib/ext/asm-4.0.jar, + lib/ext/antlr-2.7.7.jar diff --git a/de.bmotionstudio.gef.editor/build.properties b/de.bmotionstudio.gef.editor/build.properties index bb67f31cd0b75abd29514ccd0fe927ff84dfdaeb..060f13bf792078f5816c4cb72ea98a6ce9d6f062 100644 --- a/de.bmotionstudio.gef.editor/build.properties +++ b/de.bmotionstudio.gef.editor/build.properties @@ -6,7 +6,9 @@ bin.includes = plugin.xml,\ icons/,\ schema/,\ lib/,\ - lib/ext/groovy-all-1.8.6.jar,\ lib/ext/xstream-1.4.3.jar,\ - lib/ext/xmlpull-1.1.3.1.jar + lib/ext/xmlpull-1.1.3.1.jar,\ + lib/ext/groovy-2.0.5.jar,\ + lib/ext/asm-4.0.jar,\ + lib/ext/antlr-2.7.7.jar diff --git a/de.bmotionstudio.gef.editor/lib/ext/animation-1.2.0.jar b/de.bmotionstudio.gef.editor/lib/ext/animation-1.2.0.jar deleted file mode 100644 index 8b763ca7874bde10b122e7988c525454b04faee1..0000000000000000000000000000000000000000 Binary files a/de.bmotionstudio.gef.editor/lib/ext/animation-1.2.0.jar and /dev/null differ diff --git a/de.bmotionstudio.gef.editor/lib/ext/ant-antlr-1.8.4.jar b/de.bmotionstudio.gef.editor/lib/ext/ant-antlr-1.8.4.jar new file mode 100644 index 0000000000000000000000000000000000000000..d375add78542222feb416561e84de767f30d8fd2 Binary files /dev/null and b/de.bmotionstudio.gef.editor/lib/ext/ant-antlr-1.8.4.jar differ diff --git a/de.bmotionstudio.gef.editor/lib/ext/antlr-2.7.7.jar b/de.bmotionstudio.gef.editor/lib/ext/antlr-2.7.7.jar new file mode 100644 index 0000000000000000000000000000000000000000..5e5f14b35584eac2a9f0f888769f0ab93ca6d849 Binary files /dev/null and b/de.bmotionstudio.gef.editor/lib/ext/antlr-2.7.7.jar differ diff --git a/de.bmotionstudio.gef.editor/lib/ext/asm-4.0.jar b/de.bmotionstudio.gef.editor/lib/ext/asm-4.0.jar new file mode 100644 index 0000000000000000000000000000000000000000..cca0d9cebf10f36c1f377a0f5534a8728f529a6b Binary files /dev/null and b/de.bmotionstudio.gef.editor/lib/ext/asm-4.0.jar differ diff --git a/de.bmotionstudio.gef.editor/lib/ext/groovy-2.0.5.jar b/de.bmotionstudio.gef.editor/lib/ext/groovy-2.0.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..f0ad9f47048ce6d2b04be8a879846d4aaf5ffcb7 Binary files /dev/null and b/de.bmotionstudio.gef.editor/lib/ext/groovy-2.0.5.jar differ diff --git a/de.bmotionstudio.gef.editor/lib/ext/groovy-all-1.8.6.jar b/de.bmotionstudio.gef.editor/lib/ext/groovy-all-1.8.6.jar deleted file mode 100644 index 03c02efae3759e2ba7d2a5766ade154550202ded..0000000000000000000000000000000000000000 Binary files a/de.bmotionstudio.gef.editor/lib/ext/groovy-all-1.8.6.jar and /dev/null differ diff --git a/de.bmotionstudio.gef.editor/plugin.xml b/de.bmotionstudio.gef.editor/plugin.xml index a01bc21c0526af38a363757f864efe363988b53f..cea3db2922feacc02bb59e9691cdfb4d220b03aa 100644 --- a/de.bmotionstudio.gef.editor/plugin.xml +++ b/de.bmotionstudio.gef.editor/plugin.xml @@ -142,13 +142,13 @@ <extension point="de.prob.core.animation"> <listener - class="de.bmotionstudio.gef.editor.animation.StaticListenerRegistry"> + class="de.bmotionstudio.gef.editor.StaticListenerRegistry"> </listener> </extension> <extension point="de.prob.core.lifecycle"> <listener - class="de.bmotionstudio.gef.editor.animation.StaticListenerRegistry"> + class="de.bmotionstudio.gef.editor.StaticListenerRegistry"> </listener> </extension> <extension diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/Animation.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/Animation.java index 736d82ce4494168f138ef4a9d5975d56b4a8084e..0725ead409ccbc55cc3a602e498d3189b6ba9b9c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/Animation.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/Animation.java @@ -13,7 +13,6 @@ import java.util.Map; import org.eclipse.swt.widgets.Display; -import de.bmotionstudio.gef.editor.animation.StaticListenerRegistry; import de.bmotionstudio.gef.editor.model.BControl; import de.bmotionstudio.gef.editor.model.Visualization; import de.prob.core.Animator; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java index 2d5013b10dc8c12cb1449236c5f642b195fd85ca..dd47255931b716b376cf656bbb4905283cc79d93 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java @@ -35,7 +35,6 @@ import org.xml.sax.SAXException; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.mapper.MapperWrapper; -import de.bmotionstudio.gef.editor.animation.StaticListenerRegistry; import de.bmotionstudio.gef.editor.internal.BMSConverter512; import de.bmotionstudio.gef.editor.model.Visualization; import de.prob.core.ILifecycleListener; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/StaticListenerRegistry.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java similarity index 94% rename from de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/StaticListenerRegistry.java rename to de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java index 8f7c73084ab2477a8d512b4671fb60de638edd53..9adfbab8813ae75f0cadeed5d362dd5852160261 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/StaticListenerRegistry.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java @@ -4,7 +4,7 @@ * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) * */ -package de.bmotionstudio.gef.editor.animation; +package de.bmotionstudio.gef.editor; import java.util.HashSet; import java.util.Set; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/AnimationMove.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/AnimationMove.java deleted file mode 100644 index c0a26f986af914db8ff304e31681264a89e9bca2..0000000000000000000000000000000000000000 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/AnimationMove.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * (c) 2009 Lehrstuhl fuer Softwaretechnik und Programmiersprachen, - * Heinrich Heine Universitaet Duesseldorf - * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) - * */ - -package de.bmotionstudio.gef.editor.animation; - -import java.util.ArrayList; - -import org.eclipse.draw2d.geometry.Point; - -import com.jgoodies.animation.AbstractAnimation; -import com.jgoodies.animation.AnimationFunction; -import com.jgoodies.animation.AnimationFunctions; -import com.jgoodies.animation.Animator; - -import de.bmotionstudio.gef.editor.AttributeConstants; -import de.bmotionstudio.gef.editor.model.BControl; - -public class AnimationMove extends AbstractAnimation { - - private AnimationFunction af; - - private ArrayList<Point> points = new ArrayList<Point>(); - - private Animator animator; - - private BControl control; - - public AnimationMove(long duration, boolean freezed, BControl control, - Integer toX, Integer toY) { - super(duration, freezed); - - this.control = control; - - Integer fromX = Integer.valueOf(control.getAttributeValue( - AttributeConstants.ATTRIBUTE_X).toString()); - Integer fromY = Integer.valueOf(control.getAttributeValue( - AttributeConstants.ATTRIBUTE_Y).toString()); - - Bresenham br = new Bresenham(); - br.plot(fromX, fromY, toX, toY); - - points.clear(); - - while (br.next()) { - Point pt = new Point(br.getX(), br.getY()); - points.add(pt); - } - - af = AnimationFunctions.discrete(duration(), points - .toArray(new Point[points.size()])); - } - - public void start() { - if (points != null) { - if (points.size() > 0) { - animator = new Animator(this, 30); - animator.start(); - } else { - fireAnimationStopped(30); - } - } - } - - protected void applyEffect(long time) { - Point pt = (Point) af.valueAt(time); - control.setLocation(pt); - } - -} diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/Bresenham.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/Bresenham.java deleted file mode 100644 index cd8105223e258f374e98d8cdde0369079a2130b9..0000000000000000000000000000000000000000 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/animation/Bresenham.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * (c) 2009 Lehrstuhl fuer Softwaretechnik und Programmiersprachen, - * Heinrich Heine Universitaet Duesseldorf - * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) - * */ - -package de.bmotionstudio.gef.editor.animation; - -public final class Bresenham { - - /** The start and end of the line */ - // private int x1, y1, x2, y2; - - /** Used for calculation */ - private int dx, dy, error, x_inc, y_inc, xx, yy, length, count; - - /** General case algorithm */ - private static final Bresenham bresenham = new Bresenham(); - - /** - * Construct a Bresenham algorithm. - */ - public Bresenham() { - } - - /** - * Plot a line between (x1,y1) and (x2,y2). To step through the line use - * next(). - * - * @return the length of the line (which will be 1 more than you are - * expecting). - */ - public int plot(int x1, int y1, int x2, int y2) { - // this.x1 = x1; - // this.x2 = x2; - // this.y1 = y1; - // this.y2 = y2; - - // compute horizontal and vertical deltas - dx = x2 - x1; - dy = y2 - y1; - - // test which direction the line is going in i.e. slope angle - if (dx >= 0) { - x_inc = 1; - } else { - x_inc = -1; - dx = -dx; // need absolute value - } - - // test y component of slope - - if (dy >= 0) { - y_inc = 1; - } else { - y_inc = -1; - dy = -dy; // need absolute value - } - - xx = x1; - yy = y1; - - if (dx > 0) - error = dx >> 1; - else - error = dy >> 1; - - count = 0; - length = Math.max(dx, dy) + 1; - return length; - } - - /** - * Get the next point in the line. You must not call next() if the previous - * invocation of next() returned false. - * - * Retrieve the X and Y coordinates of the line with getX() and getY(). - * - * @return true if there is another point to come. - */ - public boolean next() { - // now based on which delta is greater we can draw the line - if (dx > dy) { - // adjust the error term - error += dy; - - // test if error has overflowed - if (error >= dx) { - error -= dx; - - // move to next line - yy += y_inc; - } - - // move to the next pixel - xx += x_inc; - } else { - // adjust the error term - error += dx; - - // test if error overflowed - if (error >= dy) { - error -= dy; - - // move to next line - xx += x_inc; - } - - // move to the next pixel - yy += y_inc; - } - - count++; - return count < length; - } - - /** - * @return the current X coordinate - */ - public int getX() { - return xx; - } - - /** - * @return the current Y coordinate - */ - public int getY() { - return yy; - } - - /** - * Plot a line between (x1,y1) and (x2,y2). The results are placed in x[] - * and y[], which must be large enough. - * - * @return the length of the line or the length of x[]/y[], whichever is - * smaller - */ - public static final int plot(final int x1, final int y1, final int x2, - final int y2, final int x[], final int y[]) { - - int length = Math.min(x.length, Math.min(y.length, bresenham.plot(x1, - y1, x2, y2))); - for (int i = 0; i < length; i++) { - bresenham.next(); - x[i] = bresenham.getX(); - y[i] = bresenham.getY(); - } - - return length; - - /* - * - * int dx; // difference in x's int dy; // difference in y's int error = - * 0; // the discriminant i.e. error i.e. decision variable int x_inc; - * int y_inc; int index; // used for looping - * - * // compute horizontal and vertical deltas dx = x2 - x1; dy = y2 - y1; - * - * // test which direction the line is going in i.e. slope angle if (dx - * >= 0) { x_inc = 1; } else { x_inc = -1; dx = -dx; // need absolute - * value - * - * } - * - * // test y component of slope - * - * if (dy >= 0) { y_inc = 1; } else { y_inc = -1; dy = -dy; // need - * absolute value - * - * } - * - * int xx = x1, yy = y1; - * - * // now based on which delta is greater we can draw the line if (dx > - * dy) { error = dx >> 1; // draw the line for (index = 0; index <= dx - * && index < x.length; index++) { // remember the point x[index] = xx; - * y[index] = yy; - * - * // adjust the error term error += dy; - * - * // test if error has overflowed if (error >= dx) { error -= dx; - * - * // move to next line yy += y_inc; } - * - * // move to the next pixel xx += x_inc; } return Math.min(x.length, - * dx); } else { error = dy >> 1; // draw the line for (index = 0; index - * <= dy && index < y.length; index++) { // remember the point x[index] - * = xx; y[index] = yy; - * - * // adjust the error term error += dx; - * - * // test if error overflowed if (error >= dy) { error -= dy; - * - * // move to next line xx += x_inc; } - * - * // move to the next pixel yy += y_inc; } return Math.min(y.length, - * dy); } - */ - } -}