Пример #1
0
 public Object[] getElements(Object inputElement) {
   ILaunchGroup[] groups = DebugUITools.getLaunchGroups();
   List possibleGroups = new ArrayList();
   ILaunchConfiguration configuration = (ILaunchConfiguration) inputElement;
   for (int i = 0; i < groups.length; i++) {
     ILaunchGroup extension = groups[i];
     LaunchHistory history =
         getLaunchConfigurationManager().getLaunchHistory(extension.getIdentifier());
     if (history != null && history.accepts(configuration)) {
       possibleGroups.add(extension);
     }
   }
   return possibleGroups.toArray();
 }
Пример #2
0
 /** @see org.eclipse.jface.action.IAction#run() */
 public void run() {
   LaunchHistory history =
       DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchHistory(fIdentifier);
   ILaunchConfiguration configuration = history.getRecentLaunch();
   IStructuredSelection selection = null;
   if (configuration == null) {
     selection = new StructuredSelection();
   } else {
     selection = new StructuredSelection(configuration);
   }
   int result =
       DebugUITools.openLaunchConfigurationDialogOnGroup(
           DebugUIPlugin.getShell(), selection, fIdentifier);
   notifyResult(result == Window.OK);
 }