Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » childCreationExtenders
childCreationExtenders [message #422558] Tue, 09 September 2008 12:16 Go to next message
Xavier Maysonnave is currently offline Xavier MaysonnaveFriend
Messages: 30
Registered: July 2009
Member
Hi,

I'm prototyping a child extension activation and deactivation mechanism on
top of childCreationExtenders in EMF 2.4.

To implement such behaviour I plan to use specialized ViewerFilterAction
on our content provider.

I would like to create a new MenuManager either in the general toolbar and
in contextual popup menus filled with extended model name in our editor.

Assume we have a generated editor for model A. model B and model C extends
A. My MenuManager should contain the namespace name of such extensions in
order to successfully activate and deactivate extensions.

I'm trying to figure out how to retrieve the model owner (eg model B and
model C) through the childCreationExtenders extension point. I don't want
to extensively analyse model to build a dependency graph it will be too
expensive.

The 'IChildCreationExtender.Descriptor' doesn't expose such informations.
My first approach was to read by myself this extension point to get the
class implementation. From now on I can access the getDeclaringClass() of
this implementation. Now I have a
org.eclipse.emf.edit.itemProviderAdapterFactories extension point class
implementation.

The ComposedAdapterFactory.Descriptor.Registry doesn't expose either its
uri attribute so I need to read by myself the itemProviderAdapterFactories
extension point to get uris.

Is there a way to have a more efficient implementation ?

Thanks
Re: childCreationExtenders [message #422564 is a reply to message #422558] Tue, 09 September 2008 13:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Xavier,

Comments below.

Xavier Maysonnave wrote:
> Hi,
>
> I'm prototyping a child extension activation and deactivation
> mechanism on top of childCreationExtenders in EMF 2.4.
>
> To implement such behaviour I plan to use specialized
> ViewerFilterAction on our content provider.
>
> I would like to create a new MenuManager either in the general toolbar
> and in contextual popup menus filled with extended model name in our
> editor.
>
> Assume we have a generated editor for model A. model B and model C
> extends A. My MenuManager should contain the namespace name of such
> extensions in order to successfully activate and deactivate extensions.
>
> I'm trying to figure out how to retrieve the model owner (eg model B
> and model C) through the childCreationExtenders extension point. I
> don't want to extensively analyse model to build a dependency graph it
> will be too expensive.
>
> The 'IChildCreationExtender.Descriptor' doesn't expose such
> informations. My first approach was to read by myself this extension
> point to get the class implementation. From now on I can access the
> getDeclaringClass() of this implementation. Now I have a
> org.eclipse.emf.edit.itemProviderAdapterFactories extension point
> class implementation.
> The ComposedAdapterFactory.Descriptor.Registry doesn't expose either
> its uri attribute so I need to read by myself the
> itemProviderAdapterFactories extension point to get uris.
>
> Is there a way to have a more efficient implementation ?
We don't really want to expose all the details of the underlying
implementation since the registry can also be used programmatically.

It's certainly possible for model A's editor to define extension points
specific to your editor that are then used by model B and model C to
augment editor A... It sounds like you're trying to generalize this
though. I'm not sure what specifically to suggest...
>
> Thanks
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Teneo - Use Spring data source definition for HbSessionDataStore
Next Topic:TabbedPropertySheetPage and AdapterFactoryLabelProvider
Goto Forum:
  


Current Time: Fri Mar 29 15:40:32 GMT 2024

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

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

Back to the top