Customize "New Diagram" command [message #698754] |
Wed, 20 July 2011 03:30  |
Eclipse User |
|
|
|
Hi all,
I started to dig a bit deeper into the alomst unlimited possibilities of
customizing papyrus. Now, I was wondering whether it would be somehow easily
possible to adapt the "New Diagram" command slightly in a way that a
stereotype will be automatically applied when the diagram was created.
In my case, I'd like to create activity diagrams with an stereotype <<XYZ>>
applied to the activity acting as the canvas for the newly created diagram.
The entry in the context menu would have to look like "Create new XYZ
diagram", the result will simply the stereotyped activity.
I had a look at the extension point org.eclipse.papyrus.core.diagram (or
similar) but this seems to be very overwhelming - actually, I do not want to
create or register a new diagram but rather reuse the command for the
activity diagram instead.
I'm gratefull for any help on this topic.
Timothy
|
|
|
Re: Customize "New Diagram" command [message #699366 is a reply to message #698754] |
Thu, 21 July 2011 08:26   |
Eclipse User |
|
|
|
Hi,
All diagram have a CreateXxxDiagramCommand class, where Xxx is the
name of the diagram (ex: CreateActivityDiagramCommand)) located in the
custom-src/org.eclipse.papyrus.diagram.xxx folder.
You can extend this Class, override the appropriate method (check the
hierarchy) in order to add your stereotype, and then register the
Commandas a toolbar button (by using org.eclipse.ui.menu|command|handler
extensions. Check the plugins.xml of the diagram for an example).
Hope this help,
Cedric
Timothy Marc a écrit :
> Hi all,
>
> I started to dig a bit deeper into the alomst unlimited possibilities of
> customizing papyrus. Now, I was wondering whether it would be somehow
> easily possible to adapt the "New Diagram" command slightly in a way
> that a stereotype will be automatically applied when the diagram was
> created.
>
> In my case, I'd like to create activity diagrams with an stereotype
> <<XYZ>> applied to the activity acting as the canvas for the newly
> created diagram. The entry in the context menu would have to look like
> "Create new XYZ diagram", the result will simply the stereotyped activity.
>
> I had a look at the extension point org.eclipse.papyrus.core.diagram (or
> similar) but this seems to be very overwhelming - actually, I do not
> want to create or register a new diagram but rather reuse the command
> for the activity diagram instead.
>
> I'm gratefull for any help on this topic.
>
> Timothy
|
|
|
crating an eclipse plugin for sysml diagrams [message #1008355 is a reply to message #699366] |
Tue, 12 February 2013 02:24  |
Eclipse User |
|
|
|
hello,
I am developing an eclipse plugin for the railway domain which has sysml model for signalling framework.I have the SysML model developed by my fellow friend.
I know how to draw all those diagrams using UML profile b.y papyrus tool.
My SysML diagrams should be editable once i develop my own eclipse plugin.
This will be use full to designers in the railway domain. I am right now using Eclipse JUNO in what way i can do this i dont know,
can i draw the Class diagrams in papyrus and import them to the new eclipse plugin and make them editable? is it possible?
please guide me if i am going in the wrong direction
|
|
|
Powered by
FUDForum. Page generated in 0.03762 seconds