PlatformObject.getAdapter(Class) returns null during start-up [message #1059104] |
Thu, 16 May 2013 17:36 |
Brian Vosburgh Messages: 137 Registered: July 2009 |
Senior Member |
|
|
We (Dali) adapt the platform interface IProject to the Dali interface ProjectResourceLocator.
This Dali interface and its sole implementation, SimpleProjectResourceLocator, are in the plug-in o.e.jpt.common.core. The IAdapterFactory that implements this "adaptation" is in the same plug-in. And plugin.xml defining the corresponding extension to the o.e.core.runtime.adapters extension point is also in the same plug-in.
The problem: Intermittently, during start-up, a call to IProject.getAdapter(ProjectResourceLocator.class) will return null with the first call but not null with subsequent calls. The adapter factory is implemented in such a way that it will never return null; so, apparently, the adapter factory is not invoked by the platform adapter manager. This seems to be a bug, as the plug-in must have been loaded for the class ProjectResourceLocator to be resolved. Unfortunately, in a test workspace where this happens with every start-up, it never happens when executing under the debugger (even with no breakpoints whatsoever).
Is this expected behavior (i.e. that even though a plug-in is loaded, its adapter factories are not necessarily loaded)? If not, can anyone offer any hints as to how we can investigate, sans the debugger, why the platform adapter manager does not invoke the appropriate adapter factory?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04212 seconds