JBoss Tools SVN: r9530 - in trunk/flow/plugins/org.jboss.tools.flow.common.graph: src/org/jboss/tools/flow and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 12:18:04 -0400 (Tue, 05 Aug 2008)
New Revision: 9530
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/common/
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/common/model/
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/META-INF/MANIFEST.MF
Log:
move of model to org.jboss.tools.flow.common.graph
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/META-INF/MANIFEST.MF
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/META-INF/MANIFEST.MF 2008-08-05 16:15:39 UTC (rev 9529)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/META-INF/MANIFEST.MF 2008-08-05 16:18:04 UTC (rev 9530)
@@ -17,6 +17,7 @@
org.eclipse.ui.ide
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.flow;uses:="org.eclipse.core.runtime,org.eclipse.ui.plugin,org.osgi.framework",
+ org.jboss.tools.flow.common.model,
org.jboss.tools.flow.editor,
org.jboss.tools.flow.editor.action,
org.jboss.tools.flow.editor.command,
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/common/model (from rev 9526, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model)
16 years, 5 months
JBoss Tools SVN: r9529 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 12:15:39 -0400 (Tue, 05 Aug 2008)
New Revision: 9529
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/ProcessAcceptsElementStrategy.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java
Log:
rename of org.jboss.tools.flow.common.core to org.jboss.tools.flow.common.model
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java 2008-08-05 16:15:20 UTC (rev 9528)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java 2008-08-05 16:15:39 UTC (rev 9529)
@@ -1,7 +1,7 @@
package org.jboss.tools.flow.jpdl4.graph.strategy;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.Node;
import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
public class EndStateAcceptsOutgoingConnectionStrategy implements AcceptsOutgoingConnectionStrategy {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/ProcessAcceptsElementStrategy.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/ProcessAcceptsElementStrategy.java 2008-08-05 16:15:20 UTC (rev 9528)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/ProcessAcceptsElementStrategy.java 2008-08-05 16:15:39 UTC (rev 9529)
@@ -1,6 +1,6 @@
package org.jboss.tools.flow.jpdl4.graph.strategy;
-import org.jboss.tools.flow.common.core.Container;
+import org.jboss.tools.flow.common.model.Container;
import org.jboss.tools.flow.editor.strategy.AcceptsElementStrategy;
import org.jboss.tools.flow.jpdl4.core.Process;
import org.jboss.tools.flow.jpdl4.core.StartState;
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java 2008-08-05 16:15:20 UTC (rev 9528)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java 2008-08-05 16:15:39 UTC (rev 9529)
@@ -1,7 +1,7 @@
package org.jboss.tools.flow.jpdl4.graph.strategy;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.Node;
import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
public class StartStateAcceptsIncomingConnectionStrategy implements AcceptsIncomingConnectionStrategy {
16 years, 5 months
JBoss Tools SVN: r9528 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 12:15:20 -0400 (Tue, 05 Aug 2008)
New Revision: 9528
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/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/SuperState.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Transition.java
Log:
rename of org.jboss.tools.flow.common.core to org.jboss.tools.flow.common.model
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/flow/jpdl4/core/EndState.java 2008-08-05 16:14:41 UTC (rev 9527)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/EndState.java 2008-08-05 16:15:20 UTC (rev 9528)
@@ -1,6 +1,6 @@
package org.jboss.tools.flow.jpdl4.core;
-import org.jboss.tools.flow.common.core.DefaultNode;
+import org.jboss.tools.flow.common.model.DefaultNode;
public class EndState extends DefaultNode {
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/flow/jpdl4/core/Process.java 2008-08-05 16:14:41 UTC (rev 9527)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Process.java 2008-08-05 16:15:20 UTC (rev 9528)
@@ -2,8 +2,8 @@
import java.util.Iterator;
-import org.jboss.tools.flow.common.core.DefaultFlow;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.DefaultFlow;
+import org.jboss.tools.flow.common.model.Node;
public class Process extends DefaultFlow {
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/flow/jpdl4/core/StartState.java 2008-08-05 16:14:41 UTC (rev 9527)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/StartState.java 2008-08-05 16:15:20 UTC (rev 9528)
@@ -1,6 +1,6 @@
package org.jboss.tools.flow.jpdl4.core;
-import org.jboss.tools.flow.common.core.DefaultNode;
+import org.jboss.tools.flow.common.model.DefaultNode;
public class StartState extends DefaultNode {
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/flow/jpdl4/core/State.java 2008-08-05 16:14:41 UTC (rev 9527)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/State.java 2008-08-05 16:15:20 UTC (rev 9528)
@@ -1,6 +1,6 @@
package org.jboss.tools.flow.jpdl4.core;
-import org.jboss.tools.flow.common.core.DefaultNode;
+import org.jboss.tools.flow.common.model.DefaultNode;
public class State extends DefaultNode {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/SuperState.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/SuperState.java 2008-08-05 16:14:41 UTC (rev 9527)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/SuperState.java 2008-08-05 16:15:20 UTC (rev 9528)
@@ -1,6 +1,6 @@
package org.jboss.tools.flow.jpdl4.core;
-import org.jboss.tools.flow.common.core.DefaultContainer;
+import org.jboss.tools.flow.common.model.DefaultContainer;
public class SuperState extends DefaultContainer {
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/flow/jpdl4/core/Transition.java 2008-08-05 16:14:41 UTC (rev 9527)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.core/src/org/jboss/tools/flow/jpdl4/core/Transition.java 2008-08-05 16:15:20 UTC (rev 9528)
@@ -1,7 +1,7 @@
package org.jboss.tools.flow.jpdl4.core;
-import org.jboss.tools.flow.common.core.DefaultConnection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.DefaultConnection;
+import org.jboss.tools.flow.common.model.Node;
public class Transition extends DefaultConnection {
16 years, 5 months
JBoss Tools SVN: r9527 - in trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor: strategy and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 12:14:41 -0400 (Tue, 05 Aug 2008)
New Revision: 9527
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultConnectionWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultFlowWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsElementStrategy.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java
Log:
rename of org.jboss.tools.flow.common.core to org.jboss.tools.flow.common.model
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultConnectionWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultConnectionWrapper.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultConnectionWrapper.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -5,9 +5,9 @@
import java.util.List;
import org.eclipse.draw2d.geometry.Point;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.DefaultConnection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.DefaultConnection;
+import org.jboss.tools.flow.common.model.Node;
public class DefaultConnectionWrapper extends AbstractConnectionWrapper {
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -3,10 +3,10 @@
import java.util.List;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.Container;
-import org.jboss.tools.flow.common.core.Flow;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.Container;
+import org.jboss.tools.flow.common.model.Flow;
+import org.jboss.tools.flow.common.model.Node;
import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultFlowWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultFlowWrapper.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultFlowWrapper.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -1,7 +1,7 @@
package org.jboss.tools.flow.editor.core;
-import org.jboss.tools.flow.common.core.Flow;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Flow;
+import org.jboss.tools.flow.common.model.Node;
import org.jboss.tools.flow.editor.core.AbstractFlowWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
import org.jboss.tools.flow.editor.strategy.AcceptsElementStrategy;
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -1,8 +1,8 @@
package org.jboss.tools.flow.editor.core;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.Node;
import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsElementStrategy.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsElementStrategy.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsElementStrategy.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -1,6 +1,6 @@
package org.jboss.tools.flow.editor.strategy;
-import org.jboss.tools.flow.common.core.Container;
+import org.jboss.tools.flow.common.model.Container;
public interface AcceptsElementStrategy {
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -1,7 +1,7 @@
package org.jboss.tools.flow.editor.strategy;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.Node;
public interface AcceptsIncomingConnectionStrategy {
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java 2008-08-05 16:13:50 UTC (rev 9526)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java 2008-08-05 16:14:41 UTC (rev 9527)
@@ -1,7 +1,7 @@
package org.jboss.tools.flow.editor.strategy;
-import org.jboss.tools.flow.common.core.Connection;
-import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.common.model.Connection;
+import org.jboss.tools.flow.common.model.Node;
public interface AcceptsOutgoingConnectionStrategy {
16 years, 5 months
JBoss Tools SVN: r9526 - in trunk/flow/plugins/org.jboss.tools.flow.common.core: src/org/jboss/tools/flow/common and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 12:13:50 -0400 (Tue, 05 Aug 2008)
New Revision: 9526
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Container.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultConnection.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultContainer.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultFlow.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultNode.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java
Removed:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractConnection.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractFlow.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractNode.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractNodeContainer.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/NodeContainer.java
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Connection.java
Log:
rename of org.jboss.tools.flow.common.core to org.jboss.tools.flow.common.model
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF 2008-08-05 15:43:07 UTC (rev 9525)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF 2008-08-05 16:13:50 UTC (rev 9526)
@@ -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.flow.common.core
+Export-Package: org.jboss.tools.flow.common.model
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model (from rev 9373, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core)
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractConnection.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/AbstractConnection.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractConnection.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,31 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-import java.util.HashMap;
-
-public abstract class AbstractConnection implements Connection {
-
- private HashMap<String, Object> metaData = new HashMap<String, Object>();
- private Node from, to;
-
- public AbstractConnection(Node from, Node to) {
- this.from = from;
- this.to = to;
- }
-
- public Object getMetaData(String key) {
- return metaData.get(key);
- }
-
- public void setMetaData(String key, Object value) {
- metaData.put(key, value);
- }
-
- public Node getFrom() {
- return from;
- }
-
- public Node getTo() {
- return to;
- }
-
-}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractFlow.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/AbstractFlow.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractFlow.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,88 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class AbstractFlow implements Flow {
-
- 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);
- }
-
- public String getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getPackageName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getVersion() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setId(String id) {
- // TODO Auto-generated method stub
-
- }
-
- public void setPackageName(String packageName) {
- // TODO Auto-generated method stub
-
- }
-
- public void setType(String type) {
- // TODO Auto-generated method stub
-
- }
-
- public void setVersion(String version) {
- // TODO Auto-generated method stub
-
- }
-
- public Node getNode(long id) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractNode.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/AbstractNode.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractNode.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,45 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-import java.util.HashMap;
-
-public class AbstractNode {
-
- private long id;
- private String name;
- private AbstractFlow 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(AbstractFlow container) {
- this.container = container;
- }
-
-}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractNodeContainer.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/AbstractNodeContainer.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/AbstractNodeContainer.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,52 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public abstract class AbstractNodeContainer implements NodeContainer {
-
- 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);
- }
-
- public Node getNode(long id) {
- for (Node node : nodes) {
- if (node.getId() == id) {
- return node;
- }
- }
- return null;
- }
-
-}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Connection.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/Connection.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Connection.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,4 +1,4 @@
-package org.jboss.tools.flow.common.core;
+package org.jboss.tools.flow.common.model;
/*
* Copyright 2005 JBoss Inc
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Container.java (from rev 9392, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/Container.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Container.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Container.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,47 @@
+package org.jboss.tools.flow.common.model;
+
+import java.util.List;
+
+/**
+ * A container of nodes.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface Container {
+
+ /**
+ * Returns the nodes of this node container.
+ *
+ * @return the nodes of this node container
+ */
+ List<Node> getNodes();
+
+ /**
+ * Returns the node with the given id
+ *
+ * @param id
+ * the node id
+ * @return the node with the given id
+ * @throws IllegalArgumentException
+ * if an unknown id is passed
+ */
+ Node getNode(long id);
+
+ /**
+ * Method for adding a node to this node container.
+ * Note that the node will get an id unique for this node container.
+ *
+ * @param node the node to be added
+ * @throws IllegalArgumentException if <code>node</code> is null
+ */
+ void addNode(Node node);
+
+ /**
+ * Method for removing a node from this node container
+ *
+ * @param node the node to be removed
+ * @throws IllegalArgumentException if <code>node</code> is null or unknown
+ */
+ void removeNode(Node node);
+
+}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultConnection.java (from rev 9413, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/DefaultConnection.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultConnection.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultConnection.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,39 @@
+package org.jboss.tools.flow.common.model;
+
+import java.util.HashMap;
+
+public class DefaultConnection implements Connection {
+
+ private HashMap<String, Object> metaData = new HashMap<String, Object>();
+ private Node from, to;
+
+ public DefaultConnection(Node from, Node to) {
+ this.from = from;
+ this.to = to;
+ }
+
+ public Object getMetaData(String key) {
+ return metaData.get(key);
+ }
+
+ public void setMetaData(String key, Object value) {
+ metaData.put(key, value);
+ }
+
+ public Node getFrom() {
+ return from;
+ }
+
+ public Node getTo() {
+ return to;
+ }
+
+ public String getFromType() {
+ return null;
+ }
+
+ public String getToType() {
+ return null;
+ }
+
+}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultContainer.java (from rev 9413, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/DefaultContainer.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultContainer.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultContainer.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,52 @@
+package org.jboss.tools.flow.common.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class DefaultContainer extends DefaultNode implements Container {
+
+ 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);
+ }
+
+ public Node getNode(long id) {
+ for (Node node : nodes) {
+ if (node.getId() == id) {
+ return node;
+ }
+ }
+ return null;
+ }
+
+}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultFlow.java (from rev 9392, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/DefaultFlow.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultFlow.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultFlow.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,88 @@
+package org.jboss.tools.flow.common.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class DefaultFlow implements Flow {
+
+ 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);
+ }
+
+ public String getId() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getPackageName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getVersion() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setId(String id) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPackageName(String packageName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setType(String type) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setVersion(String version) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Node getNode(long id) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultNode.java (from rev 9392, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/DefaultNode.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultNode.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/DefaultNode.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,87 @@
+package org.jboss.tools.flow.common.model;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class DefaultNode implements Node {
+
+ private long id;
+ private String name;
+ private Container 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 Container getNodeContainer() {
+ return container;
+ }
+
+ public void setNodeContainer(Container container) {
+ this.container = container;
+ }
+
+ public void addIncomingConnection(String type, Connection connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addOutgoingConnection(String type, Connection connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Map<String, List<Connection>> getIncomingConnections() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Connection> getIncomingConnections(String type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Map<String, List<Connection>> getOutgoingConnections() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Connection> getOutgoingConnections(String type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeIncomingConnection(String type, Connection connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeOutgoingConnection(String type, Connection connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/Flow.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,99 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-/*
- * 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.
- */
-
-/**
- * Represents a some process definition.
- * A process has a name and a unique id.
- * When a new version of a process is created, the name stays the same,
- * but the id and the version of the process should be different.
- * Different types of processes could be defined (e.g. RuleFlow).
- *
- * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
- */
-public interface Flow extends NodeContainer {
-
- /**
- * Sets the id of this process.
- * The id should uniquely identify this process.
- * @param id the id of the process
- */
- void setId(String id);
-
- /**
- * Returns the id of this process.
- * @return the id of this process
- */
- String getId();
-
- /**
- * Sets the name of this process.
- * @param name the name of this process
- */
- void setName(String name);
-
- /**
- * Returns the name of this process.
- * If no name is specified, null is returned.
- * @return the name of this process
- */
- String getName();
-
- /**
- * Sets the version of this process.
- * @param version the version of this process
- */
- void setVersion(String version);
-
- /**
- * Returns the version of this process.
- * If no version is specified, null is returned.
- * @return the version of this process
- */
- String getVersion();
-
- /**
- * Sets the type of this process.
- * @param type the type of this process
- */
- void setType(String type);
-
- /**
- * Returns the type of this process.
- * @return the type of this process
- */
- String getType();
-
- /**
- * Sets the package name of this RuleFlow process
- *
- * @param packageName the package name of this RuleFlow process
- */
- void setPackageName(String packageName);
-
- /**
- * Returns the package name of this RuleFlow process
- *
- * @return the package name of this RuleFlow process
- */
- String getPackageName();
-
- void setMetaData(String name, Object value);
-
- Object getMetaData(String name);
-
-}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java (from rev 9392, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/Flow.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Flow.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,99 @@
+package org.jboss.tools.flow.common.model;
+
+/*
+ * 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.
+ */
+
+/**
+ * Represents a some process definition.
+ * A process has a name and a unique id.
+ * When a new version of a process is created, the name stays the same,
+ * but the id and the version of the process should be different.
+ * Different types of processes could be defined (e.g. RuleFlow).
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface Flow extends Container {
+
+ /**
+ * Sets the id of this process.
+ * The id should uniquely identify this process.
+ * @param id the id of the process
+ */
+ void setId(String id);
+
+ /**
+ * Returns the id of this process.
+ * @return the id of this process
+ */
+ String getId();
+
+ /**
+ * Sets the name of this process.
+ * @param name the name of this process
+ */
+ void setName(String name);
+
+ /**
+ * Returns the name of this process.
+ * If no name is specified, null is returned.
+ * @return the name of this process
+ */
+ String getName();
+
+ /**
+ * Sets the version of this process.
+ * @param version the version of this process
+ */
+ void setVersion(String version);
+
+ /**
+ * Returns the version of this process.
+ * If no version is specified, null is returned.
+ * @return the version of this process
+ */
+ String getVersion();
+
+ /**
+ * Sets the type of this process.
+ * @param type the type of this process
+ */
+ void setType(String type);
+
+ /**
+ * Returns the type of this process.
+ * @return the type of this process
+ */
+ String getType();
+
+ /**
+ * Sets the package name of this RuleFlow process
+ *
+ * @param packageName the package name of this RuleFlow process
+ */
+ void setPackageName(String packageName);
+
+ /**
+ * Returns the package name of this RuleFlow process
+ *
+ * @return the package name of this RuleFlow process
+ */
+ String getPackageName();
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/Node.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,91 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-/*
- * 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 java.util.List;
-import java.util.Map;
-
-/**
- * Represents a node in a workflow process.
- *
- * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
- */
-public interface Node {
-
- /**
- * Returns the id of the node
- *
- * @return the id of the node
- */
- long getId();
-
- /**
- * Method for setting the id of the node
- *
- * @param id the id of the node
- */
- void setId(long id);
-
- /**
- * Returns the name of the node
- *
- * @return the name of the node
- */
- String getName();
-
- /**
- * Method for setting the name of the node
- *
- * @param name the name of the node
- */
- void setName(String name);
-
- /**
- * Returns the incoming connections
- *
- * @return the incoming connections
- */
- Map<String, List<Connection>> getIncomingConnections();
-
- /**
- * Returns the outgoing connections
- *
- * @return the outgoing connections
- */
- Map<String, List<Connection>> getOutgoingConnections();
-
- void addIncomingConnection(String type, Connection connection);
-
- void addOutgoingConnection(String type, Connection connection);
-
- void removeIncomingConnection(String type, Connection connection);
-
- void removeOutgoingConnection(String type, Connection connection);
-
- List<Connection> getIncomingConnections(String type);
-
- List<Connection> getOutgoingConnections(String type);
-
- NodeContainer getNodeContainer();
-
- void setNodeContainer(NodeContainer nodeContainer);
-
- void setMetaData(String name, Object value);
-
- Object getMetaData(String name);
-
-}
Copied: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java (from rev 9392, trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/Node.java)
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/Node.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -0,0 +1,91 @@
+package org.jboss.tools.flow.common.model;
+
+/*
+ * 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 java.util.List;
+import java.util.Map;
+
+/**
+ * Represents a node in a workflow process.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface Node {
+
+ /**
+ * Returns the id of the node
+ *
+ * @return the id of the node
+ */
+ long getId();
+
+ /**
+ * Method for setting the id of the node
+ *
+ * @param id the id of the node
+ */
+ void setId(long id);
+
+ /**
+ * Returns the name of the node
+ *
+ * @return the name of the node
+ */
+ String getName();
+
+ /**
+ * Method for setting the name of the node
+ *
+ * @param name the name of the node
+ */
+ void setName(String name);
+
+ /**
+ * Returns the incoming connections
+ *
+ * @return the incoming connections
+ */
+ Map<String, List<Connection>> getIncomingConnections();
+
+ /**
+ * Returns the outgoing connections
+ *
+ * @return the outgoing connections
+ */
+ Map<String, List<Connection>> getOutgoingConnections();
+
+ void addIncomingConnection(String type, Connection connection);
+
+ void addOutgoingConnection(String type, Connection connection);
+
+ void removeIncomingConnection(String type, Connection connection);
+
+ void removeOutgoingConnection(String type, Connection connection);
+
+ List<Connection> getIncomingConnections(String type);
+
+ List<Connection> getOutgoingConnections(String type);
+
+ Container getNodeContainer();
+
+ void setNodeContainer(Container nodeContainer);
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/NodeContainer.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/core/NodeContainer.java 2008-07-29 09:41:25 UTC (rev 9373)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/org/jboss/tools/flow/common/model/NodeContainer.java 2008-08-05 16:13:50 UTC (rev 9526)
@@ -1,47 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-import java.util.List;
-
-/**
- * A container of nodes.
- *
- * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
- */
-public interface NodeContainer {
-
- /**
- * Returns the nodes of this node container.
- *
- * @return the nodes of this node container
- */
- List<Node> getNodes();
-
- /**
- * Returns the node with the given id
- *
- * @param id
- * the node id
- * @return the node with the given id
- * @throws IllegalArgumentException
- * if an unknown id is passed
- */
- Node getNode(long id);
-
- /**
- * Method for adding a node to this node container.
- * Note that the node will get an id unique for this node container.
- *
- * @param node the node to be added
- * @throws IllegalArgumentException if <code>node</code> is null
- */
- void addNode(Node node);
-
- /**
- * Method for removing a node from this node container
- *
- * @param node the node to be removed
- * @throws IllegalArgumentException if <code>node</code> is null or unknown
- */
- void removeNode(Node node);
-
-}
16 years, 5 months
JBoss Tools SVN: r9525 - in trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor: core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 11:43:07 -0400 (Tue, 05 Aug 2008)
New Revision: 9525
Added:
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseConnectionWrapper.java
Removed:
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/ConnectionWrapper.java
Modified:
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/RuleFlowPaletteFactory.java
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseNodeWrapper.java
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/StartNodeWrapper.java
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/SubProcessWrapper.java
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/ConnectionWrapperEditPart.java
trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/RuleFlowEditPartFactory.java
Log:
add support for pluggable strategy for nodes to accept incoming and outgoing connections
Modified: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/RuleFlowPaletteFactory.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/RuleFlowPaletteFactory.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/RuleFlowPaletteFactory.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -28,7 +28,7 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.flow.editor.PaletteFactory;
import org.jboss.tools.process.ruleflow.Activator;
-import org.jboss.tools.process.ruleflow.editor.core.ConnectionWrapper;
+import org.jboss.tools.process.ruleflow.editor.core.BaseConnectionWrapper;
import org.jboss.tools.process.ruleflow.editor.core.StartNodeWrapper;
import org.jboss.tools.process.ruleflow.editor.core.SubProcessWrapper;
@@ -49,7 +49,7 @@
return new ConnectionCreationToolEntry(
"Connection Creation",
"Creating connections",
- new SimpleFactory(ConnectionWrapper.class),
+ new SimpleFactory(BaseConnectionWrapper.class),
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/connection.gif")),
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/connection.gif"))
);
Copied: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseConnectionWrapper.java (from rev 9262, trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/ConnectionWrapper.java)
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseConnectionWrapper.java (rev 0)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseConnectionWrapper.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -0,0 +1,100 @@
+package org.jboss.tools.process.ruleflow.editor.core;
+
+/*
+ * 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 java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.drools.workflow.core.Connection;
+import org.drools.workflow.core.Node;
+import org.drools.workflow.core.impl.ConnectionImpl;
+import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.NodeWrapper;
+
+/**
+ * Wrapper for a connection.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public class BaseConnectionWrapper extends AbstractConnectionWrapper {
+
+ private static final long serialVersionUID = 400L;
+
+ private Connection connection;
+
+ public BaseConnectionWrapper() {
+ }
+
+ public Connection getConnection() {
+ return connection;
+ }
+
+ public void localSetConnection(Connection connection) {
+ this.connection = (ConnectionImpl) connection;
+ }
+
+ public void disconnect() {
+ super.disconnect();
+ ((ConnectionImpl) connection).terminate();
+ connection = null;
+ }
+
+ public void connect(NodeWrapper source, NodeWrapper target) {
+ super.connect(source, target);
+ Node from = ((BaseNodeWrapper) getSource()).getNode();
+ Node to = ((BaseNodeWrapper) getTarget()).getNode();
+ connection = new ConnectionImpl(from, Node.CONNECTION_DEFAULT_TYPE, to, Node.CONNECTION_DEFAULT_TYPE);
+ }
+
+ protected List<Point> internalGetBendpoints() {
+ return (List<Point>) stringToBendpoints((String) connection.getMetaData("bendpoints"));
+ }
+
+ protected void internalSetBendpoints(List<Point> bendpoints) {
+ connection.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;
+ }
+
+}
Property changes on: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseConnectionWrapper.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseNodeWrapper.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseNodeWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/BaseNodeWrapper.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -18,8 +18,8 @@
import org.drools.workflow.core.Node;
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.editor.core.ConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
/**
@@ -72,12 +72,12 @@
height == null ? -1 : height);
}
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ public boolean acceptsIncomingConnection(ConnectionWrapper connection, NodeWrapper source) {
return source == null
|| ((BaseNodeWrapper) source).getNode().getNodeContainer() == getNode().getNodeContainer();
}
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ public boolean acceptsOutgoingConnection(ConnectionWrapper connection, NodeWrapper target) {
return target == null
|| ((BaseNodeWrapper) target).getNode().getNodeContainer() == getNode().getNodeContainer();
}
Deleted: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/ConnectionWrapper.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/ConnectionWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/ConnectionWrapper.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -1,100 +0,0 @@
-package org.jboss.tools.process.ruleflow.editor.core;
-
-/*
- * 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 java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.drools.workflow.core.Connection;
-import org.drools.workflow.core.Node;
-import org.drools.workflow.core.impl.ConnectionImpl;
-import org.eclipse.draw2d.geometry.Point;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
-
-/**
- * Wrapper for a connection.
- *
- * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
- */
-public class ConnectionWrapper extends AbstractConnectionWrapper {
-
- private static final long serialVersionUID = 400L;
-
- private Connection connection;
-
- public ConnectionWrapper() {
- }
-
- public Connection getConnection() {
- return connection;
- }
-
- public void localSetConnection(Connection connection) {
- this.connection = (ConnectionImpl) connection;
- }
-
- public void disconnect() {
- super.disconnect();
- ((ConnectionImpl) connection).terminate();
- connection = null;
- }
-
- public void connect(NodeWrapper source, NodeWrapper target) {
- super.connect(source, target);
- Node from = ((BaseNodeWrapper) getSource()).getNode();
- Node to = ((BaseNodeWrapper) getTarget()).getNode();
- connection = new ConnectionImpl(from, Node.CONNECTION_DEFAULT_TYPE, to, Node.CONNECTION_DEFAULT_TYPE);
- }
-
- protected List<Point> internalGetBendpoints() {
- return (List<Point>) stringToBendpoints((String) connection.getMetaData("bendpoints"));
- }
-
- protected void internalSetBendpoints(List<Point> bendpoints) {
- connection.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/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/StartNodeWrapper.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/StartNodeWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/StartNodeWrapper.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -17,7 +17,7 @@
*/
import org.drools.workflow.core.node.StartNode;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.ConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
/**
@@ -38,11 +38,11 @@
return (StartNode) getNode();
}
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ public boolean acceptsIncomingConnection(ConnectionWrapper connection, NodeWrapper source) {
return false;
}
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ public boolean acceptsOutgoingConnection(ConnectionWrapper connection, NodeWrapper target) {
return super.acceptsOutgoingConnection(connection, target)
&& getOutgoingConnections().isEmpty();
}
Modified: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/SubProcessWrapper.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/SubProcessWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/core/SubProcessWrapper.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -17,7 +17,7 @@
*/
import org.drools.workflow.core.node.SubProcessNode;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
+import org.jboss.tools.flow.editor.core.ConnectionWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
/**
@@ -38,12 +38,12 @@
return (SubProcessNode) getNode();
}
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
+ public boolean acceptsIncomingConnection(ConnectionWrapper connection, NodeWrapper source) {
return super.acceptsIncomingConnection(connection, source)
&& getIncomingConnections().isEmpty();
}
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
+ public boolean acceptsOutgoingConnection(ConnectionWrapper connection, NodeWrapper target) {
return super.acceptsOutgoingConnection(connection, target)
&& getOutgoingConnections().isEmpty();
}
Modified: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/ConnectionWrapperEditPart.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/ConnectionWrapperEditPart.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/ConnectionWrapperEditPart.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -17,12 +17,12 @@
*/
import org.jboss.tools.flow.editor.editpart.ConnectionEditPart;
-import org.jboss.tools.process.ruleflow.editor.core.ConnectionWrapper;
+import org.jboss.tools.process.ruleflow.editor.core.BaseConnectionWrapper;
public class ConnectionWrapperEditPart extends ConnectionEditPart {
protected Class<?> getElementConnectionType() {
- return ConnectionWrapper.class;
+ return BaseConnectionWrapper.class;
}
}
Modified: trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/RuleFlowEditPartFactory.java
===================================================================
--- trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/RuleFlowEditPartFactory.java 2008-08-05 15:42:25 UTC (rev 9524)
+++ trunk/drools/plugins/org.jboss.tools.flow.ruleflow/src/main/java/org/jboss/tools/process/ruleflow/editor/editpart/RuleFlowEditPartFactory.java 2008-08-05 15:43:07 UTC (rev 9525)
@@ -19,7 +19,7 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
import org.jboss.tools.flow.editor.editpart.RootEditPart;
-import org.jboss.tools.process.ruleflow.editor.core.ConnectionWrapper;
+import org.jboss.tools.process.ruleflow.editor.core.BaseConnectionWrapper;
import org.jboss.tools.process.ruleflow.editor.core.ProcessWrapper;
import org.jboss.tools.process.ruleflow.editor.core.StartNodeWrapper;
import org.jboss.tools.process.ruleflow.editor.core.SubProcessWrapper;
@@ -39,7 +39,7 @@
result = new StartNodeEditPart();
} else if (model instanceof SubProcessWrapper) {
result = new SubProcessEditPart();
- } else if (model instanceof ConnectionWrapper) {
+ } else if (model instanceof BaseConnectionWrapper) {
result = new ConnectionWrapperEditPart();
} else {
throw new IllegalArgumentException(
16 years, 5 months
JBoss Tools SVN: r9524 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph: wrapper and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 11:42:25 -0400 (Tue, 05 Aug 2008)
New Revision: 9524
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java
Modified:
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
Log:
add support for pluggable strategy for nodes to accept incoming and outgoing connections
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/EndStateAcceptsOutgoingConnectionStrategy.java 2008-08-05 15:42:25 UTC (rev 9524)
@@ -0,0 +1,16 @@
+package org.jboss.tools.flow.jpdl4.graph.strategy;
+
+import org.jboss.tools.flow.common.core.Connection;
+import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
+
+public class EndStateAcceptsOutgoingConnectionStrategy implements AcceptsOutgoingConnectionStrategy {
+
+ public boolean acceptsOutgoingConnection(Connection connection, Node source) {
+ return false;
+ }
+
+ public void setNode(Node node) {
+ }
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/strategy/StartStateAcceptsIncomingConnectionStrategy.java 2008-08-05 15:42:25 UTC (rev 9524)
@@ -0,0 +1,16 @@
+package org.jboss.tools.flow.jpdl4.graph.strategy;
+
+import org.jboss.tools.flow.common.core.Connection;
+import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
+
+public class StartStateAcceptsIncomingConnectionStrategy implements AcceptsIncomingConnectionStrategy {
+
+ public boolean acceptsIncomingConnection(Connection connection, Node source) {
+ return false;
+ }
+
+ public void setNode(Node node) {
+ }
+
+}
Modified: 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/EndStateWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/EndStateWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
@@ -1,22 +1,19 @@
package org.jboss.tools.flow.jpdl4.graph.wrapper;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.DefaultNodeWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
import org.jboss.tools.flow.jpdl4.core.EndState;
+import org.jboss.tools.flow.jpdl4.graph.strategy.EndStateAcceptsOutgoingConnectionStrategy;
public class EndStateWrapper extends DefaultNodeWrapper {
public EndStateWrapper() {
- setElement(new EndState());
+ EndState element = new EndState();
+ setElement(element);
setName("End");
+ AcceptsOutgoingConnectionStrategy strategy = new EndStateAcceptsOutgoingConnectionStrategy();
+ strategy.setNode(element);
+ setAcceptsOutgoingConnectionStrategy(strategy);
}
- public EndState getEndState() {
- return (EndState) getElement();
- }
-
- public boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target) {
- return false;
- }
}
Modified: 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/ProcessWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
@@ -7,9 +7,11 @@
public class ProcessWrapper extends DefaultFlowWrapper {
public ProcessWrapper() {
- setElement(new Process());
+ Process process = new Process();
+ setElement(process);
ProcessAcceptsElementStrategy acceptsElementStrategy = new ProcessAcceptsElementStrategy();
- acceptsElementStrategy.setContainer((Process)getElement());
+ acceptsElementStrategy.setContainer(process);
+ setAcceptsElementStrategy(acceptsElementStrategy);
}
}
Modified: 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/StartStateWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
@@ -1,23 +1,19 @@
package org.jboss.tools.flow.jpdl4.graph.wrapper;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.editor.core.DefaultNodeWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
import org.jboss.tools.flow.jpdl4.core.StartState;
+import org.jboss.tools.flow.jpdl4.graph.strategy.StartStateAcceptsIncomingConnectionStrategy;
public class StartStateWrapper extends DefaultNodeWrapper {
public StartStateWrapper() {
- setElement(new StartState());
+ StartState element = new StartState();
+ setElement(element);
setName("Start");
+ AcceptsIncomingConnectionStrategy strategy = new StartStateAcceptsIncomingConnectionStrategy();
+ strategy.setNode(element);
+
}
- public StartState getStartState() {
- return (StartState) getElement();
- }
-
- public boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source) {
- return false;
- }
-
}
Modified: 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/StateWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StateWrapper.java 2008-08-05 15:42:25 UTC (rev 9524)
@@ -6,13 +6,9 @@
public class StateWrapper extends DefaultNodeWrapper {
public StateWrapper() {
- setElement(new State());
- getState().setName("State");
+ State element = new State();
+ setElement(element);
+ element.setName("State");
}
- public State getState() {
- return (State) getElement();
- }
-
-
}
16 years, 5 months
JBoss Tools SVN: r9523 - in trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor: strategy and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-08-05 11:41:43 -0400 (Tue, 05 Aug 2008)
New Revision: 9523
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/ConnectionWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractConnectionWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractContainerWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/NodeWrapper.java
Log:
add support for pluggable strategy for nodes to accept incoming and outgoing connections
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractConnectionWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractConnectionWrapper.java 2008-08-05 15:10:20 UTC (rev 9522)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractConnectionWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -26,7 +26,7 @@
*
* @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
*/
-public abstract class AbstractConnectionWrapper extends AbstractWrapper {
+public abstract class AbstractConnectionWrapper extends AbstractWrapper implements ConnectionWrapper {
private static final long serialVersionUID = 1L;
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractContainerWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractContainerWrapper.java 2008-08-05 15:10:20 UTC (rev 9522)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/AbstractContainerWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -59,12 +59,12 @@
}
public boolean acceptsIncomingConnection(
- AbstractConnectionWrapper connection, NodeWrapper source) {
+ ConnectionWrapper connection, NodeWrapper source) {
return true;
}
public boolean acceptsOutgoingConnection(
- AbstractConnectionWrapper connection, NodeWrapper target) {
+ ConnectionWrapper connection, NodeWrapper target) {
return true;
}
Added: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/ConnectionWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/ConnectionWrapper.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/ConnectionWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -0,0 +1,5 @@
+package org.jboss.tools.flow.editor.core;
+
+public interface ConnectionWrapper extends Wrapper {
+
+}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java 2008-08-05 15:10:20 UTC (rev 9522)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultContainerWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -3,12 +3,18 @@
import java.util.List;
import org.eclipse.draw2d.geometry.Rectangle;
+import org.jboss.tools.flow.common.core.Connection;
import org.jboss.tools.flow.common.core.Container;
import org.jboss.tools.flow.common.core.Flow;
import org.jboss.tools.flow.common.core.Node;
+import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
+import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
public class DefaultContainerWrapper extends AbstractContainerWrapper {
+ private AcceptsIncomingConnectionStrategy incomingConnectionStrategy;
+ private AcceptsOutgoingConnectionStrategy outgoingConnectionStrategy;
+
protected void internalAddElement(NodeWrapper element) {
Node node = (Node)element.getElement();
List<Node> nodes = ((Flow)getFlowWrapper().getElement()).getNodes();
@@ -65,4 +71,38 @@
return getParent().acceptsElement(element);
}
+ public void setAcceptsIncomingConnectionStrategy(AcceptsIncomingConnectionStrategy strategy) {
+ this.incomingConnectionStrategy = strategy;
+ }
+
+ public void setAcceptsOutgoingConnectionStrategy(AcceptsOutgoingConnectionStrategy strategy) {
+ this.outgoingConnectionStrategy = strategy;
+ }
+
+ public boolean acceptsIncomingConnection(
+ ConnectionWrapper connectionWrapper, NodeWrapper sourceWrapper) {
+ if (connectionWrapper == null || sourceWrapper == null) {
+ return false;
+ } else if (incomingConnectionStrategy != null) {
+ return incomingConnectionStrategy.acceptsIncomingConnection(
+ (Connection)connectionWrapper.getElement(),
+ (Node)sourceWrapper.getElement());
+ } else {
+ return super.acceptsIncomingConnection(connectionWrapper, sourceWrapper);
+ }
+ }
+
+ public boolean acceptsOutgoingConnection(
+ ConnectionWrapper connectionWrapper, NodeWrapper targetWrapper) {
+ if (connectionWrapper == null || targetWrapper == null) {
+ return false;
+ } else if (outgoingConnectionStrategy != null) {
+ return outgoingConnectionStrategy.acceptsOutgoingConnection(
+ (Connection)connectionWrapper.getElement(),
+ (Node)targetWrapper.getElement());
+ } else {
+ return super.acceptsOutgoingConnection(connectionWrapper, targetWrapper);
+ }
+ }
+
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java 2008-08-05 15:10:20 UTC (rev 9522)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/DefaultNodeWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -1,12 +1,15 @@
package org.jboss.tools.flow.editor.core;
import org.eclipse.draw2d.geometry.Rectangle;
+import org.jboss.tools.flow.common.core.Connection;
import org.jboss.tools.flow.common.core.Node;
-import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
-import org.jboss.tools.flow.editor.core.AbstractNodeWrapper;
-import org.jboss.tools.flow.editor.core.NodeWrapper;
+import org.jboss.tools.flow.editor.strategy.AcceptsIncomingConnectionStrategy;
+import org.jboss.tools.flow.editor.strategy.AcceptsOutgoingConnectionStrategy;
public abstract class DefaultNodeWrapper extends AbstractNodeWrapper {
+
+ private AcceptsIncomingConnectionStrategy incomingConnectionStrategy;
+ private AcceptsOutgoingConnectionStrategy outgoingConnectionStrategy;
public void setNode(Node node) {
setElement(node);
@@ -47,14 +50,38 @@
return new Rectangle(x == null ? 0 : x, y == null ? 0 : y,
width == null ? -1 : width, height == null ? -1 : height);
}
+
+ public void setAcceptsIncomingConnectionStrategy(AcceptsIncomingConnectionStrategy strategy) {
+ this.incomingConnectionStrategy = strategy;
+ }
+ public void setAcceptsOutgoingConnectionStrategy(AcceptsOutgoingConnectionStrategy strategy) {
+ this.outgoingConnectionStrategy = strategy;
+ }
+
public boolean acceptsIncomingConnection(
- AbstractConnectionWrapper connection, NodeWrapper source) {
- return true;
+ ConnectionWrapper connectionWrapper, NodeWrapper sourceWrapper) {
+ if (connectionWrapper == null || sourceWrapper == null) {
+ return false;
+ } else if (incomingConnectionStrategy != null) {
+ return incomingConnectionStrategy.acceptsIncomingConnection(
+ (Connection)connectionWrapper.getElement(),
+ (Node)sourceWrapper.getElement());
+ } else {
+ return true;
+ }
}
public boolean acceptsOutgoingConnection(
- AbstractConnectionWrapper connection, NodeWrapper target) {
- return true;
+ ConnectionWrapper connectionWrapper, NodeWrapper targetWrapper) {
+ if (connectionWrapper == null || targetWrapper == null) {
+ return false;
+ } else if (outgoingConnectionStrategy != null) {
+ return outgoingConnectionStrategy.acceptsOutgoingConnection(
+ (Connection)connectionWrapper.getElement(),
+ (Node)targetWrapper.getElement());
+ } else {
+ return true;
+ }
}
}
Modified: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/NodeWrapper.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/NodeWrapper.java 2008-08-05 15:10:20 UTC (rev 9522)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/core/NodeWrapper.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -49,8 +49,8 @@
void addOutgoingConnection(AbstractConnectionWrapper connection);
void localAddOutgoingConnection(AbstractConnectionWrapper connection);
void removeOutgoingConnection(AbstractConnectionWrapper connection);
- boolean acceptsIncomingConnection(AbstractConnectionWrapper connection, NodeWrapper source);
- boolean acceptsOutgoingConnection(AbstractConnectionWrapper connection, NodeWrapper target);
+ boolean acceptsIncomingConnection(ConnectionWrapper connection, NodeWrapper source);
+ boolean acceptsOutgoingConnection(ConnectionWrapper connection, NodeWrapper target);
void addListener(ModelListener listener);
void removeListener(ModelListener listener);
Added: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsIncomingConnectionStrategy.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -0,0 +1,13 @@
+package org.jboss.tools.flow.editor.strategy;
+
+import org.jboss.tools.flow.common.core.Connection;
+import org.jboss.tools.flow.common.core.Node;
+
+public interface AcceptsIncomingConnectionStrategy {
+
+ void setNode(Node node);
+
+ boolean acceptsIncomingConnection(Connection connection, Node source);
+
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/strategy/AcceptsOutgoingConnectionStrategy.java 2008-08-05 15:41:43 UTC (rev 9523)
@@ -0,0 +1,13 @@
+package org.jboss.tools.flow.editor.strategy;
+
+import org.jboss.tools.flow.common.core.Connection;
+import org.jboss.tools.flow.common.core.Node;
+
+public interface AcceptsOutgoingConnectionStrategy {
+
+ void setNode(Node node);
+
+ boolean acceptsOutgoingConnection(Connection connection, Node target);
+
+
+}
16 years, 5 months
JBoss Tools SVN: r9522 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2505 and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-08-05 11:10:20 -0400 (Tue, 05 Aug 2008)
New Revision: 9522
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2505/testJBIDE2505.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2584/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2584/text.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2584Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2505Test.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java
Log:
JBIDE-2584
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2505/testJBIDE2505.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2505/testJBIDE2505.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2505/testJBIDE2505.xhtml 2008-08-05 15:10:20 UTC (rev 9522)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<f:loadBundle basename="demo.Messages" var="msg" />
+<head>
+<title>Test Page</title>
+</head>
+
+<body>
+ <!-- Comment Node -->
+ Text Node1
+ <p/>#{msg.hello_message}
+ <h:outputText value="#{msg.hello_message}" />
+</body>
+
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2584/text.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2584/text.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2584/text.xhtml 2008-08-05 15:10:20 UTC (rev 9522)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<f:loadBundle basename="demo.Messages" var="msg" />
+<head>
+<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+</head>
+
+<body>
+ <!-- Comment Node -->
+ Text Node1
+ <p/>#{msg.hello_message}
+</body>
+
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-08-05 15:09:03 UTC (rev 9521)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-08-05 15:10:20 UTC (rev 9522)
@@ -30,6 +30,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2297Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2434Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2505Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2584Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide1467Test;
@@ -79,6 +80,7 @@
suite.addTestSuite(JBIDE2119Test.class);
suite.addTestSuite(JBIDE2219Test.class);
suite.addTestSuite(JBIDE2505Test.class);
+ suite.addTestSuite(JBIDE2584Test.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2505Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2505Test.java 2008-08-05 15:09:03 UTC (rev 9521)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2505Test.java 2008-08-05 15:10:20 UTC (rev 9522)
@@ -44,17 +44,37 @@
setException(null);
//test for element node
- testCaretManupulation(11, 34);
+ testCaretManupulationWithoutElSubstitution("JBIDE/2505/testJBIDE2505.jsp",11, 34); //$NON-NLS-1$
//test for sourceNode
- testCaretManupulation(12, 58);
+ testCaretManupulationWithoutElSubstitution("JBIDE/2505/testJBIDE2505.jsp",12, 58); //$NON-NLS-1$
if(getException()!=null) {
throw getException();
}
}
+ /**
+ * Tests inner nodes include URI
+ *
+ * @throws Throwable
+ */
+ public void testCursorXHTMLJSEL() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
- private void testCaretManupulation(int sourceLine, int positioninLine) throws Throwable {
+ //test for element node
+ testCaretManupulationWithElSubstitution("JBIDE/2505/testJBIDE2505.xhtml",14, 10); //$NON-NLS-1$
+ //test for sourceNode
+ testCaretManupulationWithElSubstitution("JBIDE/2505/testJBIDE2505.xhtml",15, 27); //$NON-NLS-1$
+ if(getException()!=null) {
+ throw getException();
+ }
+ }
+
+
+ private void testCaretManupulationWithoutElSubstitution(String fileName, int sourceLine, int positioninLine) throws Throwable {
// get test page path
- IFile file = (IFile) TestUtil.getComponentPath("JBIDE/2505/testJBIDE2505.jsp", //$NON-NLS-1$
+ IFile file = (IFile) TestUtil.getComponentPath(fileName,
JsfAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file " + file.getFullPath(), //$NON-NLS-1$
file);
@@ -88,4 +108,36 @@
assertEquals("Cursor position doesn't equals",offset+i,styledText.getCaretOffset()); //$NON-NLS-1$
}
}
+
+ private void testCaretManupulationWithElSubstitution(String fileName, int sourceLine, int positioninLine) throws Throwable {
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(fileName,
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ assertNotNull("Could not open specified file " + file.getFullPath(), //$NON-NLS-1$
+ file);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ int offset = TestUtil.getLinePositionOffcet(part.getSourceEditor().getTextViewer(),sourceLine, positioninLine);
+ // get editor control
+
+ part.getSourceEditor().getTextViewer().getTextWidget().setCaretOffset(offset);
+
+
+
+ VpeController vpeController = getVpeController(part);
+ vpeController.sourceSelectionChanged();
+
+ for (int i=0;i<10;i++) {
+
+ nsIDOMNode domNode = vpeController.getXulRunnerEditor().getLastSelectedNode();
+ assertNotNull(domNode);
+ vpeController.visualRefresh();
+ }
+ }
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2584Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2584Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2584Test.java 2008-08-05 15:10:20 UTC (rev 9522)
@@ -0,0 +1,117 @@
+/*******************************************************************************
+* Copyright (c) 2007-2008 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributor:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
+import org.jboss.tools.vpe.editor.template.VpeTemplate;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Node;
+
+
+
+/**
+ * @author mareshkau
+ * Test class which tests text template
+ */
+public class JBIDE2584Test extends VpeTest {
+
+ public JBIDE2584Test(String name) {
+ super(name);
+ }
+
+ public void testForSimpleText() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+ // Tests CA
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath("JBIDE/2584/text.xhtml", //$NON-NLS-1$
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ assertNotNull("Could not open specified file " + "JBIDE/2584/text.xhtml", file); //$NON-NLS-1$ //$NON-NLS-2$
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ ITextViewer itextViewer = part.getSourceEditor().getTextViewer();
+
+
+ Node simpleTextNode = TestUtil.getNodeMappingBySourcePosition(itextViewer, 14, 10);
+
+ VpeController vpeController = getVpeController(part);
+
+ VpeDomMapping domMapping = vpeController.getDomMapping();
+
+ VpeElementMapping simpleTextMapping = (VpeElementMapping) domMapping.getNearNodeMapping(simpleTextNode);
+
+ VpeTemplate simpleTextTemplate = simpleTextMapping.getTemplate();
+
+
+ nsIDOMNode domNode = simpleTextTemplate.getVisualNodeByBySourcePosition(simpleTextMapping, TestUtil.getLinePositionOffcet(itextViewer, 14, 10), 0, domMapping).getFirstChild();
+
+ assertEquals(simpleTextNode ,simpleTextTemplate.getNodeData(domNode, null, domMapping).getSourceNode());
+ assertEquals("Node should be a text node", nsIDOMNode.TEXT_NODE,domNode.getNodeType()); //$NON-NLS-1$
+
+ assertEquals(simpleTextNode.getNodeValue(), domNode.getNodeValue());
+ }
+
+ public void testForElText() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+ // Tests CA
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath("JBIDE/2584/text.xhtml", //$NON-NLS-1$
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ assertNotNull("Could not open specified file " + "JBIDE/2584/text.xhtml", file); //$NON-NLS-1$ //$NON-NLS-2$
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ ITextViewer itextViewer = part.getSourceEditor().getTextViewer();
+
+ Node simpleTextNode = TestUtil.getNodeMappingBySourcePosition(itextViewer, 15, 27);
+
+ VpeController vpeController = getVpeController(part);
+
+ VpeDomMapping domMapping = vpeController.getDomMapping();
+
+ VpeElementMapping simpleTextMapping = (VpeElementMapping) domMapping.getNearNodeMapping(simpleTextNode);
+
+ VpeTemplate simpleTextTemplate = simpleTextMapping.getTemplate();
+
+ nsIDOMNode domNode = simpleTextTemplate.getVisualNodeByBySourcePosition(simpleTextMapping, TestUtil.getLinePositionOffcet(itextViewer, 15, 27), 0, domMapping).getFirstChild();
+
+ assertEquals("Node should be a text node", nsIDOMNode.TEXT_NODE,domNode.getNodeType()); //$NON-NLS-1$
+ assertEquals(simpleTextNode ,simpleTextTemplate.getNodeData(domNode, null, domMapping).getSourceNode());
+ assertEquals("Hello", domNode.getNodeValue().trim()); //$NON-NLS-1$
+ }
+
+}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java 2008-08-05 15:09:03 UTC (rev 9521)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java 2008-08-05 15:10:20 UTC (rev 9522)
@@ -22,14 +22,19 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.IOverwriteQuery;
import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.ui.test.beans.ImportBean;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.xpcom.XPCOMException;
+import org.w3c.dom.Node;
/**
* Class for importing project from jar file
@@ -250,6 +255,18 @@
return importBean;
}
/**
+ * Utility function which returns node mapping by source position(line and position in line)
+ * @param lineIndex
+ * @param linePosition
+ * @return node for specified src position
+ */
+ public static Node getNodeMappingBySourcePosition(ITextViewer itextViewer, int lineIndex, int linePosition) {
+ int offset = getLinePositionOffcet(itextViewer, lineIndex, linePosition);
+ IndexedRegion treeNode = ContentAssistUtils.getNodeAt(itextViewer, offset);
+ return (Node) treeNode;
+ }
+
+ /**
* Utility function which is used to calculate offcet in document by line number and character position
*
* @param textViewer
16 years, 5 months
JBoss Tools SVN: r9521 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-08-05 11:09:03 -0400 (Tue, 05 Aug 2008)
New Revision: 9521
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
Log:
JBIDE-2584
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java 2008-08-05 15:00:10 UTC (rev 9520)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/preferences/VpePreference.java 2008-08-05 15:09:03 UTC (rev 9521)
@@ -24,7 +24,7 @@
public static String ATT_SOURCE_VISUAL_EDITORS_WEIGHTS = "Source-Visual Editors Weights";
public static String ATT_SHOW_SELECTION_TAG_BAR = "show selection tag bar";
public static String ATT_ALWAYS_HIDE_SELECTION_BAR_WITHOUT_PROMT="always hide selection bar without prompt";
-
+ public static String SHOW_COMMENTS_VALUE;
public static String VPE_EDITOR_PATH = "%Options%/Struts Studio/Editors/Visual Page Editor"; //$NON-NLS-1$
public static final Preference SHOW_COMMENTS = new VpePreference(VPE_EDITOR_PATH, ATT_SHOW_COMMENTS);
public static final Preference SHOW_BORDER_FOR_UNKNOWN_TAGS = new VpePreference(VPE_EDITOR_PATH, ATT_SHOW_BORDER_FOR_UNKNOWN_TAGS);
@@ -38,6 +38,9 @@
public static final Preference SHOW_SELECTION_TAG_BAR = new VpePreference(VPE_EDITOR_PATH,ATT_SHOW_SELECTION_TAG_BAR);
public static final Preference ALWAYS_HIDE_SELECTION_BAR_WITHOUT_PROMT = new VpePreference(VPE_EDITOR_PATH,ATT_ALWAYS_HIDE_SELECTION_BAR_WITHOUT_PROMT);
+ static {
+ SHOW_COMMENTS_VALUE =SHOW_COMMENTS.getValue();
+ }
protected VpePreference(String optionPath, String attributeName) {
super(optionPath, attributeName);
}
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-08-05 15:00:10 UTC (rev 9520)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-08-05 15:09:03 UTC (rev 9521)
@@ -350,9 +350,11 @@
int offcetReferenceToSourceNode = focusOffcetInSourceDocument-targetSourceNode.getStartOffset();
int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
-
- selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, visualNodeOffcet);
-
+
+ if(visualNodeOffcet<visualNode.getNodeValue().length()) {
+
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, visualNodeOffcet);
+ }
}
}
16 years, 5 months