Author: koen.aers(a)jboss.com
Date: 2008-07-30 05:21:37 -0400 (Wed, 30 Jul 2008)
New Revision: 9417
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/transition.gif
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java
Log:
refactor PaletteFactory
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/transition.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/icons/transition.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java 2008-07-30
09:21:20 UTC (rev 9416)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/editor/JpdlPaletteFactory.java 2008-07-30
09:21:37 UTC (rev 9417)
@@ -4,10 +4,14 @@
import java.util.List;
import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
+import org.eclipse.gef.palette.ConnectionCreationToolEntry;
import org.eclipse.gef.palette.PaletteEntry;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gef.requests.CreationFactory;
import org.eclipse.gef.requests.SimpleFactory;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.flow.editor.PaletteFactory;
+import org.jboss.tools.flow.editor.core.AbstractConnectionWrapper;
import org.jboss.tools.flow.jpdl4.graph.Activator;
import org.jboss.tools.flow.jpdl4.graph.wrapper.EndStateWrapper;
import org.jboss.tools.flow.jpdl4.graph.wrapper.StartStateWrapper;
@@ -64,6 +68,22 @@
);
entries.add(combined);
+ ToolEntry tool = new ConnectionCreationToolEntry(
+ "Transition",
+ "Creating a new Transition",
+ new CreationFactory() {
+ public Object getNewObject() {
+ return connectionFactory.createElementConnection();
+ }
+ public Object getObjectType() {
+ return AbstractConnectionWrapper.class;
+ }
+ },
+
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/transition.gif")),
+
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/transition.gif"))
+ );
+ entries.add(tool);
+
return entries;
}
Show replies by date