Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Service Oriented Architecture Tools Platform (STP) » Extending STP BPMN
Extending STP BPMN [message #608498] Tue, 15 January 2008 21:54 Go to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi,

I need to extend STP BPMN editor with some concepts (with some SOA and
vocabulary concepts). I supose that I need to do this on the metamodel and
editor, too? Is it possible to do this with STP BPMN editor ?

Thanks in advance.

--
Regards, Milan Milanovic
Re: Extending STP BPMN [message #608499 is a reply to message #608498] Tue, 15 January 2008 22:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Hey Milan,

nice to hear from you!

It all depends on what you need to extend. You can annotate the model
with annotations, or change it.

On the editor level, you'll probably need to contribute a properties
section to edit them.

Thanks,

Antoine

Milan Milanovic wrote:
> Hi,
>
> I need to extend STP BPMN editor with some concepts (with some SOA and
> vocabulary concepts). I supose that I need to do this on the metamodel
> and editor, too? Is it possible to do this with STP BPMN editor ?
>
> Thanks in advance.
>
> --
> Regards, Milan Milanovic
>
>
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Extending STP BPMN [message #608500 is a reply to message #608499] Wed, 16 January 2008 03:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ymo.noemail.com

Hi.

Thanks Antoine for your prompt responses on this newsgroup !

One area we are thinking of extending STP is :

1) being able to take a whole process as a component. So you would take a
modeled process and drop it on to your model editor as a component. Is
this already doable or feasible if it is not already implemented ?

2) More on the same lines as above. How can one customize the palette ? We
want to be able to create our own process modules and make them available
in the palette.

3) I noticed that in stp the model elements cannot be annotated. In the
properties view i can see the Annotations tab. But it is read only for now.
Re: Extending STP BPMN [message #608502 is a reply to message #608499] Wed, 16 January 2008 12:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi Antoine,

thank you very much on answer.

> It all depends on what you need to extend. You can annotate the model
> with annotations, or change it.

I need to introduce some new elements besides activites, like some specific
activities. Also, I'll need to introduce whole vocabulary in the BPMN
diagram.
So, I supose that it would be on the metamodel and graphical syntax, too.
Is it
possible to be done ?


--
Best regards, Milan Milanovic

Antoine Toulme wrote:

> Hey Milan,

> nice to hear from you!

> It all depends on what you need to extend. You can annotate the model
> with annotations, or change it.

> On the editor level, you'll probably need to contribute a properties
> section to edit them.

> Thanks,

> Antoine

> Milan Milanovic wrote:
>> Hi,
>>
>> I need to extend STP BPMN editor with some concepts (with some SOA and
>> vocabulary concepts). I supose that I need to do this on the metamodel
>> and editor, too? Is it possible to do this with STP BPMN editor ?
>>
>> Thanks in advance.
>>
>> --
>> Regards, Milan Milanovic
>>
>>
>>
Re: Extending STP BPMN [message #608503 is a reply to message #608500] Wed, 16 January 2008 17:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

ymo wrote:
> Hi.
>
> Thanks Antoine for your prompt responses on this newsgroup !
>
> One area we are thinking of extending STP is :
>
> 1) being able to take a whole process as a component. So you would take
> a modeled process and drop it on to your model editor as a component. Is
> this already doable or feasible if it is not already implemented ?
Yes, you can drop any file placed in the same project on any shape of
your diagram.

You can open it by doing a Shift+Double click then.

>
> 2) More on the same lines as above. How can one customize the palette ?
> We want to be able to create our own process modules and make them
> available in the palette.
BpmnPaletteFactory is the way to go. Extend the editor, have it use your
own flavor of a palette.
>
> 3) I noticed that in stp the model elements cannot be annotated. In the
> properties view i can see the Annotations tab. But it is read only for now.
You can edit the values of the annotations, but you cannot create it.
That's in the domain of the possible to add the possibility to create
the annotation on the fly. I'd recommend you take a look at our property
section implementation. The main problem is to work well with the
TableViewer.
>

I hope this helps.

Antoine

