Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Extension Point
Extension Point [message #477984] Mon, 17 November 2008 21:54 Go to next message
Robert Lario is currently offline Robert LarioFriend
Messages: 34
Registered: July 2009
Member
When an element is stereotyped I need to run some custom code. Is there a
code extension point I should use for this?



Thanks
Re: Extension Point [message #477987 is a reply to message #477984] Wed, 19 November 2008 15:09 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Robert,

There is no extension point for this. You would have to implement a
listener and then react when the stereotype gets added. Try a
ResourceSetListener.
You can then obtain the element to which the stereotype is applied, have a
look at UMLUtil.getBaseElement();

Cheers,
- James.


"Robert Lario" <lario*NOSPAM*@inherit.com> wrote in message
news:gfsp6l$ra3$1@build.eclipse.org...
> When an element is stereotyped I need to run some custom code. Is there a
> code extension point I should use for this?
>
>
>
> Thanks
>
>
Re: Extension Point [message #477992 is a reply to message #477987] Wed, 19 November 2008 17:33 Go to previous message
Robert Lario is currently offline Robert LarioFriend
Messages: 34
Registered: July 2009
Member
James,

Is there a good tutorial, book or example on how to approach this? How to
create a listener?

Thanks

Robert
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:gg1a37$nsr$1@build.eclipse.org...
> Hi Robert,
>
> There is no extension point for this. You would have to implement a
> listener and then react when the stereotype gets added. Try a
> ResourceSetListener.
> You can then obtain the element to which the stereotype is applied, have a
> look at UMLUtil.getBaseElement();
>
> Cheers,
> - James.
>
>
> "Robert Lario" <lario*NOSPAM*@inherit.com> wrote in message
> news:gfsp6l$ra3$1@build.eclipse.org...
>> When an element is stereotyped I need to run some custom code. Is there
>> a code extension point I should use for this?
>>
>>
>>
>> Thanks
>>
>>
>
>
Re: Extension Point [message #627204 is a reply to message #477984] Wed, 19 November 2008 15:09 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Robert,

There is no extension point for this. You would have to implement a
listener and then react when the stereotype gets added. Try a
ResourceSetListener.
You can then obtain the element to which the stereotype is applied, have a
look at UMLUtil.getBaseElement();

Cheers,
- James.


"Robert Lario" <lario*NOSPAM*@inherit.com> wrote in message
news:gfsp6l$ra3$1@build.eclipse.org...
> When an element is stereotyped I need to run some custom code. Is there a
> code extension point I should use for this?
>
>
>
> Thanks
>
>
Re: Extension Point [message #627209 is a reply to message #477987] Wed, 19 November 2008 17:33 Go to previous message
Robert Lario is currently offline Robert LarioFriend
Messages: 34
Registered: July 2009
Member
James,

Is there a good tutorial, book or example on how to approach this? How to
create a listener?

Thanks

Robert
"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:gg1a37$nsr$1@build.eclipse.org...
> Hi Robert,
>
> There is no extension point for this. You would have to implement a
> listener and then react when the stereotype gets added. Try a
> ResourceSetListener.
> You can then obtain the element to which the stereotype is applied, have a
> look at UMLUtil.getBaseElement();
>
> Cheers,
> - James.
>
>
> "Robert Lario" <lario*NOSPAM*@inherit.com> wrote in message
> news:gfsp6l$ra3$1@build.eclipse.org...
>> When an element is stereotyped I need to run some custom code. Is there
>> a code extension point I should use for this?
>>
>>
>>
>> Thanks
>>
>>
>
>
Previous Topic:Re: Existing genmodel not picked up
Next Topic:Re: Existing genmodel not picked up
Goto Forum:
  


Current Time: Sun Mar 29 21:37:34 GMT 2020

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

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

Back to the top