JBoss Tools SVN: r9248 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph: META-INF and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:34:11 -0400 (Wed, 23 Jul 2008)
New Revision: 9248
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/Activator.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlEditor.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/EndStateEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/JpdlEditPartFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/StartStateEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/StateEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/TransitionEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapperFactory.java
Log:
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF 2008-07-23 14:29:03 UTC (rev 9247)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF 2008-07-23 14:34:11 UTC (rev 9248)
@@ -12,4 +12,4 @@
org.eclipse.core.runtime;bundle-version="3.4.0",
org.jboss.tools.flow.jpdl4.core;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.jboss.tools.process.jpdl4.graph.Activator
+Bundle-Activator: org.jboss.tools.flow.jpdl4.graph.Activator
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml 2008-07-23 14:29:03 UTC (rev 9247)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml 2008-07-23 14:34:11 UTC (rev 9248)
@@ -8,7 +8,7 @@
extensions="jpdl4"
icon="icons/processH.gif"
contributorClass="org.jboss.tools.process.editor.GenericActionBarContributor"
- class="org.jboss.tools.process.jpdl4.graph.editor.JpdlEditor"
+ class="org.jboss.tools.flow.jpdl4.graph.editor.JpdlEditor"
id="org.jboss.tools.process.jpdl4.graph.editor.JpdlEditor">
</editor>
</extension>
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/Activator.java (from rev 9245, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/Activator.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/Activator.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/Activator.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,45 @@
+package org.jboss.tools.flow.jpdl4.graph;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.process.jpdl4.graph";
+
+ private static Activator plugin;
+
+ public Activator() {
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/Activator.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor (from rev 9245, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlEditor.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlEditor.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlEditor.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.graph.editor;
+package org.jboss.tools.flow.jpdl4.graph.editor;
import java.io.IOException;
import java.io.InputStream;
@@ -7,8 +7,8 @@
import org.eclipse.gef.EditPartFactory;
import org.eclipse.gef.palette.PaletteRoot;
import org.jboss.tools.flow.editor.GenericModelEditor;
-import org.jboss.tools.process.jpdl4.graph.editpart.JpdlEditPartFactory;
-import org.jboss.tools.process.jpdl4.graph.wrapper.ProcessWrapper;
+import org.jboss.tools.flow.jpdl4.graph.editpart.JpdlEditPartFactory;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.ProcessWrapper;
public class JpdlEditor extends GenericModelEditor {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlPaletteFactory.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.graph.editor;
+package org.jboss.tools.flow.jpdl4.graph.editor;
import java.util.ArrayList;
import java.util.List;
@@ -8,10 +8,10 @@
import org.eclipse.gef.requests.SimpleFactory;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.flow.editor.PaletteFactory;
-import org.jboss.tools.process.jpdl4.graph.Activator;
-import org.jboss.tools.process.jpdl4.graph.wrapper.StartStateWrapper;
-import org.jboss.tools.process.jpdl4.graph.wrapper.StateWrapper;
-import org.jboss.tools.process.jpdl4.graph.wrapper.TransitionWrapperFactory;
+import org.jboss.tools.flow.jpdl4.graph.Activator;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.StartStateWrapper;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.StateWrapper;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.TransitionWrapperFactory;
public class JpdlPaletteFactory extends PaletteFactory {
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart (from rev 9245, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/EndStateEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/EndStateEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/EndStateEditPart.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,11 +1,11 @@
-package org.jboss.tools.process.jpdl4.graph.editpart;
+package org.jboss.tools.flow.jpdl4.graph.editpart;
import org.eclipse.draw2d.IFigure;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.flow.editor.editpart.ElementEditPart;
import org.jboss.tools.flow.editor.figure.RectangleElementFigure;
-import org.jboss.tools.process.jpdl4.graph.Activator;
+import org.jboss.tools.flow.jpdl4.graph.Activator;
public class EndStateEditPart extends ElementEditPart {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/JpdlEditPartFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/JpdlEditPartFactory.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/JpdlEditPartFactory.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,12 +1,12 @@
-package org.jboss.tools.process.jpdl4.graph.editpart;
+package org.jboss.tools.flow.jpdl4.graph.editpart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
import org.jboss.tools.flow.editor.editpart.RootEditPart;
-import org.jboss.tools.process.jpdl4.graph.wrapper.ProcessWrapper;
-import org.jboss.tools.process.jpdl4.graph.wrapper.StartStateWrapper;
-import org.jboss.tools.process.jpdl4.graph.wrapper.StateWrapper;
-import org.jboss.tools.process.jpdl4.graph.wrapper.TransitionWrapper;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.ProcessWrapper;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.StartStateWrapper;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.StateWrapper;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.TransitionWrapper;
public class JpdlEditPartFactory implements EditPartFactory {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/StartStateEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StartStateEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/StartStateEditPart.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,11 +1,11 @@
-package org.jboss.tools.process.jpdl4.graph.editpart;
+package org.jboss.tools.flow.jpdl4.graph.editpart;
import org.eclipse.draw2d.IFigure;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.flow.editor.editpart.ElementEditPart;
import org.jboss.tools.flow.editor.figure.RectangleElementFigure;
-import org.jboss.tools.process.jpdl4.graph.Activator;
+import org.jboss.tools.flow.jpdl4.graph.Activator;
public class StartStateEditPart extends ElementEditPart {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/StateEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StateEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/StateEditPart.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.graph.editpart;
+package org.jboss.tools.flow.jpdl4.graph.editpart;
import org.eclipse.draw2d.IFigure;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -7,7 +7,7 @@
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.flow.editor.editpart.ElementEditPart;
import org.jboss.tools.flow.editor.figure.RoundedRectangleElementFigure;
-import org.jboss.tools.process.jpdl4.graph.Activator;
+import org.jboss.tools.flow.jpdl4.graph.Activator;
public class StateEditPart extends ElementEditPart {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/TransitionEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/TransitionEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editpart/TransitionEditPart.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,8 +1,8 @@
-package org.jboss.tools.process.jpdl4.graph.editpart;
+package org.jboss.tools.flow.jpdl4.graph.editpart;
import org.jboss.tools.flow.editor.core.ConnectionFactory;
import org.jboss.tools.flow.editor.editpart.ConnectionEditPart;
-import org.jboss.tools.process.jpdl4.graph.wrapper.TransitionWrapperFactory;
+import org.jboss.tools.flow.jpdl4.graph.wrapper.TransitionWrapperFactory;
public class TransitionEditPart extends ConnectionEditPart {
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper (from rev 9245, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,63 +0,0 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
-
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.AbstractNodeWrapper;
-import org.jboss.tools.process.jpdl4.core.Node;
-
-public abstract class BaseNodeWrapper extends AbstractNodeWrapper {
-
- public void setNode(Node node) {
- setElement(node);
- }
-
- public Node getNode() {
- return (Node) getElement();
- }
-
- public String getId() {
- long id = getNode().getId();
- return id == -1 ? null : getNode().getId() + "";
- }
-
- public String getName() {
- return getNode().getName();
- }
-
- public void internalSetName(String name) {
- getNode().setName(name);
- notifyListeners(CHANGE_VISUAL);
- }
-
- protected void internalSetConstraint(Rectangle constraint) {
- Node node = getNode();
- node.setMetaData("x", constraint.x);
- node.setMetaData("y", constraint.y);
- node.setMetaData("width", constraint.width);
- node.setMetaData("height", constraint.height);
- }
-
- public Rectangle internalGetConstraint() {
- Node node = getNode();
- Integer x = (Integer) node.getMetaData("x");
- Integer y = (Integer) node.getMetaData("y");
- Integer width = (Integer) node.getMetaData("width");
- Integer height = (Integer) node.getMetaData("height");
- return new Rectangle(
- x == null ? 0 : x,
- y == null ? 0 : y,
- width == null ? -1 : width,
- height == null ? -1 : height);
- }
-
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, BaseNodeWrapper source) {
- return source == null
- || ((BaseNodeWrapper) source).getNode().getNodeContainer() == getNode().getNodeContainer();
- }
-
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, BaseNodeWrapper target) {
- return target == null
- || ((BaseNodeWrapper) target).getNode().getNodeContainer() == getNode().getNodeContainer();
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java (from rev 9247, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/BaseNodeWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,63 @@
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.AbstractNodeWrapper;
+import org.jboss.tools.flow.jpdl4.core.Node;
+
+public abstract class BaseNodeWrapper extends AbstractNodeWrapper {
+
+ public void setNode(Node node) {
+ setElement(node);
+ }
+
+ public Node getNode() {
+ return (Node) getElement();
+ }
+
+ public String getId() {
+ long id = getNode().getId();
+ return id == -1 ? null : getNode().getId() + "";
+ }
+
+ public String getName() {
+ return getNode().getName();
+ }
+
+ public void internalSetName(String name) {
+ getNode().setName(name);
+ notifyListeners(CHANGE_VISUAL);
+ }
+
+ protected void internalSetConstraint(Rectangle constraint) {
+ Node node = getNode();
+ node.setMetaData("x", constraint.x);
+ node.setMetaData("y", constraint.y);
+ node.setMetaData("width", constraint.width);
+ node.setMetaData("height", constraint.height);
+ }
+
+ public Rectangle internalGetConstraint() {
+ Node node = getNode();
+ Integer x = (Integer) node.getMetaData("x");
+ Integer y = (Integer) node.getMetaData("y");
+ Integer width = (Integer) node.getMetaData("width");
+ Integer height = (Integer) node.getMetaData("height");
+ return new Rectangle(
+ x == null ? 0 : x,
+ y == null ? 0 : y,
+ width == null ? -1 : width,
+ height == null ? -1 : height);
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, BaseNodeWrapper source) {
+ return source == null
+ || ((BaseNodeWrapper) source).getNode().getNodeContainer() == getNode().getNodeContainer();
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, BaseNodeWrapper target) {
+ return target == null
+ || ((BaseNodeWrapper) target).getNode().getNodeContainer() == getNode().getNodeContainer();
+ }
+
+}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,26 +0,0 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
-
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.EndState;
-
-public class EndStateWrapper extends BaseNodeWrapper {
-
- public EndStateWrapper() {
- setElement(new EndState());
- setName("End");
- }
-
- public EndState getEndState() {
- return (EndState) getElement();
- }
-
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
- return super.acceptsIncomingConnection(connection, (BaseNodeWrapper)source)
- && getIncomingConnections().isEmpty();
- }
-
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
- return false;
- }
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java (from rev 9247, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,26 @@
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.jpdl4.core.EndState;
+
+public class EndStateWrapper extends BaseNodeWrapper {
+
+ public EndStateWrapper() {
+ setElement(new EndState());
+ setName("End");
+ }
+
+ public EndState getEndState() {
+ return (EndState) getElement();
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ return super.acceptsIncomingConnection(connection, (BaseNodeWrapper)source)
+ && getIncomingConnections().isEmpty();
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ return false;
+ }
+}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,56 +0,0 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
-
-import org.jboss.tools.flow.editor.core.AbstractRootWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.Node;
-import org.jboss.tools.process.jpdl4.core.Process;
-
-public class ProcessWrapper extends AbstractRootWrapper {
-
- private static final long serialVersionUID = 400L;
-
- public ProcessWrapper() {
- setElement(new Process());
- }
-
- public Process getProcess() {
- return (Process) getElement();
- }
-
- public String getName() {
- return getProcess().getName();
- }
-
- public void setName(String name) {
- getProcess().setName(name);
- }
-
- public Integer getRouterLayout() {
- Integer routerLayout = (Integer) getProcess().getMetaData("routerLayout");
- if (routerLayout == null) {
- return ROUTER_LAYOUT_MANUAL;
- }
- return routerLayout;
- }
-
- public void internalSetRouterLayout(Integer routerLayout) {
- getProcess().setMetaData("routerLayout", routerLayout);
- }
-
- protected void internalAddElement(NodeWrapper element) {
- Node node = ((BaseNodeWrapper) element).getNode();
- long id = 0;
- for (Node n: getProcess().getNodes()) {
- if (n.getId() > id) {
- id = n.getId();
- }
- }
- node.setId(++id);
- getProcess().addNode(node);
- }
-
- protected void internalRemoveElement(NodeWrapper element) {
- getProcess().removeNode(((BaseNodeWrapper) element).getNode());
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java (from rev 9247, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,56 @@
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractRootWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.jpdl4.core.Node;
+import org.jboss.tools.flow.jpdl4.core.Process;
+
+public class ProcessWrapper extends AbstractRootWrapper {
+
+ private static final long serialVersionUID = 400L;
+
+ public ProcessWrapper() {
+ setElement(new Process());
+ }
+
+ public Process getProcess() {
+ return (Process) getElement();
+ }
+
+ public String getName() {
+ return getProcess().getName();
+ }
+
+ public void setName(String name) {
+ getProcess().setName(name);
+ }
+
+ public Integer getRouterLayout() {
+ Integer routerLayout = (Integer) getProcess().getMetaData("routerLayout");
+ if (routerLayout == null) {
+ return ROUTER_LAYOUT_MANUAL;
+ }
+ return routerLayout;
+ }
+
+ public void internalSetRouterLayout(Integer routerLayout) {
+ getProcess().setMetaData("routerLayout", routerLayout);
+ }
+
+ protected void internalAddElement(NodeWrapper element) {
+ Node node = ((BaseNodeWrapper) element).getNode();
+ long id = 0;
+ for (Node n: getProcess().getNodes()) {
+ if (n.getId() > id) {
+ id = n.getId();
+ }
+ }
+ node.setId(++id);
+ getProcess().addNode(node);
+ }
+
+ protected void internalRemoveElement(NodeWrapper element) {
+ getProcess().removeNode(((BaseNodeWrapper) element).getNode());
+ }
+
+}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,28 +0,0 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
-
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.StartState;
-
-public class StartStateWrapper extends BaseNodeWrapper {
-
- private static final long serialVersionUID = 1L;
-
- public StartStateWrapper() {
- setElement(new StartState());
- setName("Start");
- }
-
- public StartState getStartState() {
- return (StartState) getElement();
- }
-
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
- return false;
- }
-
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
- return super.acceptsOutgoingConnection(connection, (BaseNodeWrapper)target)
- && getOutgoingConnections().isEmpty();
- }
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java (from rev 9247, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,28 @@
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.jpdl4.core.StartState;
+
+public class StartStateWrapper extends BaseNodeWrapper {
+
+ private static final long serialVersionUID = 1L;
+
+ public StartStateWrapper() {
+ setElement(new StartState());
+ setName("Start");
+ }
+
+ public StartState getStartState() {
+ return (StartState) getElement();
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ return false;
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ return super.acceptsOutgoingConnection(connection, (BaseNodeWrapper)target)
+ && getOutgoingConnections().isEmpty();
+ }
+}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,28 +0,0 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
-
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.State;
-
-public class StateWrapper extends BaseNodeWrapper {
-
- public StateWrapper() {
- setElement(new State());
- getState().setName("State");
- }
-
- public State getState() {
- return (State) getElement();
- }
-
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
- return super.acceptsIncomingConnection(connection, (BaseNodeWrapper)source)
- && getIncomingConnections().isEmpty();
- }
-
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
- return super.acceptsOutgoingConnection(connection, (BaseNodeWrapper)target)
- && getOutgoingConnections().isEmpty();
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java (from rev 9247, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,28 @@
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.jpdl4.core.State;
+
+public class StateWrapper extends BaseNodeWrapper {
+
+ public StateWrapper() {
+ setElement(new State());
+ getState().setName("State");
+ }
+
+ public State getState() {
+ return (State) getElement();
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ return super.acceptsIncomingConnection(connection, (BaseNodeWrapper)source)
+ && getIncomingConnections().isEmpty();
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ return super.acceptsOutgoingConnection(connection, (BaseNodeWrapper)target)
+ && getOutgoingConnections().isEmpty();
+ }
+
+}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,68 +0,0 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.Node;
-import org.jboss.tools.process.jpdl4.core.Transition;
-
-public class TransitionWrapper extends AbstractConnectionWrapper {
-
- public TransitionWrapper() {
- }
-
- public Transition getTransition() {
- return (Transition)getElement();
- }
-
- public void localSetTransition(Transition transition) {
- setElement(transition);
- }
-
- public void connect(NodeWrapper source, NodeWrapper target) {
- super.connect(source, target);
- Node from = ((BaseNodeWrapper) getSource()).getNode();
- Node to = ((BaseNodeWrapper) getTarget()).getNode();
- setElement(new Transition(from, to));
- }
-
- protected List<Point> internalGetBendpoints() {
- return (List<Point>) stringToBendpoints((String) getTransition().getMetaData("bendpoints"));
- }
-
- protected void internalSetBendpoints(List<Point> bendpoints) {
- getTransition().setMetaData("bendpoints", bendpointsToString(bendpoints));
- }
-
- private String bendpointsToString(List<Point> bendpoints) {
- if (bendpoints == null) {
- return null;
- }
- String result = "[";
- for (Iterator<Point> iterator = bendpoints.iterator(); iterator.hasNext(); ) {
- Point point = iterator.next();
- result += point.x + "," + point.y + (iterator.hasNext() ? ";" : "");
- }
- result += "]";
- return result;
- }
-
- private List<Point> stringToBendpoints(String s) {
- List<Point> result = new ArrayList<Point>();
- if (s == null) {
- return result;
- }
- s = s.substring(1, s.length() - 1);
- String[] bendpoints = s.split(";");
- for (String bendpoint: bendpoints) {
- String[] xy = bendpoint.split(",");
- result.add(new Point(new Integer(xy[0]), new Integer(xy[1])));
- }
- return result;
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java (from rev 9247, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapper.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -0,0 +1,68 @@
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.jpdl4.core.Node;
+import org.jboss.tools.flow.jpdl4.core.Transition;
+
+public class TransitionWrapper extends AbstractConnectionWrapper {
+
+ public TransitionWrapper() {
+ }
+
+ public Transition getTransition() {
+ return (Transition)getElement();
+ }
+
+ public void localSetTransition(Transition transition) {
+ setElement(transition);
+ }
+
+ public void connect(NodeWrapper source, NodeWrapper target) {
+ super.connect(source, target);
+ Node from = ((BaseNodeWrapper) getSource()).getNode();
+ Node to = ((BaseNodeWrapper) getTarget()).getNode();
+ setElement(new Transition(from, to));
+ }
+
+ protected List<Point> internalGetBendpoints() {
+ return (List<Point>) stringToBendpoints((String) getTransition().getMetaData("bendpoints"));
+ }
+
+ protected void internalSetBendpoints(List<Point> bendpoints) {
+ getTransition().setMetaData("bendpoints", bendpointsToString(bendpoints));
+ }
+
+ private String bendpointsToString(List<Point> bendpoints) {
+ if (bendpoints == null) {
+ return null;
+ }
+ String result = "[";
+ for (Iterator<Point> iterator = bendpoints.iterator(); iterator.hasNext(); ) {
+ Point point = iterator.next();
+ result += point.x + "," + point.y + (iterator.hasNext() ? ";" : "");
+ }
+ result += "]";
+ return result;
+ }
+
+ private List<Point> stringToBendpoints(String s) {
+ List<Point> result = new ArrayList<Point>();
+ if (s == null) {
+ return result;
+ }
+ s = s.substring(1, s.length() - 1);
+ String[] bendpoints = s.split(";");
+ for (String bendpoint: bendpoints) {
+ String[] xy = bendpoint.split(",");
+ result.add(new Point(new Integer(xy[0]), new Integer(xy[1])));
+ }
+ return result;
+ }
+
+}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapperFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapperFactory.java 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/TransitionWrapperFactory.java 2008-07-23 14:34:11 UTC (rev 9248)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.graph.wrapper;
+package org.jboss.tools.flow.jpdl4.graph.wrapper;
import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.ConnectionFactory;
16 years, 5 months
JBoss Tools SVN: r9247 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:29:03 -0400 (Wed, 23 Jul 2008)
New Revision: 9247
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java
Log:
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java 2008-07-23 14:27:17 UTC (rev 9246)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java 2008-07-23 14:29:03 UTC (rev 9247)
@@ -3,7 +3,7 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.AbstractNodeWrapper;
-import org.jboss.tools.process.jpdl4.core.Node;
+import org.jboss.tools.flow.jpdl4.core.Node;
public abstract class BaseNodeWrapper extends AbstractNodeWrapper {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java 2008-07-23 14:27:17 UTC (rev 9246)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java 2008-07-23 14:29:03 UTC (rev 9247)
@@ -2,7 +2,7 @@
import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.EndState;
+import org.jboss.tools.flow.jpdl4.core.EndState;
public class EndStateWrapper extends BaseNodeWrapper {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-23 14:27:17 UTC (rev 9246)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-23 14:29:03 UTC (rev 9247)
@@ -2,8 +2,8 @@
import org.jboss.tools.flow.editor.core.AbstractRootWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.Node;
-import org.jboss.tools.process.jpdl4.core.Process;
+import org.jboss.tools.flow.jpdl4.core.Node;
+import org.jboss.tools.flow.jpdl4.core.Process;
public class ProcessWrapper extends AbstractRootWrapper {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-23 14:27:17 UTC (rev 9246)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-23 14:29:03 UTC (rev 9247)
@@ -2,7 +2,7 @@
import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.StartState;
+import org.jboss.tools.flow.jpdl4.core.StartState;
public class StartStateWrapper extends BaseNodeWrapper {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java 2008-07-23 14:27:17 UTC (rev 9246)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java 2008-07-23 14:29:03 UTC (rev 9247)
@@ -2,7 +2,7 @@
import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.State;
+import org.jboss.tools.flow.jpdl4.core.State;
public class StateWrapper extends BaseNodeWrapper {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java 2008-07-23 14:27:17 UTC (rev 9246)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java 2008-07-23 14:29:03 UTC (rev 9247)
@@ -7,8 +7,8 @@
import org.eclipse.draw2d.geometry.Point;
import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
-import org.jboss.tools.process.jpdl4.core.Node;
-import org.jboss.tools.process.jpdl4.core.Transition;
+import org.jboss.tools.flow.jpdl4.core.Node;
+import org.jboss.tools.flow.jpdl4.core.Transition;
public class TransitionWrapper extends AbstractConnectionWrapper {
16 years, 5 months
JBoss Tools SVN: r9246 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core: src/org/jboss/tools and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:27:17 -0400 (Wed, 23 Jul 2008)
New Revision: 9246
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/EndState.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Node.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/StartState.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/State.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Transition.java
Log:
process -> flow
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF 2008-07-23 14:26:18 UTC (rev 9245)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF 2008-07-23 14:27:17 UTC (rev 9246)
@@ -5,4 +5,4 @@
Bundle-Version: 1.0.0
Bundle-Vendor: JBoss, a Division of Red Hat
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.jboss.tools.process.jpdl4.core
+Export-Package: org.jboss.tools.flow.jpdl4.core
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core (from rev 9243, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/EndState.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/EndState.java 2008-07-23 14:24:42 UTC (rev 9243)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/EndState.java 2008-07-23 14:27:17 UTC (rev 9246)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.core;
+package org.jboss.tools.flow.jpdl4.core;
public class EndState extends Node {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Node.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Node.java 2008-07-23 14:24:42 UTC (rev 9243)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Node.java 2008-07-23 14:27:17 UTC (rev 9246)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.core;
+package org.jboss.tools.flow.jpdl4.core;
import java.util.HashMap;
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Process.java 2008-07-23 14:24:42 UTC (rev 9243)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java 2008-07-23 14:27:17 UTC (rev 9246)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.core;
+package org.jboss.tools.flow.jpdl4.core;
import java.util.ArrayList;
import java.util.HashMap;
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/StartState.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/StartState.java 2008-07-23 14:24:42 UTC (rev 9243)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/StartState.java 2008-07-23 14:27:17 UTC (rev 9246)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.core;
+package org.jboss.tools.flow.jpdl4.core;
public class StartState extends Node {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/State.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/State.java 2008-07-23 14:24:42 UTC (rev 9243)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/State.java 2008-07-23 14:27:17 UTC (rev 9246)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.core;
+package org.jboss.tools.flow.jpdl4.core;
public class State extends Node {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Transition.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Transition.java 2008-07-23 14:24:42 UTC (rev 9243)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Transition.java 2008-07-23 14:27:17 UTC (rev 9246)
@@ -1,4 +1,4 @@
-package org.jboss.tools.process.jpdl4.core;
+package org.jboss.tools.flow.jpdl4.core;
import java.util.HashMap;
16 years, 5 months
JBoss Tools SVN: r9245 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph: .settings and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:26:18 -0400 (Wed, 23 Jul 2008)
New Revision: 9245
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.classpath
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.project
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.settings/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.settings/org.eclipse.jdt.core.prefs
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/build.properties
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/end.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/process.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/processH.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/processV.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/start.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/state.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/Activator.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlEditor.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlPaletteFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/EndStateEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/JpdlEditPartFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StartStateEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StateEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/TransitionEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapperFactory.java
Log:
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.classpath
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.classpath (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.classpath 2008-07-23 14:26:18 UTC (rev 9245)
@@ -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>
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.project
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.project (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.project 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.flow.jpdl4.graph</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>
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/.settings/org.eclipse.jdt.core.prefs 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,7 @@
+#Tue Jul 15 11:36:35 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/META-INF/MANIFEST.MF 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Jpdl4 Plug-in
+Bundle-SymbolicName: org.jboss.tools.flow.jpdl4.graph;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: JBoss, a Division of Red Hat
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.jboss.tools.flow.common.graph;bundle-version="1.0.0",
+ org.eclipse.core.resources;bundle-version="3.4.0",
+ org.eclipse.gef;bundle-version="3.4.0",
+ org.eclipse.ui;bundle-version="3.4.0",
+ org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.jboss.tools.flow.jpdl4.core;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.jboss.tools.process.jpdl4.graph.Activator
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/build.properties
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/build.properties (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/build.properties 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/end.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/end.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/process.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/process.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/processH.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/processH.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/processV.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/processV.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/start.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/start.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/state.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/state.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/plugin.xml 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ name="RuleFlow Editor"
+ extensions="jpdl4"
+ icon="icons/processH.gif"
+ contributorClass="org.jboss.tools.process.editor.GenericActionBarContributor"
+ class="org.jboss.tools.process.jpdl4.graph.editor.JpdlEditor"
+ id="org.jboss.tools.process.jpdl4.graph.editor.JpdlEditor">
+ </editor>
+ </extension>
+
+ <extension
+ point = "org.eclipse.ui.editorActions">
+ <editorContribution
+ id="org.jboss.tools.process.editor.action.VerticalAutoLayoutAction"
+ targetID="org.jboss.tools.process.jpdl4.graph.editor.JpdlEditor">
+ <action
+ id="org.jboss.tools.process.editor.action.VerticalAutoLayoutAction"
+ label="Auto Layout (Vertical)"
+ toolbarPath="Process"
+ icon="icons/processV.gif"
+ tooltip="Auto layout the process (vertical)"
+ class="org.jboss.tools.process.editor.action.VerticalAutoLayoutAction"
+ />
+ </editorContribution>
+ <editorContribution
+ id="org.jboss.tools.process.editor.action.HorizontalAutoLayoutAction"
+ targetID="org.jboss.tools.process.jpdl4.graph.editor.JpdlEditor">
+ <action
+ id="org.jboss.tools.process.editor.action.HorizontalAutoLayoutAction"
+ label="Auto Layout (Horizontal)"
+ toolbarPath="Process"
+ icon="icons/processH.gif"
+ tooltip="Auto layout the process (horizontal)"
+ class="org.jboss.tools.process.editor.action.HorizontalAutoLayoutAction"
+ />
+ </editorContribution>
+ </extension>
+
+</plugin>
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/Activator.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/Activator.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,45 @@
+package org.jboss.tools.process.jpdl4.graph;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.process.jpdl4.graph";
+
+ private static Activator plugin;
+
+ public Activator() {
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlEditor.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlEditor.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlEditor.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,35 @@
+package org.jboss.tools.process.jpdl4.graph.editor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.jboss.tools.flow.editor.GenericModelEditor;
+import org.jboss.tools.process.jpdl4.graph.editpart.JpdlEditPartFactory;
+import org.jboss.tools.process.jpdl4.graph.wrapper.ProcessWrapper;
+
+public class JpdlEditor extends GenericModelEditor {
+
+ protected EditPartFactory createEditPartFactory() {
+ return new JpdlEditPartFactory();
+ }
+
+ protected PaletteRoot createPalette() {
+ return new JpdlPaletteFactory().createPalette();
+ }
+
+ protected Object createModel() {
+ return new ProcessWrapper();
+ }
+
+ protected void writeModel(OutputStream os) throws IOException {
+ // TODO
+ }
+
+ protected void createModel(InputStream is) {
+ // TODO
+ setModel(createModel());
+ }
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlPaletteFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlPaletteFactory.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editor/JpdlPaletteFactory.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,48 @@
+package org.jboss.tools.process.jpdl4.graph.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
+import org.eclipse.gef.palette.PaletteEntry;
+import org.eclipse.gef.requests.SimpleFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.flow.editor.PaletteFactory;
+import org.jboss.tools.process.jpdl4.graph.Activator;
+import org.jboss.tools.process.jpdl4.graph.wrapper.StartStateWrapper;
+import org.jboss.tools.process.jpdl4.graph.wrapper.StateWrapper;
+import org.jboss.tools.process.jpdl4.graph.wrapper.TransitionWrapperFactory;
+
+public class JpdlPaletteFactory extends PaletteFactory {
+
+ public JpdlPaletteFactory() {
+ super(new TransitionWrapperFactory());
+ }
+
+ protected List<PaletteEntry> createComponentEntries() {
+ List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
+
+ CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
+ "Start",
+ "Create a new Start State",
+ StartStateWrapper.class,
+ new SimpleFactory(StartStateWrapper.class),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/start.gif")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/start.gif"))
+ );
+ entries.add(combined);
+
+ combined = new CombinedTemplateCreationEntry(
+ "State",
+ "Create a new State",
+ StateWrapper.class,
+ new SimpleFactory(StateWrapper.class),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/state.gif")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/state.gif"))
+ );
+ entries.add(combined);
+
+ return entries;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/EndStateEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/EndStateEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/EndStateEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,21 @@
+package org.jboss.tools.process.jpdl4.graph.editpart;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.editor.editpart.ElementEditPart;
+import org.jboss.tools.flow.editor.figure.RectangleElementFigure;
+import org.jboss.tools.process.jpdl4.graph.Activator;
+
+public class EndStateEditPart extends ElementEditPart {
+
+ private static final Image ICON = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry("icons/start.gif")).createImage();
+
+ protected IFigure createFigure() {
+ RectangleElementFigure figure = new RectangleElementFigure();
+ figure.setIcon(ICON);
+ return figure;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/JpdlEditPartFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/JpdlEditPartFactory.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/JpdlEditPartFactory.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,31 @@
+package org.jboss.tools.process.jpdl4.graph.editpart;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.jboss.tools.flow.editor.editpart.RootEditPart;
+import org.jboss.tools.process.jpdl4.graph.wrapper.ProcessWrapper;
+import org.jboss.tools.process.jpdl4.graph.wrapper.StartStateWrapper;
+import org.jboss.tools.process.jpdl4.graph.wrapper.StateWrapper;
+import org.jboss.tools.process.jpdl4.graph.wrapper.TransitionWrapper;
+
+public class JpdlEditPartFactory implements EditPartFactory {
+
+ public EditPart createEditPart(EditPart context, Object model) {
+ EditPart result = null;
+ if (model instanceof ProcessWrapper) {
+ result = new RootEditPart();
+ } else if (model instanceof StartStateWrapper) {
+ result = new StartStateEditPart();
+ } else if (model instanceof StateWrapper) {
+ result = new StateEditPart();
+ } else if (model instanceof TransitionWrapper) {
+ result = new TransitionEditPart();
+ } else {
+ throw new IllegalArgumentException(
+ "Unknown model object " + model);
+ }
+ result.setModel(model);
+ return result;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StartStateEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StartStateEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StartStateEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,21 @@
+package org.jboss.tools.process.jpdl4.graph.editpart;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.editor.editpart.ElementEditPart;
+import org.jboss.tools.flow.editor.figure.RectangleElementFigure;
+import org.jboss.tools.process.jpdl4.graph.Activator;
+
+public class StartStateEditPart extends ElementEditPart {
+
+ private static final Image ICON = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry("icons/start.gif")).createImage();
+
+ protected IFigure createFigure() {
+ RectangleElementFigure figure = new RectangleElementFigure();
+ figure.setIcon(ICON);
+ return figure;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StateEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StateEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/StateEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,25 @@
+package org.jboss.tools.process.jpdl4.graph.editpart;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.flow.editor.editpart.ElementEditPart;
+import org.jboss.tools.flow.editor.figure.RoundedRectangleElementFigure;
+import org.jboss.tools.process.jpdl4.graph.Activator;
+
+public class StateEditPart extends ElementEditPart {
+
+ private static final Image ICON = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry("icons/state.gif")).createImage();
+ private static final Color COLOR = new Color(Display.getCurrent(), 255, 250, 205);
+
+ protected IFigure createFigure() {
+ RoundedRectangleElementFigure figure = new RoundedRectangleElementFigure();
+ figure.setIcon(ICON);
+ figure.setColor(COLOR);
+ return figure;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/TransitionEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/TransitionEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/editpart/TransitionEditPart.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,13 @@
+package org.jboss.tools.process.jpdl4.graph.editpart;
+
+import org.jboss.tools.flow.editor.core.ConnectionFactory;
+import org.jboss.tools.flow.editor.editpart.ConnectionEditPart;
+import org.jboss.tools.process.jpdl4.graph.wrapper.TransitionWrapperFactory;
+
+public class TransitionEditPart extends ConnectionEditPart {
+
+ protected ConnectionFactory getElementConnectionFactory() {
+ return new TransitionWrapperFactory();
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/BaseNodeWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,63 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.AbstractNodeWrapper;
+import org.jboss.tools.process.jpdl4.core.Node;
+
+public abstract class BaseNodeWrapper extends AbstractNodeWrapper {
+
+ public void setNode(Node node) {
+ setElement(node);
+ }
+
+ public Node getNode() {
+ return (Node) getElement();
+ }
+
+ public String getId() {
+ long id = getNode().getId();
+ return id == -1 ? null : getNode().getId() + "";
+ }
+
+ public String getName() {
+ return getNode().getName();
+ }
+
+ public void internalSetName(String name) {
+ getNode().setName(name);
+ notifyListeners(CHANGE_VISUAL);
+ }
+
+ protected void internalSetConstraint(Rectangle constraint) {
+ Node node = getNode();
+ node.setMetaData("x", constraint.x);
+ node.setMetaData("y", constraint.y);
+ node.setMetaData("width", constraint.width);
+ node.setMetaData("height", constraint.height);
+ }
+
+ public Rectangle internalGetConstraint() {
+ Node node = getNode();
+ Integer x = (Integer) node.getMetaData("x");
+ Integer y = (Integer) node.getMetaData("y");
+ Integer width = (Integer) node.getMetaData("width");
+ Integer height = (Integer) node.getMetaData("height");
+ return new Rectangle(
+ x == null ? 0 : x,
+ y == null ? 0 : y,
+ width == null ? -1 : width,
+ height == null ? -1 : height);
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, BaseNodeWrapper source) {
+ return source == null
+ || ((BaseNodeWrapper) source).getNode().getNodeContainer() == getNode().getNodeContainer();
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, BaseNodeWrapper target) {
+ return target == null
+ || ((BaseNodeWrapper) target).getNode().getNodeContainer() == getNode().getNodeContainer();
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/EndStateWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,26 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.process.jpdl4.core.EndState;
+
+public class EndStateWrapper extends BaseNodeWrapper {
+
+ public EndStateWrapper() {
+ setElement(new EndState());
+ setName("End");
+ }
+
+ public EndState getEndState() {
+ return (EndState) getElement();
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ return super.acceptsIncomingConnection(connection, (BaseNodeWrapper)source)
+ && getIncomingConnections().isEmpty();
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ return false;
+ }
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,56 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractRootWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.process.jpdl4.core.Node;
+import org.jboss.tools.process.jpdl4.core.Process;
+
+public class ProcessWrapper extends AbstractRootWrapper {
+
+ private static final long serialVersionUID = 400L;
+
+ public ProcessWrapper() {
+ setElement(new Process());
+ }
+
+ public Process getProcess() {
+ return (Process) getElement();
+ }
+
+ public String getName() {
+ return getProcess().getName();
+ }
+
+ public void setName(String name) {
+ getProcess().setName(name);
+ }
+
+ public Integer getRouterLayout() {
+ Integer routerLayout = (Integer) getProcess().getMetaData("routerLayout");
+ if (routerLayout == null) {
+ return ROUTER_LAYOUT_MANUAL;
+ }
+ return routerLayout;
+ }
+
+ public void internalSetRouterLayout(Integer routerLayout) {
+ getProcess().setMetaData("routerLayout", routerLayout);
+ }
+
+ protected void internalAddElement(NodeWrapper element) {
+ Node node = ((BaseNodeWrapper) element).getNode();
+ long id = 0;
+ for (Node n: getProcess().getNodes()) {
+ if (n.getId() > id) {
+ id = n.getId();
+ }
+ }
+ node.setId(++id);
+ getProcess().addNode(node);
+ }
+
+ protected void internalRemoveElement(NodeWrapper element) {
+ getProcess().removeNode(((BaseNodeWrapper) element).getNode());
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,28 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.process.jpdl4.core.StartState;
+
+public class StartStateWrapper extends BaseNodeWrapper {
+
+ private static final long serialVersionUID = 1L;
+
+ public StartStateWrapper() {
+ setElement(new StartState());
+ setName("Start");
+ }
+
+ public StartState getStartState() {
+ return (StartState) getElement();
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ return false;
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ return super.acceptsOutgoingConnection(connection, (BaseNodeWrapper)target)
+ && getOutgoingConnections().isEmpty();
+ }
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/StateWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,28 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.process.jpdl4.core.State;
+
+public class StateWrapper extends BaseNodeWrapper {
+
+ public StateWrapper() {
+ setElement(new State());
+ getState().setName("State");
+ }
+
+ public State getState() {
+ return (State) getElement();
+ }
+
+ public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ return super.acceptsIncomingConnection(connection, (BaseNodeWrapper)source)
+ && getIncomingConnections().isEmpty();
+ }
+
+ public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ return super.acceptsOutgoingConnection(connection, (BaseNodeWrapper)target)
+ && getOutgoingConnections().isEmpty();
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapper.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,68 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.process.jpdl4.core.Node;
+import org.jboss.tools.process.jpdl4.core.Transition;
+
+public class TransitionWrapper extends AbstractConnectionWrapper {
+
+ public TransitionWrapper() {
+ }
+
+ public Transition getTransition() {
+ return (Transition)getElement();
+ }
+
+ public void localSetTransition(Transition transition) {
+ setElement(transition);
+ }
+
+ public void connect(NodeWrapper source, NodeWrapper target) {
+ super.connect(source, target);
+ Node from = ((BaseNodeWrapper) getSource()).getNode();
+ Node to = ((BaseNodeWrapper) getTarget()).getNode();
+ setElement(new Transition(from, to));
+ }
+
+ protected List<Point> internalGetBendpoints() {
+ return (List<Point>) stringToBendpoints((String) getTransition().getMetaData("bendpoints"));
+ }
+
+ protected void internalSetBendpoints(List<Point> bendpoints) {
+ getTransition().setMetaData("bendpoints", bendpointsToString(bendpoints));
+ }
+
+ private String bendpointsToString(List<Point> bendpoints) {
+ if (bendpoints == null) {
+ return null;
+ }
+ String result = "[";
+ for (Iterator<Point> iterator = bendpoints.iterator(); iterator.hasNext(); ) {
+ Point point = iterator.next();
+ result += point.x + "," + point.y + (iterator.hasNext() ? ";" : "");
+ }
+ result += "]";
+ return result;
+ }
+
+ private List<Point> stringToBendpoints(String s) {
+ List<Point> result = new ArrayList<Point>();
+ if (s == null) {
+ return result;
+ }
+ s = s.substring(1, s.length() - 1);
+ String[] bendpoints = s.split(";");
+ for (String bendpoint: bendpoints) {
+ String[] xy = bendpoint.split(",");
+ result.add(new Point(new Integer(xy[0]), new Integer(xy[1])));
+ }
+ return result;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapperFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapperFactory.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/process/jpdl4/graph/wrapper/TransitionWrapperFactory.java 2008-07-23 14:26:18 UTC (rev 9245)
@@ -0,0 +1,12 @@
+package org.jboss.tools.process.jpdl4.graph.wrapper;
+
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.ConnectionFactory;
+
+public class TransitionWrapperFactory implements ConnectionFactory {
+
+ public AbstractConnectionWrapper createElementConnection() {
+ return new TransitionWrapper();
+ }
+
+}
16 years, 5 months
JBoss Tools SVN: r9244 - trunk/jbpm/plugins.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:25:44 -0400 (Wed, 23 Jul 2008)
New Revision: 9244
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/
Log:
Initial import.
16 years, 5 months
JBoss Tools SVN: r9243 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core: .settings and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:24:42 -0400 (Wed, 23 Jul 2008)
New Revision: 9243
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.classpath
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.project
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.settings/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.settings/org.eclipse.jdt.core.prefs
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/build.properties
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/EndState.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Node.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Process.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/StartState.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/State.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Transition.java
Log:
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.classpath
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.classpath (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.classpath 2008-07-23 14:24:42 UTC (rev 9243)
@@ -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>
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.project
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.project (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.project 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.flow.jpdl4.core</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>
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/.settings/org.eclipse.jdt.core.prefs 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,7 @@
+#Tue Jul 15 16:33:56 CEST 2008
+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
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/META-INF/MANIFEST.MF 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Core Plug-in
+Bundle-SymbolicName: org.jboss.tools.flow.jpdl4.core
+Bundle-Version: 1.0.0
+Bundle-Vendor: JBoss, a Division of Red Hat
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.jboss.tools.process.jpdl4.core
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/build.properties
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/build.properties (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/build.properties 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/EndState.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/EndState.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/EndState.java 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,5 @@
+package org.jboss.tools.process.jpdl4.core;
+
+public class EndState extends Node {
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Node.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Node.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Node.java 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,45 @@
+package org.jboss.tools.process.jpdl4.core;
+
+import java.util.HashMap;
+
+public class Node {
+
+ private long id;
+ private String name;
+ private Process container;
+
+ private HashMap<String, Object> metaData = new HashMap<String, Object>();
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long l) {
+ id = l;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setMetaData(String key, Object value) {
+ metaData.put(key, value);
+ }
+
+ public Object getMetaData(String key) {
+ return metaData.get(key);
+ }
+
+ public Object getNodeContainer() {
+ return container;
+ }
+
+ public void setNodeContainer(Process container) {
+ this.container = container;
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Process.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Process.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Process.java 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,43 @@
+package org.jboss.tools.process.jpdl4.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class Process {
+
+ private String name;
+ private HashMap<String, Object> metaData = new HashMap<String, Object>();
+ private ArrayList<Node> nodes = new ArrayList<Node>();
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Object getMetaData(String key) {
+ return metaData.get(key);
+ }
+
+ public void setMetaData(String key, Object value) {
+ metaData.put(key, value);
+ }
+
+ public List<Node> getNodes() {
+ return nodes;
+ }
+
+ public void addNode(Node node) {
+ nodes.add(node);
+ node.setNodeContainer(this);
+ }
+
+ public void removeNode(Node node) {
+ node.setNodeContainer(null);
+ nodes.remove(node);
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/StartState.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/StartState.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/StartState.java 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,5 @@
+package org.jboss.tools.process.jpdl4.core;
+
+public class StartState extends Node {
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/State.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/State.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/State.java 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,5 @@
+package org.jboss.tools.process.jpdl4.core;
+
+public class State extends Node {
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Transition.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Transition.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/process/jpdl4/core/Transition.java 2008-07-23 14:24:42 UTC (rev 9243)
@@ -0,0 +1,20 @@
+package org.jboss.tools.process.jpdl4.core;
+
+import java.util.HashMap;
+
+public class Transition {
+
+ private HashMap<String, Object> metaData = new HashMap<String, Object>();
+
+ public Transition(Node from, Node to) {
+ }
+
+ public Object getMetaData(String key) {
+ return metaData.get(key);
+ }
+
+ public void setMetaData(String key, Object value) {
+ metaData.put(key, value);
+ }
+
+}
16 years, 5 months
JBoss Tools SVN: r9241 - trunk/flow/plugins/org.jboss.tools.flow.common.graph.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-23 10:13:27 -0400 (Wed, 23 Jul 2008)
New Revision: 9241
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/
Log:
Property changes on: trunk/flow/plugins/org.jboss.tools.flow.common.graph
___________________________________________________________________
Name: svn:ignore
+ target
16 years, 5 months
JBoss Tools SVN: r9240 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-23 10:05:02 -0400 (Wed, 23 Jul 2008)
New Revision: 9240
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
Log:
JBIDE-2505, restoring cursor position in visual part of vpe was created.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-07-23 14:01:55 UTC (rev 9239)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-07-23 14:05:02 UTC (rev 9240)
@@ -398,15 +398,6 @@
* @return whether handled event
*/
protected boolean handleRight(nsIDOMKeyEvent keyEvent) {
-
- getSelectionController().setCaretEnabled(true);
-
- nsISelection selection = getSelectionController().getSelection((short)1);
- nsIDOMNode node = selection.getAnchorNode();
-
- VpeDebugUtil.debugInfo("Node name "+node.getNodeName()+"\n");
- VpeDebugUtil.debugInfo("Node value "+node.getNodeValue()+"\n");
-
return false;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-23 14:01:55 UTC (rev 9239)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-23 14:05:02 UTC (rev 9240)
@@ -5,7 +5,9 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.xml.core.internal.document.NodeImpl;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.NodeData;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
@@ -16,11 +18,11 @@
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.editor.util.TextUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
-import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNSUIEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsISelection;
+import org.mozilla.interfaces.nsISelectionController;
import org.w3c.dom.Node;
/**
@@ -263,10 +265,8 @@
// visual node which will be selected
nsIDOMNode targetVisualNode;
- IndexedRegion targetSourceNode = (IndexedRegion) SelectionUtil.getSourceNodeByPosition(model, focusOffcetInSourceDocument);
-
- int offcetReferenceToSourceNode = focusOffcetInSourceDocument-targetSourceNode.getStartOffset();
-
+// int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
+
// if mapping is elementMapping
if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
@@ -276,11 +276,18 @@
targetVisualNode = template.getVisualNodeByBySourcePosition(
elementMapping, focusOffcetInSourceDocument, anchorOffcetInSourceDocument, getDomMapping());
-
+
+ NodeData nodeData = template.getNodeData(targetVisualNode, elementMapping.getElementData(), getDomMapping());
+ //we can restore cursor position only if we have nodeData and range.y==0
+ if(nodeData!=null && range.y==0) {
+ //restore cursor position in source document
+ restoreVisualCursorPosition(template, nodeData, focusOffcetInSourceDocument);
+ }
} else {
targetVisualNode = nodeMapping.getVisualNode();
-
+ //restore cursor position for source node
+ restoreVisualCursorPositionForTextNode(targetVisualNode, focusOffcetInSourceDocument, model);
}
//here we restore only highlight
getPageContext().getVisualBuilder().setSelectionRectangle(
@@ -290,18 +297,55 @@
model.releaseFromRead();
}
}
-// //TODO Max Areshkau now it's workd only for simple text, and should be adjusted
-// targetVisualNode = targetVisualNode.getFirstChild();
-// int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
-// //added by Max Areshkau restore selection
-//// Point visualSelectionRange = SelectionUtil.getVisualSelectionRange(selection);
-// VpeDebugUtil.debugInfo(targetVisualNode.getNodeValue());
-//// TextUtil.visualPosition(sourceText, sourcePosition)
-// selectionController.getSelection((short)1).collapse(targetVisualNode, visualNodeOffcet);
-//// selectionController.getSelection((short)1).extend(targetVisualNode, focus);
}
+ /**
+ * Restores visual cursor position in visual part of editor
+ *
+ * @param template - current template in scope of which we are editing data
+ * !IMPORTANT for current implementation in should be a text node
+ * @param nodeData -contains mapping before sourceNode(it's can be an attribute) and visual node, attribute
+ */
+ private void restoreVisualCursorPosition(VpeTemplate template, NodeData nodeData,int focusOffcetInSourceDocument) {
+
+ nsIDOMNode visualNode = nodeData.getVisualNode();
+
+ if(visualNode!=null&&visualNode.getNodeType()==nsIDOMNode.TEXT_NODE&&nodeData.getSourceNode()!=null) {
+ NodeImpl targetSourceNode = (NodeImpl)nodeData.getSourceNode();
+ String sourceNodeValue = nodeData.getSourceNode().getNodeValue();
+ ITextRegion valueRegion = targetSourceNode.getValueRegion();
+ ITextRegion nameRegion = targetSourceNode.getNameRegion();
+ int offcetReferenceToSourceNode = focusOffcetInSourceDocument-valueRegion.getStart()-targetSourceNode.getStartOffset()+nameRegion.getStart()-1;
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, offcetReferenceToSourceNode);
+ }
+ }
+ /**
+ * Restore cursor position in visual document for by source position
+ * @param visualNode
+ * @param focusOffcetInSourceDocument
+ */
+ private void restoreVisualCursorPositionForTextNode(nsIDOMNode visualNode, int focusOffcetInSourceDocument,IStructuredModel model) {
+
+ if(visualNode==null) return;
+
+ nsIDOMNode targetVisualNode = visualNode.getFirstChild();
+
+ if(targetVisualNode==null||targetVisualNode.getNodeType()!=nsIDOMNode.TEXT_NODE) {
+ return;
+ }
+
+ IndexedRegion targetSourceNode = (IndexedRegion) SelectionUtil.getSourceNodeByPosition(model, focusOffcetInSourceDocument);
+ // should be a text node
+ if(((Node)targetSourceNode).getNodeType()!=Node.TEXT_NODE) {
+ return;
+ }
+ int offcetReferenceToSourceNode = focusOffcetInSourceDocument-targetSourceNode.getStartOffset();
+
+ int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
+
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(targetVisualNode, visualNodeOffcet);
+
+ }
-
protected VpePageContext getPageContext() {
return pageContext;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-07-23 14:01:55 UTC (rev 9239)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-07-23 14:05:02 UTC (rev 9240)
@@ -37,7 +37,7 @@
}
/**
- * get selected visual node from nsiDelection
+ * get selected visual node from nsISelection
*
* @param selection
* @return
16 years, 5 months