Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to add a custom EditPart to Sequence Diagram(How to add a custom EditPart to Sequence Diagram)
How to add a custom EditPart to Sequence Diagram [message #1698299] Sat, 13 June 2015 01:41 Go to next message
MyungWoon Oh is currently offline MyungWoon OhFriend
Messages: 52
Registered: March 2012
Member
Hi.

I'm improving Sequence Diagram.

I want to add a custom EditPart.

For example, there are CombinedFragmentEditPart.java which is automatically generated EditPart and CustomCombinedFragmentEditPart.java which is manually written custom EditPart In o.e.papyrus.uml.diagram.sequence plug-in. And both EditParts works well in the Papyrus Platform.

It's easy to write a custom EditPart.java but I don't know how to add my custom EditPart to Papyrus platform so that I can install my custom EditPolicy and eventually add some new features by overriding get*****Command().

Please help me out.
Re: How to add a custom EditPart to Sequence Diagram [message #1698551 is a reply to message #1698299] Tue, 16 June 2015 11:30 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

EditParts mainly drive the graphical behavior and interactions. EditPolicies can be installed separately, via the GMF EditPolicy Provider extension point. Semantic commands and advices should be provided via the Edit Service of Papyrus, using the ElementTypesConfiguration extension point (In Mars), or ExtendedTypes (Similar mechanism In Luna)

New EditParts are required only if you want to manipulate elements that don't exist in Sequence Diagram yet, but this doesn't seem to be your use case

HTH,
Camille


Camille Letavernier
Re: How to add a custom EditPart to Sequence Diagram [message #1698900 is a reply to message #1698551] Thu, 18 June 2015 15:14 Go to previous messageGo to next message
MyungWoon Oh is currently offline MyungWoon OhFriend
Messages: 52
Registered: March 2012
Member
Thank you for the reply.

What I want is not a new, weird EditPart which is not included in the sequence diagram, but a 'customized' EditPart like 'CustomCombinedFragmentEditPart'.

More specifically, what I want to know is how 'CustomCombindedFragmentEditPart' is added or registered to Papyrus Service, which already has 'CombinedFragmentEditPart'.

For example, if someone asked me how to add CustomEditPolicy to Papyrus, I would say that a CustomEditPolicy can be added via ###EditPart.createDefaultPolicies() method.
Then, what about CustomEditPart? How can I add my CustomExecutionSpecificationEditPart to Papyrus?

The reason I want to add CustomEditPart rather than to add CustomEditPolicy is because I want to find a way to add custom features with minimized Papyrus source modification

I just working on the Papyrus sources because I couldn't find references on GMF EditPolicy Provider extension point or ElementTypesConfiguration extension point (In Mars), or ExtendedTypes (Similar mechanism In Luna).
Could you recommend some resources on those subjets?
Re: How to add a custom EditPart to Sequence Diagram [message #1698902 is a reply to message #1698900] Thu, 18 June 2015 15:20 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

Have a look at:

- GMF editpartProviders extension point
- org.eclipse.papyrus.uml.diagram.clazz.custom.providers.CustomUMLEditPartProvider
- org.eclipse.papyrus.uml.diagram.clazz.custom.factory.CustomUMLEditPartFactory

(Or the equivalent in the Sequence Diagram)

HTH,
Camille


Camille Letavernier
Re: How to add a custom EditPart to Sequence Diagram [message #1699137 is a reply to message #1698902] Mon, 22 June 2015 01:13 Go to previous message
MyungWoon Oh is currently offline MyungWoon OhFriend
Messages: 52
Registered: March 2012
Member
Thank you so much.

I found it here,

org.eclipse.papyrus.uml.diagram.sequence.providers.CustomEditPartProvider

Eventually, I cannot 'add' a customized EditPart. But I can 'extend' it by extending Custom###EditPart.

Thank you again ^^.
Previous Topic:Hide weight and guard through CSS
Next Topic:Unable to work on Papyrus CDO from two instances of Eclipse
Goto Forum:
  


Current Time: Fri Apr 26 05:16:04 GMT 2024

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

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

Back to the top