|Re: Customize "New Diagram" command [message #699366 is a reply to message #698754]
||Thu, 21 July 2011 12:26
| Cedric Dumoulin
Registered: July 2009
All diagram have a CreateXxxDiagramCommand class, where Xxx is the
name of the diagram (ex: CreateActivityDiagramCommand)) located in the
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,
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
> 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.
Powered by FUDForum
. Page generated in 0.03211 seconds