|
|
|
|
|
|
Re: Extending the BPMN Modeler [message #503334 is a reply to message #502247] |
Fri, 11 December 2009 23:03 |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
On 12/7/09 4:59 AM, Christian Kuhl wrote:
> Hey it's me again.
> Antoine, thanks for the links!
>
> I decided to use extension points to add the new entry for a Subclass of
> "SubProcess" to my palette. So far so good, I also managed to assign it
> to a CreationTool but thats where my problems come in:
> I don't seem to be able to create anything when Im using my own
> elementType. Maybe I missed to specify something?
>
> My own PaletteFactory contains this:
>
> ..
> return new CreationTool(BpmnElementTypes.MyOwnSubprocess);
> ..
>
> So what I did was basically: I tried to define an "IElementType" in
> BpmnElementTypes and add the elementType to plugin.xml
>
> <metamodel nsURI="http://stp.eclipse.org/bpmn">
> <metamodelType
> id="org.eclipse.stp.bpmn.diagram.MyOwnSubProcess"
> name="%sub_process_label"
> kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
> eclass="MyOwnSubprocess"
> edithelper=" org.eclipse.stp.bpmn.diagram.edit.helpers.SubProcessEditHelp er ">
>
> <param name="semanticHint" value="2002"/>
> </metamodelType>
> </metamodel>
>
>
>
>
> However, there are a few things Im not sure about: The semantic Hint for
> example. Also is it necessary to create new viewProvider and
> EditPartProvider classes ?(I saw that in some other tutorial) I was
> hoping I could simply use the existing Helper class since it doesnt
> explicitly mention the type "Subprocess" anywhere.
> As some of you might suspect I am by no means an expert in GMF :blush:
> Anyways: when I want to draw my own Object it just doesnt let me (there
> is this little "not allowed" sign on my pointer)
> Has anyone ever done something similar?
> ANY help is greatly appreciated! :)
As a rule of thumb, don't touch element types as they are defined in the
model of the diagram. You can use annotations to customize your items.
Thanks,
Antoine
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04698 seconds