Reputation: 3938
I have looked for a lot of tutorials online and it is very difficult to find anything related to Launches.
I am implementing an IDE plug-in which implements a custom perspective and I cannot see any of the Run or Debug toolbar buttons except the Run Last Tool button. Everytime I launch the perspective, I need to go into Customize Perspective and then Command Group Visibility and activate the Launch command group.
I have implemented a LaunchConfigurationType and am basically trying to add LaunchShortcuts.
I read somewhere that you need to create an ILaunchable
adapter to make the Run as... and Debug as... visible. Here is what I added in the plugin.xml,
<extension point="org.eclipse.core.runtime.adapters">
<factory adaptableType="org.eclipse.core.resources.IFile" class=" ">
<adapter type="org.eclipse.debug.ui.actions.ILaunchable">
</adapter>
</factory>
</extension>
I have tried many types of adaptableTypes: IResource
, IFile
, the custom perspective, but none of them make the buttons show up on the toolbar.
Upvotes: 5
Views: 2772
Reputation: 950
You need to extend your perspective using org.eclipse.ui.perspectiveExtensions extension point. To add Run and Debug buttons add org.eclipse.debug.ui.launchActionSet actionSet like this:
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="your.perspective.id">
<actionSet
id="org.eclipse.debug.ui.launchActionSet">
</actionSet>
</perspectiveExtension>
</extension>
Upvotes: 8