Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SOA/BPMN Modeler/Developing with the BPMN modeler"
m |
(→Hiding elements in the popup toolbar and the end connections menus) |
||
Line 26: | Line 26: | ||
== Hiding elements in the popup toolbar and the end connections menus == | == Hiding elements in the popup toolbar and the end connections menus == | ||
+ | |||
+ | [http://dev.eclipse.org/svnroot/stp/org.eclipse.stp.bpmn/trunk/samples/org.eclipse.stp.bpmn.sample.noGatewayInToolbar/ Full sample] | ||
+ | |||
+ | You need to create your own editor, subclassing the <code>BpmnDiagramEditor</code>. | ||
+ | |||
+ | In this editor you will override the method <code>createDiagramEditDomain</code>: | ||
+ | <code> | ||
+ | protected void createDiagramEditDomain() { | ||
+ | BpmnDiagramEditDomain domain = new BpmnDiagramEditDomain(this); | ||
+ | domain.setActionManager(createActionManager()); | ||
+ | |||
+ | Set<IElementType> types = new HashSet<IElementType>(); | ||
+ | for (Object gatewayType : ActivityType.VALUES_GATEWAYS) { | ||
+ | types.add(ElementTypeEx.wrap(BpmnElementTypes.Activity_2001, | ||
+ | ((ActivityType) gatewayType).getLiteral())); | ||
+ | } | ||
+ | types.add(BpmnElementTypes.Group_1004); | ||
+ | types.add(BpmnElementTypes.Group_2006); | ||
+ | domain.setRemovedElementTypes(types); | ||
+ | |||
+ | setEditDomain(domain); | ||
+ | } | ||
+ | </code> |
Revision as of 11:45, 15 February 2008
This page is about developing with the STP BPMN modeler, by contributing and/or removing actions, shapes, etc.
Contents
Menus
Adding toolbar extensions
Adding a toolbar item
Adding a toolbar group
Creating a new drag and drop (DND) interaction
Creating a DND to add a semantic element (eg annotation)
Creating a DND to add a graphical element
Hiding elements of the palette
You need to create your own editor, subclassing the BpmnDiagramEditor
.
In this editor you will override the method createDiagramEditDomain
:
protected void createDiagramEditDomain() { BpmnDiagramEditDomain domain = new BpmnDiagramEditDomain(this); domain.setActionManager(createActionManager()); Set<IElementType> types = new HashSet<IElementType>(); for (Object gatewayType : ActivityType.VALUES_GATEWAYS) { types.add(ElementTypeEx.wrap(BpmnElementTypes.Activity_2001, ((ActivityType) gatewayType).getLiteral())); } types.add(BpmnElementTypes.Group_1004); types.add(BpmnElementTypes.Group_2006); domain.setRemovedElementTypes(types); setEditDomain(domain); }