Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327671

Summary: conflicts between adapters for IActionFilter
Product: [Eclipse Project] Platform Reporter: Nicolas Bros <nicolas.bros>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 312039    

Description Nicolas Bros CLA 2010-10-13 10:50:46 EDT
I have a plug-in which registers an adapter on EObject using extension point "org.eclipse.core.runtime.adapters". 
This adapter is used to provide an IActionFilter for EObjects, to filter actions on EObjects in contextual menus.

The problem is that Eclipse seems to take the first adapter it finds. So, if
any installed plug-in also registers an adapter for IActionFilter on EObject as
well, it will conflict with the one I registered.

The filtering mechanism seems to be designed to filter custom elements, that are manipulated by a single plug-in.

But in this case, "EObject" is a common class, that many plug-ins may want to filter on.

I think there should be an extension point to provide IActionFilters, instead of relying on the adapter mechanism.
Comment 1 Paul Webster CLA 2010-10-14 09:28:29 EDT
We won't update the action extension points or IActionFilter.

Commands and Menu Contributions are based on core expressions, a much more robust and extensible expression syntax.  i.e. in your case you would be providing a property tester with it's own unique namespace to target the properties you want to filter on.

PW