Search in sources :

Example 1 with LaunchShortcutsAction

use of org.eclipse.debug.ui.actions.LaunchShortcutsAction in project dbeaver by dbeaver.

the class DebugConfigurationMenuContributor method fillContributionItems.

@Override
protected void fillContributionItems(final List<IContributionItem> menuItems) {
    // Fill recent debugs
    LaunchConfigurationManager launchConfigurationManager = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
    LaunchHistory launchHistory = launchConfigurationManager.getLaunchHistory(DebugUI.DEBUG_LAUNCH_GROUP_ID);
    ILaunchConfiguration[] filteredConfigs = LaunchConfigurationManager.filterConfigs(launchHistory.getHistory());
    for (ILaunchConfiguration launch : filteredConfigs) {
        LaunchAction action = new LaunchAction(launch, "debug");
        menuItems.add(new ActionContributionItem(action));
    }
    // Fill configuration actions
    if (filteredConfigs.length > 0) {
        menuItems.add(new Separator());
    }
    menuItems.add(new ActionContributionItem(new LaunchShortcutsAction(DebugUI.DEBUG_LAUNCH_GROUP_ID)));
    menuItems.add(new ActionContributionItem(new DebugLaunchDialogAction()));
}
Also used : LaunchHistory(org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) ActionContributionItem(org.eclipse.jface.action.ActionContributionItem) LaunchConfigurationManager(org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager) LaunchAction(org.eclipse.debug.ui.actions.LaunchAction) LaunchShortcutsAction(org.eclipse.debug.ui.actions.LaunchShortcutsAction) Separator(org.eclipse.jface.action.Separator)

Example 2 with LaunchShortcutsAction

use of org.eclipse.debug.ui.actions.LaunchShortcutsAction in project dbeaver by serge-rider.

the class DebugConfigurationMenuContributor method fillContributionItems.

@Override
protected void fillContributionItems(final List<IContributionItem> menuItems) {
    // Fill recent debugs
    LaunchConfigurationManager launchConfigurationManager = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
    LaunchHistory launchHistory = launchConfigurationManager.getLaunchHistory(DebugUI.DEBUG_LAUNCH_GROUP_ID);
    ILaunchConfiguration[] filteredConfigs = LaunchConfigurationManager.filterConfigs(launchHistory.getHistory());
    for (ILaunchConfiguration launch : filteredConfigs) {
        LaunchAction action = new LaunchAction(launch, "debug");
        menuItems.add(new ActionContributionItem(action));
    }
    // Fill configuration actions
    if (filteredConfigs.length > 0) {
        menuItems.add(new Separator());
    }
    menuItems.add(new ActionContributionItem(new LaunchShortcutsAction(DebugUI.DEBUG_LAUNCH_GROUP_ID)));
    menuItems.add(new ActionContributionItem(new DebugLaunchDialogAction()));
}
Also used : LaunchHistory(org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) ActionContributionItem(org.eclipse.jface.action.ActionContributionItem) LaunchConfigurationManager(org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager) LaunchAction(org.eclipse.debug.ui.actions.LaunchAction) LaunchShortcutsAction(org.eclipse.debug.ui.actions.LaunchShortcutsAction) Separator(org.eclipse.jface.action.Separator)

Aggregations

ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)2 LaunchConfigurationManager (org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager)2 LaunchHistory (org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory)2 LaunchAction (org.eclipse.debug.ui.actions.LaunchAction)2 LaunchShortcutsAction (org.eclipse.debug.ui.actions.LaunchShortcutsAction)2 ActionContributionItem (org.eclipse.jface.action.ActionContributionItem)2 Separator (org.eclipse.jface.action.Separator)2