Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Re: UML element already stereotyped in the palette to drag and drop onto the editor
Re: UML element already stereotyped in the palette to drag and drop onto the editor [message #486398] Thu, 17 September 2009 13:44 Go to next message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
... forwarding to UML2Tools newsgroup.

"Ferdinando Mazzariello" <mavieni_nando@yahoo.it> wrote in message
news:fee622a0cc0e731d9c2b51f9ad761f13$1@www.eclipse.org...
> Hi All,
>
> I'm working on a project that will extend UML2Tools. I need help for:
>
> a) use existing uml2tools functionality (primarily the class and component
> diagram at the moment)
>
> b) extend uml2tools functionality to add elements described using
> stereotypes (for instance a class element already stereotyped with a
> custom stereotype). these components will be added to the palette so that
> the they can be dragged and dropped onto the editor.
>
> c) not alter uml2tools code so that future versions of uml2tools can be
> used without affecting the extension and not requiring recoding of the
> extension.
>
> This should obviously take place in a new plugin. I've looked at the
> examples in the help files (like helloworld etc) but have not worked out
> how to extend plugins like uml2tools.
>
> Please could someone describe how I should set up a plugin to do all this?
>
> thanks in advance,
>
> regards,
>
> Nando
>
Re: UML element already stereotyped in the palette to drag and drop onto the editor [message #487783 is a reply to message #486398] Thu, 24 September 2009 12:25 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 61
Registered: July 2009
Member
Hello Nando,

So, you want to preserve code and functionality of the UML2 Tools plugins and add new functionality above it.
Here is a possible solution:

1) Create usual Eclipse Plugin
2) In your custom plugin add dependencies to UML2 Tools plugin(s)
3) Extend existing functionality using eclipse mechanizm of extension points, For example, extension point="org.eclipse.ui.popupMenus" is used to add new actions to popup menu, extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders" is used to configure palette and so on. Other example of extension points and their usage can be found in plugin.xml files of UML2 Tools plugins and Eclipse documentation.

Best wishes,
Tanya.

Re: UML element already stereotyped in the palette to drag and drop onto the editor [message #489113 is a reply to message #487783] Thu, 01 October 2009 14:28 Go to previous message
Ferdinando Mazzariello is currently offline Ferdinando Mazzariello
Messages: 8
Registered: October 2009
Junior Member
Hi Tatiana,

first of all thanks for your reply!
I'm already trying to use the extension points but i don't obtain what i need... for example imagine a Datatype element onto the palette; i need to add onto the palette another Datatype element (keeping the original one), but already stereotyped (e.g. a stereotype called "order"). So it means that when i drag and drop that element into the diagram, it has already to appear the datatype element with the relative stereotype applied (in this case "order") . In the palette there must be several datatype custom elements. I need to add also several attribute elements onto the palette (everyone with a different stereotype), and so on...
I have to add also several custom component elements (from the component diagram but with different stereotypes).... In few words every element has to merge in one diagram.
I don't know if it's possible using simply the extension points just because the uml2tool is again in incubation period and i'd like to avoid to modifiy some parts of code that probably in the next future will change.... I should also modify the icons for my custom elements....
You said the once but not to me, that a good solution could be to modify the *.gmftool file concerning the palette and the *.gmfmap about the mapping and about the adding of stereotypes, to modify the relative command classes (for insntance CommentCreateCommand)... Would it be a good way?

Thank you so much in advance

Best wishes
Nando
Re: UML element already stereotyped in the palette to drag and drop onto the editor [message #624875 is a reply to message #486398] Thu, 24 September 2009 12:25 Go to previous message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 61
Registered: July 2009
Member
Hello Nando,

So, you want to preserve code and functionality of the UML2 Tools plugins and add new functionality above it.
Here is a possible solution:

1) Create usual Eclipse Plugin
2) In your custom plugin add dependencies to UML2 Tools plugin(s)
3) Extend existing functionality using eclipse mechanizm of extension points, For example, extension point="org.eclipse.ui.popupMenus" is used to add new actions to popup menu, extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders" is used to configure palette and so on. Other example of extension points and their usage can be found in plugin.xml files of UML2 Tools plugins and Eclipse documentation.

Best wishes,
Tanya.
Re: UML element already stereotyped in the palette to drag and drop onto the editor [message #624888 is a reply to message #624875] Thu, 01 October 2009 14:28 Go to previous message
Ferdinando Mazzariello is currently offline Ferdinando Mazzariello
Messages: 8
Registered: October 2009
Junior Member
Hi Tatiana,

first of all thanks for your reply!
I'm already trying to use the extension points but i don't obtain what i need... for example imagine a Datatype element onto the palette; i need to add onto the palette another Datatype element (keeping the original one), but already stereotyped (e.g. a stereotype called "order"). So it means that when i drag and drop that element into the diagram, it has already to appear the datatype element with the relative stereotype applied (in this case "order") . In the palette there must be several datatype custom elements. I need to add also several attribute elements onto the palette (everyone with a different stereotype), and so on...
I have to add also several custom component elements (from the component diagram but with different stereotypes).... In few words every element has to merge in one diagram.
I don't know if it's possible using simply the extension points just because the uml2tool is again in incubation period and i'd like to avoid to modifiy some parts of code that probably in the next future will change.... I should also modify the icons for my custom elements....
You said the once but not to me, that a good solution could be to modify the *.gmftool file concerning the palette and the *.gmfmap about the mapping and about the adding of stereotypes, to modify the relative command classes (for insntance CommentCreateCommand)... Would it be a good way?

Thank you so much in advance

Best wishes
Nando
Previous Topic:Generalization Set in the profile level
Next Topic:Integrating UML2 Tools and RCP application
Goto Forum:
  


Current Time: Fri Oct 24 16:29:35 GMT 2014

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

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