| Summary: | [doc] update API documentation for ILaunchable | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Angel Vera <arvera> |
| Component: | Debug | Assignee: | Platform-Debug-Inbox <platform-debug-inbox> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | darin.eclipse, tjwatson |
| Version: | 3.6 | ||
| Target Milestone: | 3.7 M1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Angel Vera
Here is the url from HEAD of the schema of the adapters extension point. http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/components/bundles/org.eclipse.equinox.registry/schema/adapters.exsd?root=RT_Project&view=markup Moving to debug for comment. I'm not sure I understand what the javadoc is stating. To me it seems to indicate that this interface does not need to be implemented in order to contribute to the adapters extension point. That part is true. But to contribute to the adapters extension point you must define a class, I think the javadoc is just stating that that class does not need to implement ILaunchable. Debug uses the ILaunchable interface as a tag for objects that are launchable via the context launching support (clicking the run/debug toolbar buttons to launch the selection/active editor).
Debug checks if an ILaunchable adapter is available from the selection/active editor to determine if it should be considered for launching. However, the platform never actually retrieves the adapater or calls to any methods on it (the interface is, in fact, empty).
i.e. the debug platform does this test:
Platform.getAdapterManager().hasAdapter(X, ILaunchable.class.getName());
So objects register ILaunchable adatpers, but don't actually provide them. There is also no harm in implementing the interface or providing the adapter.
For example, JDT contribute launchable adapters like:
<extension point="org.eclipse.core.runtime.adapters">
<factory
class=""
adaptableType="org.eclipse.jdt.core.IJavaElement">
<adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
</factory>
...
So no factory is actually provided, but the platform will answer true to #hasAdapter(...)
(In reply to comment #3) Darin, that is all good documentation that perhaps should be added to the javadoc or some sort of ILaunchable wiki FAQ. Thanks for clarifying. Thomas, It sounds like technically it is possible and in somecases correct to provide a IAdapater extension point with no factory, could we then make the adapters extension point have the class as optional? Fixed. Updated Javadoc for ILaunchable. Verified. |