2323import org .eclipse .core .resources .IResource ;
2424import org .eclipse .core .runtime .CoreException ;
2525import org .eclipse .debug .core .DebugPlugin ;
26+ import org .eclipse .debug .core .ILaunch ;
2627import org .eclipse .debug .core .ILaunchConfiguration ;
2728import org .eclipse .debug .core .ILaunchConfigurationType ;
2829import org .eclipse .debug .core .ILaunchConfigurationWorkingCopy ;
@@ -347,8 +348,12 @@ protected void fillMenu(Menu menu) {
347348
348349 // Add favorites
349350 int accelerator = 1 ;
351+ ILaunch [] launches = DebugPlugin .getDefault ().getLaunchManager ().getLaunches ();
350352 for (ILaunchConfiguration launch : favoriteList ) {
351353 LaunchAction action = new LaunchAction (launch , getMode ());
354+ if (launches .length > 0 && checkIfLaunched (launch , launches )) {
355+ action .setText (action .getText () + " \u2699 " ); //$NON-NLS-1$
356+ }
352357 addToMenu (menu , action , accelerator );
353358 accelerator ++;
354359 }
@@ -361,6 +366,9 @@ protected void fillMenu(Menu menu) {
361366 // Add history launches next
362367 for (ILaunchConfiguration launch : historyList ) {
363368 LaunchAction action = new LaunchAction (launch , getMode ());
369+ if (launches .length > 0 && checkIfLaunched (launch , launches )) {
370+ action .setText (action .getText () + " \u2699 " ); //$NON-NLS-1$
371+ }
364372 addToMenu (menu , action , accelerator );
365373 accelerator ++;
366374 }
@@ -373,6 +381,22 @@ protected void fillMenu(Menu menu) {
373381 }
374382 }
375383
384+ /**
385+ * Returns whether the given launch configuration has been launched.
386+ *
387+ * @param launchConfiguration the launch configuration
388+ * @param launches the current active launches
389+ * @return {@code true} if a matching launch exists, {@code false} otherwise
390+ */
391+ private boolean checkIfLaunched (ILaunchConfiguration launchConfiguration , ILaunch [] launches ) {
392+ for (ILaunch launch : launches ) {
393+ if (launch .getLaunchConfiguration ().equals (launchConfiguration ) && !launch .isTerminated ()) {
394+ return true ;
395+ }
396+ }
397+ return false ;
398+ }
399+
376400 /**
377401 * Adds a separator to the given menu
378402 *
0 commit comments