Skip to main content



      Home
Home » Modeling » EMF » EMF Providers dynamically
EMF Providers dynamically [message #1047537] Tue, 23 April 2013 06:52 Go to next message
Eclipse UserFriend
Hi,

I have an EMF model which is used in a TreeViewer. On right click on tree, by default EMF provides the list of possible children. I want to modify this child list (show only few children) based on some conditions dynamically. Similarly the property descriptors list also need to be modified. What is the best possible way to achieve this?

Dynamic behavior is because the conditions are added based on the user inputs.

Thanks.
Dhanya
Re: EMF Providers dynamically [message #1047755 is a reply to message #1047537] Tue, 23 April 2013 11:53 Go to previous messageGo to next message
Eclipse UserFriend
Dhanya,

You'd need to specialize the generated item provider(s) that produce
these things.


On 23/04/2013 2:46 PM, Dhanya M wrote:
> Hi,
>
> I have an EMF model which is used in a TreeViewer. On right click on
> tree, by default EMF provides the list of possible children. I want to
> modify this child list (show only few children) based on some
> conditions dynamically. Similarly the property descriptors list also
> need to be modified. What is the best possible way to achieve this?
>
> Dynamic behavior is because the conditions are added based on the user
> inputs.
>
> Thanks.
> Dhanya
Re: EMF Providers dynamically [message #1048130 is a reply to message #1047755] Wed, 24 April 2013 00:46 Go to previous messageGo to next message
Eclipse UserFriend
Currently what i have done is modify each providers newChildDescriptors collection in collectNewChildDescriptors(..) method. Is that the correct approach?
Re: EMF Providers dynamically [message #1048161 is a reply to message #1048130] Wed, 24 April 2013 01:48 Go to previous messageGo to next message
Eclipse UserFriend
Dhanya,

Those are responsible for the choices the context menus, so yes, if you
want to modify that too, that's how you'd do it...


On 24/04/2013 6:46 AM, Dhanya M wrote:
> Currently what i have done is modify each providers
> newChildDescriptors collection in collectNewChildDescriptors(..)
> method. Is that the correct approach?
Re: EMF Providers dynamically [message #1048175 is a reply to message #1047537] Wed, 24 April 2013 02:08 Go to previous messageGo to next message
Eclipse UserFriend
Thanks.

Also is there a possibility to restrict the enumerators values in Properties view?
Eg: If I have an Enumerator with values A,B,C,D and I want to show only A and B based on some conditions in the properties view, is it possible?
Re: EMF Providers dynamically [message #1048225 is a reply to message #1048175] Wed, 24 April 2013 03:33 Go to previous message
Eclipse UserFriend
Dhanya,

Yes, you can specialize the property descriptor's getChoiceOfValues.

On 24/04/2013 8:08 AM, Dhanya M wrote:
> Thanks.
>
> Also is there a possibility to restrict the enumerators values in
> Properties view?
> Eg: If I have an Enumerator with values A,B,C,D and I want to show
> only A and B based on some conditions in the properties view, is it
> possible?
Previous Topic:[CDO] DBAdapter.readFields (Out of memory)
Next Topic:EMF search problem
Goto Forum:
  


Current Time: Fri Jul 04 20:31:44 EDT 2025

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

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

Back to the top