Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,6 @@ public class ActionMessages extends NLS {
public static String LaunchActionToolTip_Hours;
public static String LaunchActionToolTip_OneDay;
public static String LaunchActionToolTip_Days;
public static String AbstractLaunchHistoryAction_running;

}
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,6 @@ LaunchActionToolTip_Hours =Last executed {0} hours ago
LaunchActionToolTip_OneDay =Last executed 1 day ago
LaunchActionToolTip_Days =Last executed {0} days ago

AbstractLaunchHistoryAction_running=Running


Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,7 @@ protected void fillMenu(Menu menu) {
ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (ILaunchConfiguration launch : favoriteList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (checkIfLaunchActive(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
} else {
addRecentLaunchTimeTooltip(launch, action);
}
applyRunningState(action, launch, launches);
addToMenu(menu, action, accelerator);
accelerator++;
}
Expand All @@ -371,11 +367,7 @@ protected void fillMenu(Menu menu) {
// Add history launches next
for (ILaunchConfiguration launch : historyList) {
LaunchAction action= new LaunchAction(launch, getMode());
if (checkIfLaunchActive(launch, launches)) {
action.setText(action.getText() + " \u2699"); //$NON-NLS-1$
} else {
addRecentLaunchTimeTooltip(launch, action);
}
applyRunningState(action, launch, launches);
addToMenu(menu, action, accelerator);
accelerator++;
}
Expand All @@ -388,6 +380,15 @@ protected void fillMenu(Menu menu) {
}
}

private void applyRunningState(LaunchAction action, ILaunchConfiguration launch, ILaunch[] launches) {
if (checkIfLaunchActive(launch, launches)) {
action.setText(action.getText() + " ⚙"); //$NON-NLS-1$
action.setToolTipText(ActionMessages.AbstractLaunchHistoryAction_running);
} else {
addRecentLaunchTimeTooltip(launch, action);
}
}

/**
* Returns whether the given launch configuration has been launched and active
* now.
Expand Down
Loading