Home » Modeling » UML2 Tools » Profile Stereotypes in the Editor Palette
Profile Stereotypes in the Editor Palette [message #470877] |
Mon, 28 May 2007 09:41 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
Hi, i'm using UML2Tools M7... I was wondering if I could edit the Editor
Palette to place some metaclasses stereotyped. I mean, when I use profile
I hace to create the respective metaclass an then stereotype this. I wish
to use the class stereotyped with my profile directly form the palette. Is
it possible?
thanks a lot,
octavio
|
|
| |
Re: Profile Stereotypes in the Editor Palette [message #471118 is a reply to message #470882] |
Thu, 07 June 2007 15:42 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
Hi Tatiana,
I used the GMF dashboard and a UML metamodel (ecore version) to generate a
new editor. Then i duplicate the metaclases needed in order to apply
stereotypes in the doDefaultElementCreation() method. But is not possible
to apply elegantly a stereotype at this level cause we are not dealing
with real uml elements.
With the experience that now I got I tried to reedit the UML2 class editor
of the uml tools plugin... But I have no luck, I extend the palette but is
impossible to link this new elements with the new create comand files (in
order to stereotype them). So my question is if there is a formal way to
extend the palette with new elements, of course, in order to stereotype
them in a future doDefaultElementCreation method.
thanks a lot,
octavio
Eclipse NewsPortal
Re: Profile Stereotypes in the Editor Palette
Answereclipse.modeling.mdt.uml2toolsNewsgroups
Subject: Re: Profile Stereotypes in the Editor Palette
From: tatiana.fesenko@xxxxxxxxxxxx (Tatiana Fesenko)
Newsgroups: eclipse.modeling.mdt.uml2tools
Organization: Borland
Date: May 28 2007 06:34:50
Hi octavio glorio!
Nothing is impossible with GMF =)
Step 1. Create new palette entry.
Add new palette entry to *.gmftool file. Then map this tool with metaclass
in *.gmfmap file. Regenerate diagram. UMLPaletteFactory will be modified
to
sutisfy your conditions.
Step 2. Apply stereotype.
Modify doDefaultElementCreation() method in the appropriate
$$CreateCommand.
You will have to add such a code:
newElement.applyStereotype(stereotype);
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #471120 is a reply to message #471118] |
Fri, 08 June 2007 12:06 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hi Octavio!
As I understand you have the following situation:
You have some model written in UML (*.profile.uml file), there are some
stereotypes in it. You have Uml2Tools functionality. And you want to extend
this UML2Tools. You want it to have some additional palette entries, these
palette entries should create stereotyped elements.
Is it right?
If so, it is possible, but it is not very simple. It deserves separate
article.
Anyway, can you give us more information.
Best wishes,
Tatiana.
"octavio glroio" <cokoso@gmail.com> wrote in message
news:caadfd5f7c31f76854165f3956f069fc$1@www.eclipse.org...
> Hi Tatiana,
> I used the GMF dashboard and a UML metamodel (ecore version) to generate a
> new editor. Then i duplicate the metaclases needed in order to apply
> stereotypes in the doDefaultElementCreation() method. But is not possible
> to apply elegantly a stereotype at this level cause we are not dealing
> with real uml elements. With the experience that now I got I tried to
> reedit the UML2 class editor of the uml tools plugin... But I have no
> luck, I extend the palette but is impossible to link this new elements
> with the new create comand files (in order to stereotype them). So my
> question is if there is a formal way to extend the palette with new
> elements, of course, in order to stereotype them in a future
> doDefaultElementCreation method.
> thanks a lot,
> octavio
>
>
> Eclipse NewsPortal
> Re: Profile Stereotypes in the Editor Palette
> Answereclipse.modeling.mdt.uml2toolsNewsgroups
> Subject: Re: Profile Stereotypes in the Editor Palette
> From: tatiana.fesenko@xxxxxxxxxxxx (Tatiana Fesenko)
> Newsgroups: eclipse.modeling.mdt.uml2tools
> Organization: Borland
> Date: May 28 2007 06:34:50
>
> Hi octavio glorio!
>
> Nothing is impossible with GMF =)
>
> Step 1. Create new palette entry.
> Add new palette entry to *.gmftool file. Then map this tool with metaclass
> in *.gmfmap file. Regenerate diagram. UMLPaletteFactory will be modified
> to sutisfy your conditions.
>
> Step 2. Apply stereotype.
> Modify doDefaultElementCreation() method in the appropriate
> $$CreateCommand. You will have to add such a code:
> newElement.applyStereotype(stereotype);
>
>
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #471176 is a reply to message #471120] |
Tue, 19 June 2007 13:03 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
Hi Tatiana,
I have a very good aproach now. I was able to create a palette with the
metaclases needed, I add a parameter to de NodeToolEntry to save the
corresponding stereotype and used it in the doDefaultElementCreation.
For the uploasd of the profile and the application I edit the
createDiagram method.
My actual problem is when I stereotype a package I don't see the << >>
quotes. For example when I stereotype a class I get in the upper zone of
the icone <<My Stereotype>>. Is possible to use this notation for the
metaclasses that I use? (class,package,property,associationclass,
association).
Thank you very much for your help, we are in contact.
Octavio
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #471179 is a reply to message #471176] |
Tue, 19 June 2007 13:37 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hi Octavio,
Congratulations!
Unfortunately, stereotyped element notation is supported only for classes
yet. Packages, Enumeration etc decoration is a part of #171261 [ClassD]
Support appiled stereotypes notation, which is open now. We hope to fix it
in the release. Sorry for inconviniences.
Best wishes,
Tatiana.
"octavio glorio" <cokoso@gmail.com> wrote in message
news:ea3cedfe088b669643ce2fb6dd08da2f$1@www.eclipse.org...
> Hi Tatiana,
> I have a very good aproach now. I was able to create a palette with the
> metaclases needed, I add a parameter to de NodeToolEntry to save the
> corresponding stereotype and used it in the doDefaultElementCreation.
> For the uploasd of the profile and the application I edit the
> createDiagram method.
> My actual problem is when I stereotype a package I don't see the << >>
> quotes. For example when I stereotype a class I get in the upper zone of
> the icone <<My Stereotype>>. Is possible to use this notation for the
> metaclasses that I use? (class,package,property,associationclass,
> association).
> Thank you very much for your help, we are in contact.
> Octavio
>
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #471219 is a reply to message #471179] |
Wed, 04 July 2007 13:24 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi,
I also want to add stereotypes that extend referenced metaclasses to the
palette. Is this possible using the existing (component) editor of
uml2tools or is it necessary to define a new editor in gmf?
I don't understand exactly how Octavio solved this problem.
regards,
nick
|
|
| |
Re: Profile Stereotypes in the Editor Palette [message #471326 is a reply to message #471250] |
Thu, 19 July 2007 12:59 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
For palette extension using stereotypes from a profile do the following:
Load profile resource and apply profile in the initDiagram method at the
plugin start.
Edit the NodeToolEntry in the palette factory, add a parameter to save the
streotype needed to apply.
Now you add some extra tools in the fillpalette method, simply your copy
the code of the metaclasses that you need and set the parameter
"stereoype" with the streotype that you want.
Then intercept in the createdcommand the real creation of the element and
streotpe it using the parameter that you add to the node entry.
sorry for the late answer, let me know if you have problems
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #471327 is a reply to message #471326] |
Thu, 19 July 2007 14:04 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
I extend the umltools palette and add my node entries with my streotypes.
Now I was trying to export this new org.eclipse.uml2.diagram.clazz plugin
and used it at the same time the original plugin.
I export with another id, change some names and I get the following
problem... when my plugin was starting it couldn't create the umltypes
because they were create by the org.eclipse.uml2.diagram.clazz plugin
first . I decide to create new umltypes but now I get this last
problem.... I couldn't throw my streotyped elements from the palette
because the "not allow icon pointer" appeared in the diagram panel and any
new element is allow.
I think that maybe I have to edit the constraints that allow, or not, to
put an element in the diagram but I can't find this constraints!
Maybe the question is silly but I have spended some days with this
problem, je.
thanks again.
|
|
| | | | |
Re: Profile Stereotypes in the Editor Palette [message #597594 is a reply to message #470882] |
Thu, 07 June 2007 15:42 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
Hi Tatiana,
I used the GMF dashboard and a UML metamodel (ecore version) to generate a
new editor. Then i duplicate the metaclases needed in order to apply
stereotypes in the doDefaultElementCreation() method. But is not possible
to apply elegantly a stereotype at this level cause we are not dealing
with real uml elements.
With the experience that now I got I tried to reedit the UML2 class editor
of the uml tools plugin... But I have no luck, I extend the palette but is
impossible to link this new elements with the new create comand files (in
order to stereotype them). So my question is if there is a formal way to
extend the palette with new elements, of course, in order to stereotype
them in a future doDefaultElementCreation method.
thanks a lot,
octavio
Eclipse NewsPortal
Re: Profile Stereotypes in the Editor Palette
Answereclipse.modeling.mdt.uml2toolsNewsgroups
Subject: Re: Profile Stereotypes in the Editor Palette
From: tatiana.fesenko@xxxxxxxxxxxx (Tatiana Fesenko)
Newsgroups: eclipse.modeling.mdt.uml2tools
Organization: Borland
Date: May 28 2007 06:34:50
Hi octavio glorio!
Nothing is impossible with GMF =)
Step 1. Create new palette entry.
Add new palette entry to *.gmftool file. Then map this tool with metaclass
in *.gmfmap file. Regenerate diagram. UMLPaletteFactory will be modified
to
sutisfy your conditions.
Step 2. Apply stereotype.
Modify doDefaultElementCreation() method in the appropriate
$$CreateCommand.
You will have to add such a code:
newElement.applyStereotype(stereotype);
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #597599 is a reply to message #471118] |
Fri, 08 June 2007 12:06 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hi Octavio!
As I understand you have the following situation:
You have some model written in UML (*.profile.uml file), there are some
stereotypes in it. You have Uml2Tools functionality. And you want to extend
this UML2Tools. You want it to have some additional palette entries, these
palette entries should create stereotyped elements.
Is it right?
If so, it is possible, but it is not very simple. It deserves separate
article.
Anyway, can you give us more information.
Best wishes,
Tatiana.
"octavio glroio" <cokoso@gmail.com> wrote in message
news:caadfd5f7c31f76854165f3956f069fc$1@www.eclipse.org...
> Hi Tatiana,
> I used the GMF dashboard and a UML metamodel (ecore version) to generate a
> new editor. Then i duplicate the metaclases needed in order to apply
> stereotypes in the doDefaultElementCreation() method. But is not possible
> to apply elegantly a stereotype at this level cause we are not dealing
> with real uml elements. With the experience that now I got I tried to
> reedit the UML2 class editor of the uml tools plugin... But I have no
> luck, I extend the palette but is impossible to link this new elements
> with the new create comand files (in order to stereotype them). So my
> question is if there is a formal way to extend the palette with new
> elements, of course, in order to stereotype them in a future
> doDefaultElementCreation method.
> thanks a lot,
> octavio
>
>
> Eclipse NewsPortal
> Re: Profile Stereotypes in the Editor Palette
> Answereclipse.modeling.mdt.uml2toolsNewsgroups
> Subject: Re: Profile Stereotypes in the Editor Palette
> From: tatiana.fesenko@xxxxxxxxxxxx (Tatiana Fesenko)
> Newsgroups: eclipse.modeling.mdt.uml2tools
> Organization: Borland
> Date: May 28 2007 06:34:50
>
> Hi octavio glorio!
>
> Nothing is impossible with GMF =)
>
> Step 1. Create new palette entry.
> Add new palette entry to *.gmftool file. Then map this tool with metaclass
> in *.gmfmap file. Regenerate diagram. UMLPaletteFactory will be modified
> to sutisfy your conditions.
>
> Step 2. Apply stereotype.
> Modify doDefaultElementCreation() method in the appropriate
> $$CreateCommand. You will have to add such a code:
> newElement.applyStereotype(stereotype);
>
>
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #600416 is a reply to message #471120] |
Tue, 19 June 2007 13:03 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
Hi Tatiana,
I have a very good aproach now. I was able to create a palette with the
metaclases needed, I add a parameter to de NodeToolEntry to save the
corresponding stereotype and used it in the doDefaultElementCreation.
For the uploasd of the profile and the application I edit the
createDiagram method.
My actual problem is when I stereotype a package I don't see the << >>
quotes. For example when I stereotype a class I get in the upper zone of
the icone <<My Stereotype>>. Is possible to use this notation for the
metaclasses that I use? (class,package,property,associationclass,
association).
Thank you very much for your help, we are in contact.
Octavio
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #600428 is a reply to message #471176] |
Tue, 19 June 2007 13:37 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hi Octavio,
Congratulations!
Unfortunately, stereotyped element notation is supported only for classes
yet. Packages, Enumeration etc decoration is a part of #171261 [ClassD]
Support appiled stereotypes notation, which is open now. We hope to fix it
in the release. Sorry for inconviniences.
Best wishes,
Tatiana.
"octavio glorio" <cokoso@gmail.com> wrote in message
news:ea3cedfe088b669643ce2fb6dd08da2f$1@www.eclipse.org...
> Hi Tatiana,
> I have a very good aproach now. I was able to create a palette with the
> metaclases needed, I add a parameter to de NodeToolEntry to save the
> corresponding stereotype and used it in the doDefaultElementCreation.
> For the uploasd of the profile and the application I edit the
> createDiagram method.
> My actual problem is when I stereotype a package I don't see the << >>
> quotes. For example when I stereotype a class I get in the upper zone of
> the icone <<My Stereotype>>. Is possible to use this notation for the
> metaclasses that I use? (class,package,property,associationclass,
> association).
> Thank you very much for your help, we are in contact.
> Octavio
>
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #602136 is a reply to message #471179] |
Wed, 04 July 2007 13:24 |
Eclipse User |
|
|
|
Originally posted by: nickkirtley.gmail.com
Hi,
I also want to add stereotypes that extend referenced metaclasses to the
palette. Is this possible using the existing (component) editor of
uml2tools or is it necessary to define a new editor in gmf?
I don't understand exactly how Octavio solved this problem.
regards,
nick
|
|
| |
Re: Profile Stereotypes in the Editor Palette [message #606439 is a reply to message #471250] |
Thu, 19 July 2007 12:59 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
For palette extension using stereotypes from a profile do the following:
Load profile resource and apply profile in the initDiagram method at the
plugin start.
Edit the NodeToolEntry in the palette factory, add a parameter to save the
streotype needed to apply.
Now you add some extra tools in the fillpalette method, simply your copy
the code of the metaclasses that you need and set the parameter
"stereoype" with the streotype that you want.
Then intercept in the createdcommand the real creation of the element and
streotpe it using the parameter that you add to the node entry.
sorry for the late answer, let me know if you have problems
|
|
|
Re: Profile Stereotypes in the Editor Palette [message #607457 is a reply to message #471326] |
Thu, 19 July 2007 14:04 |
Eclipse User |
|
|
|
Originally posted by: cokoso.gmail.com
I extend the umltools palette and add my node entries with my streotypes.
Now I was trying to export this new org.eclipse.uml2.diagram.clazz plugin
and used it at the same time the original plugin.
I export with another id, change some names and I get the following
problem... when my plugin was starting it couldn't create the umltypes
because they were create by the org.eclipse.uml2.diagram.clazz plugin
first . I decide to create new umltypes but now I get this last
problem.... I couldn't throw my streotyped elements from the palette
because the "not allow icon pointer" appeared in the diagram panel and any
new element is allow.
I think that maybe I have to edit the constraints that allow, or not, to
put an element in the diagram but I can't find this constraints!
Maybe the question is silly but I have spended some days with this
problem, je.
thanks again.
|
|
| | | |
Goto Forum:
Current Time: Sat Apr 20 03:05:57 GMT 2024
Powered by FUDForum. Page generated in 0.04090 seconds
|