Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] how to restrict available options for non containment references?([EEF] how to restrict available options for non containment references?)
[EEF] how to restrict available options for non containment references? [message #666003] Mon, 18 April 2011 15:02 Go to next message
Mauro Antonaci is currently offline Mauro AntonaciFriend
Messages: 12
Registered: February 2010
Junior Member
Hi, we are evaluating EEF technology for our model driven platform: at the first look and the first try it seems to be a very easy and powerful way to enhance the usability of standard EMF-generated tree-editors. We are using EEF 0.8.2 with Helios.

Our current evaluation challenge is: does EEF allow the same editor customizations that we made in standard EMF editor? (we wish to replace standard property editors view with the enhanced one without losing any previously supplied function/behavior).

The customizations we made in EMF editors are:


  1. use custom icons for model objects (overriding icon file in icons directory) : OK, still works in EEF
  2. use custom text in labels (overriding getText() method in item provider classes): OK, still works in EEF
  3. restrict available options for non containment references (with semantic rules depending on particular model elements, implemented in EMF editor overriding "addXXXPropertyDescriptor()" method in item provider classes): KO, in EEF does not work as-is


In EEF customizations #1 and #2 are OK because I think EEF architecture uses original item provider classes for this, so no problem at all;
unfortunately this seems not to apply for the option restriction customization: is there a way to implement this kind of customization in EEF editors? Where must we put the restriction code? we found a "addBusinessFilterToYYY" in XXXPartImpl classes that seems promising... but we still can't figure out how to do the job.

thanks in advance for any help.
Re: [EEF] how to restrict available options for non containment references? [message #666064 is a reply to message #666003] Mon, 18 April 2011 20:48 Go to previous messageGo to next message
Nathalie  is currently offline Nathalie Friend
Messages: 22
Registered: July 2009
Junior Member
Hi,
I wrote a custom EEF Editor where I was able to do a lot of customization.

When you mean "restrict available options", I am not sure I understand but for me there is two possibilities:

1 - You want to show some properties and hide others.

For example, for an object O that has two properties a and b. You want the properties page to show only a and not b.

Well, if yes you can only remove the properties you don't want to show from the .components model generated by the EEF infrastructure. You have to remove both the view and the component of the property from that model.

If you need to define at runtime, given some semantic rules what to show and what to hide, then I don't know how to do it.

2 - You want to filter the values of a property

This apply when you have a single valued property, and the user has to select from a list of object the value of that property. You can add a custom ViewerFilter through the "addBusinessFilterToYYY" methods. Your semantic rules will then go in your filter.

I hope this helps.
Re: [EEF] how to restrict available options for non containment references? [message #666104 is a reply to message #666064] Tue, 19 April 2011 07:18 Go to previous messageGo to next message
Goulwen Le Fur is currently offline Goulwen Le FurFriend
Messages: 125
Registered: July 2009
Senior Member
Hi,

Nathalie is right for these options.

Just to complete, You can try EEF 0.9 which is more compliant with the
EMF.edit framework (so with your customisations). If it's not the case,
you can file a bug on Bugzilla, EEF *must* do at least all EMF.edit can
you :)

Regards,

--
Goulwen Le Fur - goulwen.lefur@obeo.fr

Le 18/04/2011 22:48, Nathalie a écrit :
> Hi,
> I wrote a custom EEF Editor where I was able to do a lot of customization.
> When you mean "restrict available options", I am not sure I understand
> but for me there is two possibilities:
>
> 1 - You want to show some properties and hide others.
>
> For example, for an object O that has two properties a and b. You want
> the properties page to show only a and not b.
> Well, if yes you can only remove the properties you don't want to show
> from the .components model generated by the EEF infrastructure. You have
> to remove both the view and the component of the property from that model.
> If you need to define at runtime, given some semantic rules what to show
> and what to hide, then I don't know how to do it.
>
> 2 - You want to filter the values of a property
> This apply when you have a single valued property, and the user has to
> select from a list of object the value of that property. You can add a
> custom ViewerFilter through the "addBusinessFilterToYYY" methods. Your
> semantic rules will then go in your filter.
> I hope this helps.
Re: [EEF] how to restrict available options for non containment references? [message #666143 is a reply to message #666104] Tue, 19 April 2011 10:18 Go to previous messageGo to next message
Mauro Antonaci is currently offline Mauro AntonaciFriend
Messages: 12
Registered: February 2010
Junior Member
Thank you for your replies!

To Nathalie: my scenario is the second one you mentioned (filter available values for a property). Maybe I will try the "addBusinessFilter" way if I cannot get standard EMF.edit customization work in EEF: I prefer the second approach because it will allow to me to re-use all already implemented filter logic.

To Goulwen: happy to hear that what I expected (automatic EMF.edit customization support) is in EEF plans! I will try v.0.9 and file a bug as suggested if the problem will persist:

I just tried to install EEF 0.9 from update sites... but none of the 0.9 sites mentioned at [ http://wiki.eclipse.org/EEF/Installation_Guide ] seems to work at the moment: is it a temporary problem or must I get it somewhere else?
Re: [EEF] how to restrict available options for non containment references? [message #666188 is a reply to message #666143] Tue, 19 April 2011 12:22 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
Hi,

EEF O.9 is currently in review state, so there is no released version
yet. the latest stable version is available here :
http://download.eclipse.org/modeling/emft/eef/updates/milest ones/0.9

If you want to use the extended feature ( included in the SDK ) , you
must install the richtext component before.

If you don't want it, just choose the "Extended Editing Framework -
Development Tools (Incubation) " .


Le 19/04/2011 12:18, Mauro Antonaci a écrit :
> Thank you for your replies!
>
> To Nathalie: my scenario is the second one you mentioned (filter
> available values for a property). Maybe I will try the
> "addBusinessFilter" way if I cannot get standard EMF.edit customization
> work in EEF: I prefer the second approach because it will allow to me to
> re-use all already implemented filter logic.
> To Goulwen: happy to hear that what I expected (automatic EMF.edit
> customization support) is in EEF plans! I will try v.0.9 and file a bug
> as suggested if the problem will persist:
> I just tried to install EEF 0.9 from update sites... but none of the 0.9
> sites mentioned at [ http://wiki.eclipse.org/EEF/Installation_Guide ]
> seems to work at the moment: is it a temporary problem or must I get it
> somewhere else?


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] how to restrict available options for non containment references? [message #666249 is a reply to message #666188] Tue, 19 April 2011 15:30 Go to previous message
Mauro Antonaci is currently offline Mauro AntonaciFriend
Messages: 12
Registered: February 2010
Junior Member
I tried EEF v.0.9 and all EMF.edit customizations works perfectly!

Thank you all.

[Updated on: Tue, 19 April 2011 19:47]

Report message to a moderator

Previous Topic:EEF - Having trouble with ReferencesTable, Add and delete buttons.
Next Topic:Is EMF Compare adapted to implement a generic XML compare ?
Goto Forum:
  


Current Time: Fri Apr 19 01:16:01 GMT 2024

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

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

Back to the top