Project: JDT
Bug 54946 Contextual launch contribution should not set adaptable=true
Reported: 2004-03-16 04:34:56 | Status: verified fixed

The contextual launch contribution sets adaptable=true (see below). This means the selection is always converted to an IResource. This results in a loss of information, since then the enablement can only be expressed in terms of IResource and not in terms of the original type. For exampe, the JUnit contextual launch needs to support launching an individual IMethod. It should be up to the enablement expression to do the adaptation. <extension point="org.eclipse.ui.popupMenus"> <objectContribution objectClass="org.eclipse.core.resources.IResource" adaptable="true" id="org.eclipse.debug.ui.contextualLaunch"> <action label="%LaunchMenu.label" style="pulldown" class="org.eclipse.debug.internal.ui.actions.ContextualLaunchObjectActionDelega te" menubarPath="additions" enablesFor="1" id="org.eclipse.debug.ui.contextualLaunch.submenu"> </action> </objectContribution> </extension>

Files changed in fix:
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JavaTypeExtender.java