Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Custom Task and Append button
Custom Task and Append button [message #1310797] Wed, 23 April 2014 08:01 Go to next message
Damien Dussol is currently offline Damien Dussol
Messages: 4
Registered: February 2014
Junior Member
Hi,

I have created a custom task to define a "None End Event". My class extends CustomShapeFeatureContainer and I override getCreateFeature.

    @Override
    public ICreateFeature getCreateFeature(final IFeatureProvider fp1)
    {
        return new CreateCustomShapeFeature(fp1)
        {
            @Override
            public String getCreateDescription()
            {
                return "Create a None End Event";
            }          
            
        };
    }


My problem is : when the cursor is on the Custom task , I can see "Append Event", "Append Gateway","Append Activity" buttons. My custom Task define an end event, so I don't need these buttons. How can I remove these buttons ?

Thanks for your help.

Regards,

Damien
Re: Custom Task and Append button [message #1310873 is a reply to message #1310797] Wed, 23 April 2014 09:00 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Damien,

You need to override getCustomFeatures(IFeatureProvider) in your CustomShapeFeatureContainer and either call the superclass and cull out the Features you don't want, or simply return an empty array.

HTH,
Bob
Re: Custom Task and Append button [message #1311037 is a reply to message #1310873] Wed, 23 April 2014 11:03 Go to previous messageGo to next message
Damien Dussol is currently offline Damien Dussol
Messages: 4
Registered: February 2014
Junior Member
Hi Bob

I did it but it doesn't work.

    @Override
    public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) 
    {
        ICustomFeature[] customFeature= new ICustomFeature[0];
        return customFeature;
    }


I have several Custom task (several defines end event none, others defines start event none).
I see it is BPMNFeatureProvider class which call getCustomFeatures for each custom task. If i have several Custom task, BPMNFeatureProvider .getCustomFeatures will return all custom features for all custom task, i am wrong ?

Regards

Damien
Re: Custom Task and Append button [message #1311581 is a reply to message #1311037] Wed, 23 April 2014 18:07 Go to previous message
Robert Brodt is currently offline Robert Brodt
Messages: 577
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Yes, you are absolutely correct - this is a BUG!
Please file a bug report and I'll fix this ASAP.

Thanks!
Bob
Previous Topic:Support of XMI or other formats in Import
Next Topic:Generate an image from BPMN file using a java program.
Goto Forum:
  


Current Time: Thu Jul 24 06:52:17 EDT 2014

Powered by FUDForum. Page generated in 0.02612 seconds