views:

23

answers:

1

Hi,

In Plugin Developpment Environnement of Eclipse, How ca i add an menu entry to "Run As" for a specific Editor?

+1  A: 

You can get some tips in the Eclipse article:

We Have Lift-off: The Launching Framework in Eclipse

Declaring a launch configuration type

The first step in creating our applet launcher is declaring a config type, as shown in the following snippet of XML from our plug-in's plugin.xml file:
Non-UI declaration

<extension point="org.eclipse.debug.core.launchConfigurationTypes">
    <launchConfigurationType
        name="Java Applet"
        delegate="org.eclipse.jdt.internal.launching.JavaAppletLaunchConfigurationDelegate"
        modes="run, debug"               
        id="org.eclipse.jdt.launching.javaApplet">        
    </launchConfigurationType>
</extension>

The most important part of this declaration is the delegate attribute which specifies the fully-qualified name of a class that implements the interface org.eclipse.debug.core.model.ILaunchConfigurationDelegate.
The delegate is the brains of the launcher, and implements the launch() method which launches a specified config.

VonC