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

Bug 152147

Summary: IAdapterManager.getAdapter: Need way to find out about not yet loaded plugins
Product: [Eclipse Project] Platform Reporter: Boris Bokowski <bokowski>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Boris Bokowski CLA 2006-07-28 10:50:50 EDT
For steps see bug 151239.  The property page for IResources is enabled for JAR entries in the JRE container even though getAdapter(element, IResource.class) returns null because there is an adapter factory that returns true for hasAdapter. In this situation, because we cannot distinguish between this case and a case where one of the adapter factories is not yet loaded, the enabledWhen expression (<enabledWhen> <adapt type="org.eclipse.core.resources.IResource"/> </enabledWhen>) evaluates to EvaluationResult.NOT_LOADED which we interpret as a case where the property page should be shown.

I am proposing a new method along the following lines:
/** Returns true if all applicable adapter factories for the given adaptable
 * object and the given adapter type name are loaded. */
boolean IAdapterManager.allAdapterFactoriesLoaded(Object adaptable, String adapterTypeName)

This would allow more accurate results whenever an adapt expression is used for enablement or other purposes.
Comment 1 John Arthorne CLA 2006-07-28 16:28:38 EDT

*** This bug has been marked as a duplicate of 127623 ***