javaeclipseeclipse-plugineclipse-rcplaunch-configuration

Eclipse Plugin: Is there a way to get the External Tools Configurations Tree?


Is there a way to get the orange-highlighted tree(see img) of the "External Tools Configurations..." window?

If not, which classes of the official Eclipse-API can I use to build my own TreeViewer?

This question here: Eclipse Plugin - get Launch Configurations Tree List in a Dialog is similar to mine. There, the official Eclipse-API classes were given. Another approach there would have been to use the LaunchConfigurationFilteredTree even if it is not official API. Is there a similiar class for the ExternalTools?

enter image description here


Solution

  • The external tools dialog is still just launch configurations but only shows configurations where the launch configuration belongs to the org.eclipse.ui.externaltools.launchGroup launch group.

    As usual the Eclipse code is very complex, but you can get the launch groups using

    ILaunchGroup [] groups = DebugUITools.getLaunchGroups();
    

    from the array you get find the group with the correct id.

    You can get the launch group for an ILaunchConfiguration with

    ILaunchGroup group = DebugUITools.getLaunchGroup(config, mode);
    

    where the mode is always "run" for external tools.