Community
Participate
Working Groups
Build Identifier: I20100608-0911 This is a reopening of bug 261545. Now switching to Helios brought back this one for me. Immediately after starting my RCP I can access the context menus "run as", "debug as", and "profile as". At this time org.eclipse.debug.core has its status set to LAZY. After running my launch shortcut for the first time (or simply starting org.eclipse.debug.core via the OSGI console) the launch context menu entries disappear. I see that the debug framework needs sn adapter for ILaunchable, so I added this as described in Bug 191586. I was crosschecking for this adapter with final IFile file = ResourcesPlugin.getWorkspace().getRoot().getProject(..).getFile(...); final boolean hasProperty = Platform.getAdapterManager().hasAdapter(file, "org.eclipse.debug.ui.actions.ILaunchable"); which resolves to true. Stopping org.eclipse.debug.core bundle makes the context menu entries reappear. Bug 261545 seemed to work for me. When switching to Helios I did some cleanup of my bundle dependencies. Maybe some other eclipse bundle (which I am missing now) fixes this issue? Reproducible: Always
Found the solution for myself: LaunchablePropertyTester failed at if (((LaunchManager)(DebugPlugin.getDefault().getLaunchManager())).launchModeAvailable((String)expectedValue)) This happened because I only had a LaunchShortcut registered. The check above needs at least 1 launchConfigurationType for the specific mode (run, debug profile) where we want to see the context menu entry. So adding a launchConfigurationType fixes this issue. Maybe something for the documentation?
(In reply to comment #1) > Found the solution for myself: > LaunchablePropertyTester failed at > if > (((LaunchManager)(DebugPlugin.getDefault().getLaunchManager())).launchModeAvailable((String)expectedValue)) > This happened because I only had a LaunchShortcut registered. The check above > needs at least 1 launchConfigurationType for the specific mode (run, debug > profile) where we want to see the context menu entry. > So adding a launchConfigurationType fixes this issue. > Maybe something for the documentation? In this case it looks like there were no launch configuration types at all... i.e. nothing to support the launch mode. This sounds rare... usually a launch shortcut and a launch configuration type go together. What is the use case where you would have a launch shortcut, but not launch configuration types?
(In reply to comment #2) > In this case it looks like there were no launch configuration types at all... > i.e. nothing to support the launch mode. Correct. There were no launch configurations provided by my plugins and obviously no framework bundle providing one. > What is the use case where you would have a launch shortcut, but > not launch configuration types? I was playing around with Rhino.Therefore II added a launch shortcut for JavaScript files. Thats all. I agree, might be a rare use case. Still I ran into it and maybe others will too. Now it's documented here, maybe it should go to launch shortcut documentation too - thats up to you :)
Marking as works for me for now. If there are no launch configration types contributed, there is nothing to launch (from the debug platform's perspective), and thus the actions should not appear. However, I did add the folllowing text to the extension point doc: "No launch shortcuts are provided by the platform. Note that although launch shortcuts do not have to be associated with a specific launch configuration type, launch shortcut menus will not appear unless there is at least one launch configuration type that supports a shortcut's launch mode(s)."