|[EEF] how to restrict available options for non containment references? [message #666003]
||Mon, 18 April 2011 11:02
| Mauro Antonaci
Registered: February 2010
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:
- use custom icons for model objects (overriding icon file in icons directory) : OK, still works in EEF
- use custom text in labels (overriding getText() method in item provider classes): OK, still works in EEF
- 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 #666104 is a reply to message #666064]
||Tue, 19 April 2011 03:18
| Goulwen Le Fur
Registered: July 2009
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
Goulwen Le Fur - email@example.com
Le 18/04/2011 22:48, Nathalie a écrit :
> 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.
Powered by FUDForum
. Page generated in 0.01968 seconds