Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Problems to Clone existing diagram
Problems to Clone existing diagram [message #636933] Wed, 03 November 2010 12:10 Go to next message
Andres  is currently offline Andres Friend
Messages: 57
Registered: July 2010
Member
In a last post, I asked about to change the editor id of the composite.diagram,
because i want to do a new editor for a new diagram type(a profile uml with his own palette).

For do this, i want to "clone" the composite diagram(renaming the diagram plugin , packages, some attributes in some classes, and changing the editorId) to add a new default custom palette.

I changed the id and the name of packages in the composite.gmfgen, i renamed the source package of oep.diagram.compoiste, and then i regenerated the code from gmfgen.

It works fine, and i could change the diagram id too,but when i launch the plugin and execute the new editor, i can select an element from palette, but i can`t add this to the canvas.

Any suggestion?

thanks Andres

[Updated on: Wed, 03 November 2010 12:13]

Report message to a moderator

Re: Problems to Clone existing diagram [message #637105 is a reply to message #636933] Thu, 04 November 2010 08:47 Go to previous messageGo to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 142
Registered: July 2009
Senior Member
I will discuss with collegue that done this kind of work as soon as I back to office.

Patrick

Re: Problems to Clone existing diagram [message #637805 is a reply to message #637105] Mon, 08 November 2010 23:10 Go to previous messageGo to next message
Andres  is currently offline Andres Friend
Messages: 57
Registered: July 2010
Member
after changing the id when i throw an element in the canvas, the editor throw the following exception,


java.lang.NullPointerException
at org.eclipse.papyrus.diagram.composite.edit.policies.UMLBaseI temSemanticEditPolicy.getEditHelperCommand(UMLBaseItemSemant icEditPolicy.java:186)
at org.eclipse.papyrus.diagram.composite.edit.policies.UMLBaseI temSemanticEditPolicy.getSemanticCommand(UMLBaseItemSemantic EditPolicy.java:160)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEdit Policy.getCommand(SemanticEditPolicy.java:69)
at org.eclipse.papyrus.diagram.composite.edit.policies.UMLBaseI temSemanticEditPolicy.getCommand(UMLBaseItemSemanticEditPoli cy.java:139)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(Abstra ctEditPart.java:501)


Please, i really need to clone the diagram.. and i really i dont know what to do...




Re: Problems to Clone existing diagram [message #638456 is a reply to message #637805] Thu, 11 November 2010 11:16 Go to previous messageGo to next message
Andres  is currently offline Andres Friend
Messages: 57
Registered: July 2010
Member
I can resolve the problem.
For do this I change all references(the reference to the custom-src and image file i dont change) to CompositeStructure(MODELID), and composite(name plugin) for my own in the plugin.xml, plugin.properties, gmfgen(i change the extension file too in this file), message.java in custom-src, and then i regenerate papyrus code from the gmfgen.
Re: Problems to Clone existing diagram [message #639435 is a reply to message #638456] Tue, 16 November 2010 14:32 Go to previous message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 134
Registered: July 2009
Senior Member
Thanks to post the answer to your own problem, this will perhaps help other users. Hope everything works for you now!

Regards,
RĂ©mi


Previous Topic:How to edit parameters for class operations in class diagram?
Next Topic:Modify element appearance at runtime
Goto Forum:
  


Current Time: Fri Nov 21 04:29:01 GMT 2014

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

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