Author: koen.aers(a)jboss.com
Date: 2009-04-22 13:37:11 -0400 (Wed, 22 Apr 2009)
New Revision: 14854
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_event_listener.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_swimlane.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_timer.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/NoDetailsTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessGraphicalEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeGraphicalEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsPage.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsView.java
Log:
- add contextmenu to detailsview
- editparts to show wrapper details in details view
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_event_listener.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_event_listener.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_swimlane.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_swimlane.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_timer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/new_timer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-04-22 15:59:35 UTC (rev
14853)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-04-22 17:37:11 UTC (rev
14854)
@@ -299,6 +299,86 @@
name="Details"
restorable="true">
</view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ description="jPDL 4 Command Category"
+ id="org.jboss.tools.flow.jpdl4"
+ name="jPDL 4">
+ </category>
+ <command
+ categoryId="org.jboss.tools.flow.jpdl4"
+
defaultHandler="org.jboss.tools.flow.jpdl4.handler.AddSwimlaneHandler"
+ id="org.jboss.tools.flow.jpdl4.addSwimlane"
+ name="Add Swimlane">
+ </command>
+ <command
+ categoryId="org.jboss.tools.flow.jpdl4"
+
defaultHandler="org.jboss.tools.flow.jpdl4.handler.AddEventListenerHandler"
+ id="org.jboss.tools.flow.jpdl4.addEventListenerType"
+ name="Add Event Listener Type">
+ </command>
+ <command
+ categoryId="org.jboss.tools.flow.jpdl4"
+
defaultHandler="org.jboss.tools.flow.jpdl4.handler.AddEventListenerHandler"
+ id="org.jboss.tools.flow.jpdl4.addEventListener"
+ name="Add Event Listener">
+ </command>
+ <command
+ categoryId="org.jboss.tools.flow.jpdl4"
+
defaultHandler="org.jboss.tools.flow.jpdl4.handler.AddTimerHandler"
+ id="org.jboss.tools.flow.jpdl4.addTimer"
+ name="Add Timer">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.jboss.tools.flow.jpdl4.details">
+ <command
+ commandId="org.jboss.tools.flow.jpdl4.addSwimlane"
+ icon="icons/16/new_swimlane.gif"
+ id="org.jboss.tools.flow.jpdl4.addSwimlane"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <iterate>
+ <instanceof
+
value="org.jboss.tools.flow.jpdl4.editpart.ProcessTreeRootEditPart">
+ </instanceof>
+ </iterate>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.flow.jpdl4.addEventListener"
+ icon="icons/16/new_event_listener.gif"
+ id="org.jboss.tools.flow.jpdl4.addEventListener"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <iterate>
+ <instanceof
+
value="org.jboss.tools.flow.jpdl4.editpart.ProcessTreeRootEditPart">
+ </instanceof>
+ </iterate>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.flow.jpdl4.addTimer"
+ icon="icons/16/new_timer.gif"
+ id="org.jboss.tools.flow.jpdl4.addTimer"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <iterate>
+ <instanceof
+
value="org.jboss.tools.flow.jpdl4.editpart.ProcessTreeRootEditPart">
+ </instanceof>
+ </iterate>
+ </visibleWhen>
+ </command>
+ </menuContribution>
</extension>
</plugin>
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -143,7 +143,7 @@
public void postProcess(Wrapper wrapper) {
if (!(wrapper instanceof FlowWrapper)) return;
FlowWrapper flowWrapper = (FlowWrapper)wrapper;
- for (NodeWrapper source : flowWrapper.getElements()) {
+ for (NodeWrapper source : flowWrapper.getNodeWrappers()) {
ArrayList<ConnectionWrapper> flows =
(ArrayList<ConnectionWrapper>)source.getElement().getMetaData("flows");
if (flows == null) continue;
for (ConnectionWrapper connectionWrapper : flows) {
@@ -265,7 +265,7 @@
private NodeWrapper getNamedNode(String name, FlowWrapper flowWrapper) {
if (name == null) return null;
- for (NodeWrapper nodeWrapper : flowWrapper.getElements()) {
+ for (NodeWrapper nodeWrapper : flowWrapper.getNodeWrappers()) {
if (name.equals(nodeWrapper.getName())) return nodeWrapper;
}
return null;
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlEditor.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -7,7 +7,6 @@
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.parts.SelectionSynchronizer;
import org.eclipse.gef.ui.parts.TreeViewer;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
@@ -88,7 +87,7 @@
treeViewer.setEditPartFactory(new JpdlTreeEditPartFactory());
getEditDomain().addViewer(treeViewer);
// getSelectionSynchronizer().addViewer(treeViewer);
- detailsPage = new DetailsPage(treeViewer) ;
+ detailsPage = new DetailsPage(treeViewer);
getSite().getSelectionProvider().addSelectionChangedListener(detailsPage);
}
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -395,7 +395,7 @@
private void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
if (wrapper instanceof ContainerWrapper) {
ContainerWrapper containerWrapper = (ContainerWrapper)wrapper;
- List<NodeWrapper> children = containerWrapper.getElements();
+ List<NodeWrapper> children = containerWrapper.getNodeWrappers();
for (NodeWrapper nodeWrapper : children) {
appendToBuffer(buffer, nodeWrapper, level+1);
}
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPart.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -10,6 +10,7 @@
public JpdlTreeEditPart(Element element) {
super(element);
+ if (element == null) return;
Object object = element.getMetaData("propertySource");
if (object != null && object instanceof IPropertySource) {
propertySource = (IPropertySource)object;
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -2,17 +2,21 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
-import org.jboss.tools.flow.jpdl4.model.Process;
+import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
+import org.jboss.tools.flow.common.wrapper.FlowWrapper;
+import org.jboss.tools.flow.common.wrapper.NodeWrapper;
public class JpdlTreeEditPartFactory implements EditPartFactory {
public EditPart createEditPart(EditPart context, Object model) {
- if (model instanceof Process && context == null) return new
ProcessTreeRootEditPart((Process)model);
+ if (model instanceof FlowWrapper && context == null) return new
ProcessTreeRootEditPart((FlowWrapper)model);
+ if (model instanceof NodeWrapper && context == null) return new
TaskTreeRootEditPart((NodeWrapper)model);
+ if (model instanceof ConnectionWrapper && context == null) return new
SequenceFlowTreeRootEditPart((ConnectionWrapper)model);
if (model instanceof ProcessNodeListTreeEditPart) return (EditPart)model;
if (model instanceof SwimlaneListTreeEditPart) return (EditPart)model;
if (model instanceof EventListenerContainerListTreeEditPart) return (EditPart)model;
if (model instanceof TimerListTreeEditPart) return (EditPart)model;
- return null;
+ return new NoDetailsTreeRootEditPart();
}
}
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/NoDetailsTreeRootEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/NoDetailsTreeRootEditPart.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/NoDetailsTreeRootEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -0,0 +1,10 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+
+public class NoDetailsTreeRootEditPart extends JpdlTreeEditPart {
+
+ public NoDetailsTreeRootEditPart() {
+ super(null);
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/NoDetailsTreeRootEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessGraphicalEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessGraphicalEditPart.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessGraphicalEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -18,7 +18,7 @@
public void modelChanged(ModelEvent event) {
super.modelChanged(event);
- if (event.getChange() == ContainerWrapper.ADD_ELEMENT) {
+ if (event.getChangeType() == ContainerWrapper.ADD_ELEMENT) {
Object changedObject = event.getChangedObject();
if (changedObject != null) {
EditPart editPart =
(EditPart)getViewer().getEditPartRegistry().get(changedObject);
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeGraphicalEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeGraphicalEditPart.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessNodeGraphicalEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -18,14 +18,15 @@
public void modelChanged(ModelEvent event) {
super.modelChanged(event);
- if (event.getChange() == Wrapper.ADD_INCOMING_CONNECTION) {
- Object object =
getViewer().getEditPartRegistry().get(event.getChangedObject());
+ if (event.getChangeType() == Wrapper.ADD_ELEMENT &&
"incomingConnection".equals(event.getChangeDiscriminator())) {
+ Object object = getViewer().getEditPartRegistry().get(event.getNewValue());
if (object != null && object instanceof
SequenceFlowGraphicalEditPart) {
getViewer().select((EditPart)object);
((SequenceFlowGraphicalEditPart)object).performDirectEdit();
}
- } else if (event.getChange() == Wrapper.ADD_OUTGOING_CONNECTION ||
- event.getChange() == Wrapper.REMOVE_OUTGOING_CONNECTION) {
+ } else if ((event.getChangeType() == Wrapper.ADD_ELEMENT ||
+ event.getChangeType() == Wrapper.REMOVE_ELEMENT) &&
+ "outgoingConnection".equals(event.getChangeDiscriminator())) {
for (Object connection : getSourceConnections()) {
if (connection instanceof AbstractConnectionEditPart) {
((AbstractConnectionEditPart)connection).refresh();
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -5,31 +5,32 @@
import org.jboss.tools.flow.jpdl4.model.Process;
+import org.jboss.tools.flow.common.wrapper.FlowWrapper;
+
public class ProcessTreeRootEditPart extends JpdlTreeEditPart {
- List<Object> modelChildren;
+ public ProcessTreeRootEditPart(FlowWrapper flowWrapper) {
+ super(flowWrapper);
+ }
- public ProcessTreeRootEditPart(Process process) {
- super(process);
+ private Process getProcess() {
+ return (Process)((FlowWrapper)getModel()).getElement();
}
protected void createEditPolicies() {
}
- private List<Object> initModelChildren() {
+ protected List<Object> getModelChildren() {
List<Object> result = new ArrayList<Object>();
- result.add(new SwimlaneListTreeEditPart((Process)getModel()));
- result.add(new EventListenerContainerListTreeEditPart((Process)getModel()));
- result.add(new TimerListTreeEditPart((Process)getModel()));
- result.add(new ProcessNodeListTreeEditPart((Process)getModel()));
+ result.add(new EventListenerContainerListTreeEditPart(null));
+// Process process = getProcess();
+// if (process.get)
return result;
+// List<Object> result = new ArrayList<Object>();
+// if (modelChildren == null) {
+// modelChildren = initModelChildren();
+// }
+// return modelChildren;
}
- protected List<Object> getModelChildren() {
- if (modelChildren == null) {
- modelChildren = initModelChildren();
- }
- return modelChildren;
- }
-
}
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -0,0 +1,20 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
+
+public class SequenceFlowTreeRootEditPart extends JpdlTreeEditPart {
+
+ public SequenceFlowTreeRootEditPart(ConnectionWrapper connectionWrapper) {
+ super(connectionWrapper);
+ }
+
+ protected List<Object> getModelChildren() {
+ List<Object> result = new ArrayList<Object>();
+ result.add(new EventListenerContainerListTreeEditPart(null));
+ return result;
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -0,0 +1,20 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.flow.common.wrapper.NodeWrapper;
+
+public class TaskTreeRootEditPart extends JpdlTreeEditPart {
+
+ public TaskTreeRootEditPart(NodeWrapper nodeWrapper) {
+ super(nodeWrapper);
+ }
+
+ protected List<Object> getModelChildren() {
+ List<Object> result = new ArrayList<Object>();
+ result.add(new EventListenerContainerListTreeEditPart(null));
+ return result;
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -0,0 +1,21 @@
+package org.jboss.tools.flow.jpdl4.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class AddEventListenerHandler extends AbstractHandler implements IHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ MessageDialog.openInformation(
+ window.getShell(), "MenuEclipseArticle Plug-in",
+ "Hello, Eclipse world");
+ return null;
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -0,0 +1,21 @@
+package org.jboss.tools.flow.jpdl4.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class AddSwimlaneHandler extends AbstractHandler implements IHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ MessageDialog.openInformation(
+ window.getShell(), "MenuEclipseArticle Plug-in",
+ "Hello, Eclipse world");
+ return null;
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -0,0 +1,21 @@
+package org.jboss.tools.flow.jpdl4.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class AddTimerHandler extends AbstractHandler implements IHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ MessageDialog.openInformation(
+ window.getShell(), "MenuEclipseArticle Plug-in",
+ "Hello, Eclipse world");
+ return null;
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsPage.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsPage.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsPage.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -10,7 +10,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.part.Page;
-import org.jboss.tools.flow.common.wrapper.Wrapper;
public class DetailsPage extends Page implements IDetailsPage, ISelectionChangedListener
{
@@ -67,9 +66,6 @@
if (object instanceof EditPart) {
object = ((EditPart)object).getModel();
}
- if (object instanceof Wrapper) {
- object = ((Wrapper)object).getElement();
- }
if (getViewer() != null) {
getViewer().setContents(object);
}
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsView.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsView.java 2009-04-22
15:59:35 UTC (rev 14853)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/view/DetailsView.java 2009-04-22
17:37:11 UTC (rev 14854)
@@ -1,10 +1,15 @@
package org.jboss.tools.flow.jpdl4.view;
+import org.eclipse.jface.action.GroupMarker;
+import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.IPage;
@@ -17,7 +22,21 @@
public class DetailsView extends PageBookView implements ISelectionProvider,
ISelectionChangedListener {
+
+ private MenuManager menuManager;
+
+ public void createPartControl(Composite parent) {
+ createContextMenu();
+ super.createPartControl(parent);
+ }
+ protected void createContextMenu() {
+ menuManager = new MenuManager();
+ menuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
+ getSite().registerContextMenu("org.jboss.tools.flow.jpdl4.details",
menuManager, getSelectionProvider());
+ }
+
+
public void addSelectionChangedListener(ISelectionChangedListener listener) {
getSelectionProvider().addSelectionChangedListener(listener);
}
@@ -38,6 +57,8 @@
initPage((IPageBookViewPage)page);
}
page.createControl(getPageBook());
+ Menu menu = menuManager.createContextMenu(getPageBook());
+ page.getControl().setMenu(menu);
return new PageRec(part, page);
}
return null;