|
|
|
Re: Restricting attribute value choice [message #821618 is a reply to message #698291] |
Thu, 15 March 2012 16:02 |
Iban Ayestaran Messages: 58 Registered: September 2011 |
Member |
|
|
Hi, I want to do exactly what this message says, that is, to restrict the choice values in a list. As far as I understand, if I type this, there should not be any option available in the list, because I have not written any "coiceOfValue.add(object);":
/**
* This adds a property descriptor for the Foo feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
protected void addFooPropertyDescriptor(Object object)
{
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Abc_foo_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Abc_foo_feature", "_UI_Abc_type"),
XyzPackage.Literals.ABC__FOO,
true,
false,
true,
null,
null,
null)
{
@Override
public Collection<?> getChoiceOfValues(Object object)
{
List<Object> choiceOfValues = new ArrayList<Object>(super.getChoiceOfValues(object));
// Filter the choices before returning them.
return choiceOfValues;
}
});
}
But if I type that still all the options are available, as they were before. What am I missing??
Thanks in advance!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03693 seconds