|
Re: Restrict referencable objects [message #773664 is a reply to message #772767] |
Mon, 02 January 2012 08:17 |
Ralph Gerbig Messages: 702 Registered: November 2009 |
Senior Member |
|
|
Hi,
this is a EMF related question as the Properties View uses EMF's .edit plugin. Do do what you like to do you need to go to your xxxItemProvider class in the .edit plugin generated by EMF. The you should find a method called addXXXPropertyDescriptor. Change this code to:
itemPropertyDescriptors.add(new org.eclipse.emf.edit.provider.ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_XXX_XXX"), getString("_UI_PropertyDescriptor_description", "_UI_XXXX_XXXX", "_UI_XXXX_XXXX"), XXXPackage.Literals.XXX_XXX, true, false, true, null, null, null) {
@Override
public Collection<?> getChoiceOfValues(Object object) {
//place your code for filtering here
}
});
Do not forget to set the method's comment to @generated NOT. If you like to get this generated by EMF you might take a look at EMF's templates and customize them.
Hope this helps.
Ralph
|
|
|
Powered by
FUDForum. Page generated in 0.03123 seconds