--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Extending STP BPMN [message #608534 is a reply to message #608502] Wed, 16 January 2008 17:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Milan Milanovic wrote:
> Hi Antoine,
>
> thank you very much on answer.
>
>> It all depends on what you need to extend. You can annotate the model
>> with annotations, or change it.
>
> I need to introduce some new elements besides activites, like some specific
> activities.
Some specific activities ? Can you be more specific ? Do you want to add
some new type of ActivityType ?
Also, I'll need to introduce whole vocabulary in the BPMN
> diagram.
I don't see what you mean here; if that's some kind of new EMF object,
you have no choice but to regenerate.
> So, I supose that it would be on the metamodel and graphical syntax,
> too.
Yes, it would mean that you would have to change the mnodel and gmfmap
files.
Is it
> possible to be done ?
We have marked all the stuff that we hand coded @generated not.
So it should not be a problem to change the model files and regenerate
the GMF code. Problem is, the GMF generator changed, and we did some
heavy hacking. So I'm not sure you'll be fine with that.
>
>
> --
> Best regards, Milan Milanovic
>
> Antoine Toulme wrote:
>
>> Hey Milan,
>
>> nice to hear from you!
>
>> It all depends on what you need to extend. You can annotate the model
>> with annotations, or change it.
>
>> On the editor level, you'll probably need to contribute a properties
>> section to edit them.
>
>> Thanks,
>
>> Antoine
>
>> Milan Milanovic wrote:
>>> Hi,
>>>
>>> I need to extend STP BPMN editor with some concepts (with some SOA
>>> and vocabulary concepts). I supose that I need to do this on the
>>> metamodel and editor, too? Is it possible to do this with STP BPMN
>>> editor ?
>>>
>>> Thanks in advance.
>>>
>>> --
>>> Regards, Milan Milanovic
>>>
>>>
>>>
>
>
>
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Extending STP BPMN [message #608535 is a reply to message #608534] Wed, 16 January 2008 19:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Dear Antoine,

>>> It all depends on what you need to extend. You can annotate the model
>>> with annotations, or change it.
>>
>> I need to introduce some new elements besides activites, like some specific
>> activities.
> Some specific activities ? Can you be more specific ? Do you want to add
> some new type of ActivityType ?

Yes, it would be some kind of new ActivityType.

> Also, I'll need to introduce whole vocabulary in the BPMN
>> diagram.
> I don't see what you mean here; if that's some kind of new EMF object,
> you have no choice but to regenerate.

Well, I want to represent some kind of UML class diagrams in paralel with
BPMN concepts on the BPMN diagram. Of course, those UML class-like
elements will be conected with BPMN activites and events, and with some
new activites.

>> So, I supose that it would be on the metamodel and graphical syntax,
>> too.
> Yes, it would mean that you would have to change the mnodel and gmfmap
> files.
> Is it
>> possible to be done ?
> We have marked all the stuff that we hand coded @generated not.
> So it should not be a problem to change the model files and regenerate
> the GMF code. Problem is, the GMF generator changed, and we did some
> heavy hacking. So I'm not sure you'll be fine with that.

O.K. I'll see.

--
Best regards, Milan Milanovic

Antoine Toulme wrote:

> Milan Milanovic wrote:
>> Hi Antoine,
>>
>> thank you very much on answer.
>>
>>> It all depends on what you need to extend. You can annotate the model
>>> with annotations, or change it.
>>
>> I need to introduce some new elements besides activites, like some specific
>> activities.
> Some specific activities ? Can you be more specific ? Do you want to add
> some new type of ActivityType ?
> Also, I'll need to introduce whole vocabulary in the BPMN
>> diagram.
> I don't see what you mean here; if that's some kind of new EMF object,
> you have no choice but to regenerate.
>> So, I supose that it would be on the metamodel and graphical syntax,
>> too.
> Yes, it would mean that you would have to change the mnodel and gmfmap
> files.
> Is it
>> possible to be done ?
> We have marked all the stuff that we hand coded @generated not.
> So it should not be a problem to change the model files and regenerate
> the GMF code. Problem is, the GMF generator changed, and we did some
> heavy hacking. So I'm not sure you'll be fine with that.
>>
>>
>> --
>> Best regards, Milan Milanovic
>>
>> Antoine Toulme wrote:
>>
>>> Hey Milan,
>>
>>> nice to hear from you!
>>
>>> It all depends on what you need to extend. You can annotate the model
>>> with annotations, or change it.
>>
>>> On the editor level, you'll probably need to contribute a properties
>>> section to edit them.
>>
>>> Thanks,
>>
>>> Antoine
>>
>>> Milan Milanovic wrote:
>>>> Hi,
>>>>
>>>> I need to extend STP BPMN editor with some concepts (with some SOA
>>>> and vocabulary concepts). I supose that I need to do this on the
>>>> metamodel and editor, too? Is it possible to do this with STP BPMN
>>>> editor ?
>>>>
>>>> Thanks in advance.
>>>>
>>>> --
>>>> Regards, Milan Milanovic
>>>>
>>>>
>>>>
>>
>>
>>
>>
Re: Extending STP BPMN [message #608536 is a reply to message #608535] Wed, 16 January 2008 23:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Milan Milanovic wrote:
> Dear Antoine,
>
>>>> It all depends on what you need to extend. You can annotate the
>>>> model with annotations, or change it.
>>>
>>> I need to introduce some new elements besides activites, like some
>>> specific
>>> activities.
>> Some specific activities ? Can you be more specific ? Do you want to
>> add some new type of ActivityType ?
>
> Yes, it would be some kind of new ActivityType.
That would be ok then.
>
>> Also, I'll need to introduce whole vocabulary in the BPMN
>>> diagram.
>> I don't see what you mean here; if that's some kind of new EMF object,
>> you have no choice but to regenerate.
>
> Well, I want to represent some kind of UML class diagrams in paralel
> with BPMN concepts on the BPMN diagram. Of course, those UML class-like
> elements will be conected with BPMN activites and events, and with some
> new activites.

ok, you need to go the heavy way, change the EMF model, and regenerate
the code.
>
>>> So, I supose that it would be on the metamodel and graphical syntax,
>>> too.
>> Yes, it would mean that you would have to change the mnodel and gmfmap
>> files.
>> Is it
>>> possible to be done ?
>> We have marked all the stuff that we hand coded @generated not.
>> So it should not be a problem to change the model files and regenerate
>> the GMF code. Problem is, the GMF generator changed, and we did some
>> heavy hacking. So I'm not sure you'll be fine with that.
>
> O.K. I'll see.
Good luck!

Antoine
> --
> Best regards, Milan Milanovic
>
> Antoine Toulme wrote:
>
>> Milan Milanovic wrote:
>>> Hi Antoine,
>>>
>>> thank you very much on answer.
>>>
>>>> It all depends on what you need to extend. You can annotate the
>>>> model with annotations, or change it.
>>>
>>> I need to introduce some new elements besides activites, like some
>>> specific
>>> activities.
>> Some specific activities ? Can you be more specific ? Do you want to
>> add some new type of ActivityType ?
>> Also, I'll need to introduce whole vocabulary in the BPMN
>>> diagram.
>> I don't see what you mean here; if that's some kind of new EMF object,
>> you have no choice but to regenerate.
>>> So, I supose that it would be on the metamodel and graphical syntax,
>>> too.
>> Yes, it would mean that you would have to change the mnodel and gmfmap
>> files.
>> Is it
>>> possible to be done ?
>> We have marked all the stuff that we hand coded @generated not.
>> So it should not be a problem to change the model files and regenerate
>> the GMF code. Problem is, the GMF generator changed, and we did some
>> heavy hacking. So I'm not sure you'll be fine with that.
>>>
>>>
>>> --
>>> Best regards, Milan Milanovic
>>>
>>> Antoine Toulme wrote:
>>>
>>>> Hey Milan,
>>>
>>>> nice to hear from you!
>>>
>>>> It all depends on what you need to extend. You can annotate the
>>>> model with annotations, or change it.
>>>
>>>> On the editor level, you'll probably need to contribute a properties
>>>> section to edit them.
>>>
>>>> Thanks,
>>>
>>>> Antoine
>>>
>>>> Milan Milanovic wrote:
>>>>> Hi,
>>>>>
>>>>> I need to extend STP BPMN editor with some concepts (with some SOA
>>>>> and vocabulary concepts). I supose that I need to do this on the
>>>>> metamodel and editor, too? Is it possible to do this with STP BPMN
>>>>> editor ?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> --
>>>>> Regards, Milan Milanovic
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>>
>
>
>
>


--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Extending STP BPMN [message #608547 is a reply to message #608536] Thu, 17 January 2008 11:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Dear Antoine,

regarding generation of the BPMN editor, what do you think about building
BPMN editor from scratch using GMF 2.0 ? Is it too complex ? I need just a
simple BPMN editor, without executions and other stuff.

--
Best regards, Milan Milanovic


Antoine Toulme wrote:

> Milan Milanovic wrote:
>> Dear Antoine,
>>
>>>>> It all depends on what you need to extend. You can annotate the
>>>>> model with annotations, or change it.
>>>>
>>>> I need to introduce some new elements besides activites, like some
>>>> specific
>>>> activities.
>>> Some specific activities ? Can you be more specific ? Do you want to
>>> add some new type of ActivityType ?
>>
>> Yes, it would be some kind of new ActivityType.
> That would be ok then.
>>
>>> Also, I'll need to introduce whole vocabulary in the BPMN
>>>> diagram.
>>> I don't see what you mean here; if that's some kind of new EMF object,
>>> you have no choice but to regenerate.
>>
>> Well, I want to represent some kind of UML class diagrams in paralel
>> with BPMN concepts on the BPMN diagram. Of course, those UML class-like
>> elements will be conected with BPMN activites and events, and with some
>> new activites.

> ok, you need to go the heavy way, change the EMF model, and regenerate
> the code.
>>
>>>> So, I supose that it would be on the metamodel and graphical syntax,
>>>> too.
>>> Yes, it would mean that you would have to change the mnodel and gmfmap
>>> files.
>>> Is it
>>>> possible to be done ?
>>> We have marked all the stuff that we hand coded @generated not.
>>> So it should not be a problem to change the model files and regenerate
>>> the GMF code. Problem is, the GMF generator changed, and we did some
>>> heavy hacking. So I'm not sure you'll be fine with that.
>>
>> O.K. I'll see.
> Good luck!

> Antoine
>> --
>> Best regards, Milan Milanovic
>>
>> Antoine Toulme wrote:
>>
>>> Milan Milanovic wrote:
>>>> Hi Antoine,
>>>>
>>>> thank you very much on answer.
>>>>
>>>>> It all depends on what you need to extend. You can annotate the
>>>>> model with annotations, or change it.
>>>>
>>>> I need to introduce some new elements besides activites, like some
>>>> specific
>>>> activities.
>>> Some specific activities ? Can you be more specific ? Do you want to
>>> add some new type of ActivityType ?
>>> Also, I'll need to introduce whole vocabulary in the BPMN
>>>> diagram.
>>> I don't see what you mean here; if that's some kind of new EMF object,
>>> you have no choice but to regenerate.
>>>> So, I supose that it would be on the metamodel and graphical syntax,
>>>> too.
>>> Yes, it would mean that you would have to change the mnodel and gmfmap
>>> files.
>>> Is it
>>>> possible to be done ?
>>> We have marked all the stuff that we hand coded @generated not.
>>> So it should not be a problem to change the model files and regenerate
>>> the GMF code. Problem is, the GMF generator changed, and we did some
>>> heavy hacking. So I'm not sure you'll be fine with that.
>>>>
>>>>
>>>> --
>>>> Best regards, Milan Milanovic
>>>>
>>>> Antoine Toulme wrote:
>>>>
>>>>> Hey Milan,
>>>>
>>>>> nice to hear from you!
>>>>
>>>>> It all depends on what you need to extend. You can annotate the
>>>>> model with annotations, or change it.
>>>>
>>>>> On the editor level, you'll probably need to contribute a properties
>>>>> section to edit them.
>>>>
>>>>> Thanks,
>>>>
>>>>> Antoine
>>>>
>>>>> Milan Milanovic wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I need to extend STP BPMN editor with some concepts (with some SOA
>>>>>> and vocabulary concepts). I supose that I need to do this on the
>>>>>> metamodel and editor, too? Is it possible to do this with STP BPMN
>>>>>> editor ?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> --
>>>>>> Regards, Milan Milanovic
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>
Re: Extending STP BPMN [message #608550 is a reply to message #608547] Thu, 17 January 2008 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: atoulme.intalio.com

Milan Milanovic wrote:
> Dear Antoine,
>
> regarding generation of the BPMN editor, what do you think about
> building BPMN editor from scratch using GMF 2.0 ? Is it too complex ? I
> need just a simple BPMN editor, without executions and other stuff.

Milan, I didn't try with GMf 2.0. From what I can tell, you will need to
do some work to support activities through the ActivityType attribute,
work on the container layouts, establish connection rules, patch the
copy paste. You can borrow as much as you want from our code for sure.
I'm sure we would all learn something along the way.

There's no code to execute in the current BPMN modeler.

The sad truth is that when it comes to UI, you can improve it forever.

So it all depends on your level of expectations.

Hope this helps.

Antoine
>
> --
> Best regards, Milan Milanovic



--
Intalio, the Open Source BPMS Company

<a href="http://www.intalio.com">http://www.intalio.com</a>
<a href="http://bpms.intalio.com">Community website</a>
Re: Extending STP BPMN [message #610559 is a reply to message #608536] Mon, 21 January 2008 18:22 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 20
Registered: July 2009
Junior Member
Hello Antoine,

I would like to add elements to a BPMN diagram in the editor, similar to
what Milan tries to do.

I checked out the HEAD versions of org.eclipse.stp.bpmn,
org.eclipse.stp.bpmn.diagram, and org.eclipse.stp.bpmn.edit. I use
Eclipse 3.3.1.1 with EMF from the Europa Update Site and GMF version 1.0.3.

But the code regenerated from "bpmn.gmfgen" contains errors. Do I use
the wrong GMF version?

Regards,
Hans

Antoine Toulme wrote:
> Milan Milanovic wrote:
>> Dear Antoine,
>>
>>>>> It all depends on what you need to extend. You can annotate the
>>>>> model with annotations, or change it.
>>>>
>>>> I need to introduce some new elements besides activites, like some
>>>> specific
>>>> activities.
>>> Some specific activities ? Can you be more specific ? Do you want to
>>> add some new type of ActivityType ?
>>
>> Yes, it would be some kind of new ActivityType.
> That would be ok then.
>>
>>> Also, I'll need to introduce whole vocabulary in the BPMN
>>>> diagram.
>>> I don't see what you mean here; if that's some kind of new EMF
>>> object, you have no choice but to regenerate.
>>
>> Well, I want to represent some kind of UML class diagrams in paralel
>> with BPMN concepts on the BPMN diagram. Of course, those UML
>> class-like elements will be conected with BPMN activites and events,
>> and with some new activites.
>
> ok, you need to go the heavy way, change the EMF model, and regenerate
> the code.
>>
>>>> So, I supose that it would be on the metamodel and graphical syntax,
>>>> too.
>>> Yes, it would mean that you would have to change the mnodel and
>>> gmfmap files.
>>> Is it
>>>> possible to be done ?
>>> We have marked all the stuff that we hand coded @generated not.
>>> So it should not be a problem to change the model files and
>>> regenerate the GMF code. Problem is, the GMF generator changed, and
>>> we did some heavy hacking. So I'm not sure you'll be fine with that.
>>
>> O.K. I'll see.
> Good luck!
>
> Antoine
>> --
>> Best regards, Milan Milanovic
>>
>> Antoine Toulme wrote:
>>
>>> Milan Milanovic wrote:
>>>> Hi Antoine,
>>>>
>>>> thank you very much on answer.
>>>>
>>>>> It all depends on what you need to extend. You can annotate the
>>>>> model with annotations, or change it.
>>>>
>>>> I need to introduce some new elements besides activites, like some
>>>> specific
>>>> activities.
>>> Some specific activities ? Can you be more specific ? Do you want to
>>> add some new type of ActivityType ?
>>> Also, I'll need to introduce whole vocabulary in the BPMN
>>>> diagram.
>>> I don't see what you mean here; if that's some kind of new EMF
>>> object, you have no choice but to regenerate.
>>>> So, I supose that it would be on the metamodel and graphical syntax,
>>>> too.
>>> Yes, it would mean that you would have to change the mnodel and
>>> gmfmap files.
>>> Is it
>>>> possible to be done ?
>>> We have marked all the stuff that we hand coded @generated not.
>>> So it should not be a problem to change the model files and
>>> regenerate the GMF code. Problem is, the GMF generator changed, and
>>> we did some heavy hacking. So I'm not sure you'll be fine with that.
>>>>
>>>>
>>>> --
>>>> Best regards, Milan Milanovic
>>>>
>>>> Antoine Toulme wrote:
>>>>
>>>>> Hey Milan,
>>>>
>>>>> nice to hear from you!
>>>>
>>>>> It all depends on what you need to extend. You can annotate the
>>>>> model with annotations, or change it.
>>>>
>>>>> On the editor level, you'll probably need to contribute a
>>>>> properties section to edit them.
>>>>
>>>>> Thanks,
>>>>
>>>>> Antoine
>>>>
>>>>> Milan Milanovic wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I need to extend STP BPMN editor with some concepts (with some SOA
>>>>>> and vocabulary concepts). I supose that I need to do this on the
>>>>>> metamodel and editor, too? Is it possible to do this with STP BPMN
>>>>>> editor ?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> --
>>>>>> Regards, Milan Milanovic
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>
>>
>
>
Re: Extending STP BPMN [message #610572 is a reply to message #608498] Fri, 08 February 2008 12:34 Go to previous message
Roland Gude is currently offline Roland GudeFriend
Messages: 12
Registered: July 2009
Junior Member
Hi,

I have been trying to customize The BPMN modeler for my needs, too.
I have noticed that other try to do similar customizations. Therefor i
wanted to provide what i found out here.

One of the possibilities i tryed is not completely usable however, because
it
requires that extensions have Ids. This is not the case for the extensions
of org.eclipse.stp.bpmn.diagram plugin. It would be nice if some Ids would
be added.

Customization steps:
1) write a new Plugin

2) customizing the palette
possibility a) Create a new Extension in your plugin.xml,
which defines a new Editor. Use the BpmnDiagramEditor
as the class (exactly like the original editor
extension) but use a different ID (like
my.customized.Editor)

Overwrite BpmnPaletteFactory and BpmnPaletteProvider.
In BpmnPaletteProvider simply overwrite the
contributeToPalette Method and let it use your newly
created PaletteFactory.

public class MyPaletteProvider extends BpmnPaletteProvider implements 
IPaletteProvider {

    
    public void contributeToPalette(IEditorPart editor, Object content,
            PaletteRoot root, Map predefinedEntries) {
        BpmnPaletteFactory factory = new MyPaletteFactory();
        factory.fillPalette(root);
    }
    
}


public class WFPaletteFactory extends BpmnPaletteFactory {

    
    public void fillPalette(PaletteRoot paletteRoot) {
        PaletteEntry pe = null;
        for (Object paletteEntry : paletteRoot.getChildren()) {
            pe = (PaletteEntry)paletteEntry;
            if (pe.getId().equals(PaletteService.GROUP_STANDARD)) {
                break;
            }
            pe = null;
        }
        if (pe != null) {
            setupStandardPaletteEntries(pe);
        }
        
        /*
         * 
         * Add your contributions
         * 
         */

        ToolEntry toolEntry = paletteRoot.getDefaultEntry();
        SelectionToolEx.setToolClass(toolEntry, SelectionToolEx.class);
    }
    
}


This second codeblock could be simplified if
BpmnPalettefactory would use a method addItems() in its
fillPalette() method. his would reduce code duplication.

After you have created thos classes, add another
extension
to your plugin.xml:
[code]
<extension
point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders" >
<paletteProvider
class="my.package.MyPaletteProvider">
<Priority
name="Highest">
</Priority>
<editor
id="my.ID">
</editor>
</paletteProvider>
</extension>
[code]

where my.ID is the Id you previously used for your new
editor.



possibility b)
This Possibility is a little easier in principle, but not
fully possible with the current BpmnModeler, because The
extensions in bpmn.diagram plugin have no Ids. This
could
however be fixed without much effort (they should have
ids
anyways)

supress the extensions which provide to the palette by
associating them with a disabled activity.

to do that, put this in your plugin.xml

   <extension
         point="org.eclipse.ui.activities">
      <activity
            id="A.Never.Used.Id"
            name="Hidden activities"/>
      <activityPatternBinding
            activityId="A.Never.Used.Id"
            pattern="org.eclipse.stp.bpmn.diagram/.*"/>
   </extension>

notice that this exact line will disable all extensions
in
bpmn.diagram plugin (due to the .* pattern).

If the extensions would have an Id, you could substitute
the
.* with the Id of the provider you want to disable.

2) Customizing the ModelingAssistant:
supress the modellingAssistant from bpmn.diagram like shown in 1b

write your own modelingAssistant.

create an extension in your plugin.xml
   <extension
         point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders">
      <modelingAssistantProvider
            
class="de.dlr.rcenvironment.workflow.WFModelingAssistantProvider">
         <Priority
               name="lowest">
         </Priority>
         <editor id="my.Id">
		 </editor>
      </modelingAssistantProvider>
   </extension>


where my.Id is the Id of Editor you chose in 1a) or if you did not
create
your own editor but still use the original BpmnEditor:
"org.eclipse.stp.bpmn.diagram.part.BpmnDiagramEditorID"


I hope this helps.

And one question for the Bpmn Developers:
could you give Ids to your extensions, so that it would be possible to
disable
providers which do add to many items?

kind regards,
Roland Gude
Previous Topic:What do these errors mean?
Next Topic:BPMN editor display
Goto Forum:
  


Current Time: Thu Mar 28 09:50:49 GMT 2024

Powered by FUDForum. Page generated in 0.04446 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top