Author: koen.aers(a)jboss.com
Date: 2008-07-24 08:53:35 -0400 (Thu, 24 Jul 2008)
New Revision: 9264
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/main/java/org/jboss/tools/flow/editor/command/SplitConnectionCommand.java
Log:
add support to overrule node add when not appropriate
Modified:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/main/java/org/jboss/tools/flow/editor/command/SplitConnectionCommand.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/main/java/org/jboss/tools/flow/editor/command/SplitConnectionCommand.java 2008-07-24
12:52:32 UTC (rev 9263)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/main/java/org/jboss/tools/flow/editor/command/SplitConnectionCommand.java 2008-07-24
12:53:35 UTC (rev 9264)
@@ -84,5 +84,11 @@
newElement.setParent(null);
oldConnection.connect(oldSource, oldTarget);
}
+
+ public boolean canExecute() {
+ return parent.acceptsElement(newElement) &&
+ newElement.acceptsIncomingConnection(oldConnection, oldSource) &&
+ newElement.acceptsOutgoingConnection(secondConnection, oldTarget);
+ }
}
Show replies by date