Eclipse plug-in: add Launch command group to Custom Perspective

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.

Answers


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>

Need Your Help

Remove white space Validation ASP control

c# asp.net html css visual-studio-2010

Does anyone know how to remove the white space for " Invalid zip." ? The reason is because there is another validation to the left of it to make sure it's only numbers. But if it's not visible I wa...

Does the Chrome Bluetooth API work on Windows Mobile?

google-chrome installation bluetooth-lowenergy google-chrome-app

TLDR: Can the Chrome Bluetooth API be used on the Windows mobile platform?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.