/** * Return only the launch configuration types that support the current mode AND * are marked as 'public'. * * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ @Override public Object[] getElements(Object inputElement) { ILaunchConfigurationType[] allTypes = getLaunchManager().getLaunchConfigurationTypes(); return filterTypes(allTypes).toArray(); }
@Override public Object[] getElements(Object inputElement) { return DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); } @Override
/** * Returns the map of categories * @return the map of categories */ private Map<ILaunchConfigurationType, Integer> getCategories() { if (fgCategories == null) { fgCategories = new HashMap<>(); List<ILaunchConfigurationType> types = Arrays.asList(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()); Collections.sort(types, new Comparator<ILaunchConfigurationType>() { @Override public int compare(ILaunchConfigurationType o1, ILaunchConfigurationType o2) { ILaunchConfigurationType t1 = o1; ILaunchConfigurationType t2 = o2; return t1.getName().compareTo(t2.getName()); } }); Iterator<ILaunchConfigurationType> iterator = types.iterator(); int i = 0; while (iterator.hasNext()) { fgCategories.put(iterator.next(), Integer.valueOf(i)); i++; } } return fgCategories; } }
/** * returns the launch configuration types * @return the launch configuration types */ private ILaunchConfigurationType[] getLaunchConfigurationTypes() { return DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); }
/** * @return launch configuration types which currently have configuration or * prototype children, and are therefore relevant for exporting */ private ILaunchConfigurationType[] getUsedLaunchConfigurationTypes() { return Arrays.stream(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()).filter(launchConfigType -> { try { return getConfigurationTypeChildren(launchConfigType).length > 0; } catch (CoreException e) { DebugUIPlugin.logErrorMessage(e.getMessage()); } return true; }).toArray(ILaunchConfigurationType[]::new); }
/** * Return whether there are any registered launch configuration types for * the mode of this action. * * @return whether there are any registered launch configuration types for * the mode of this action */ private boolean existsConfigTypesForMode() { ILaunchConfigurationType[] configTypes = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); for (int i = 0; i < configTypes.length; i++) { if (configTypes[i].supportsMode(getMode())) { return true; } } return false; }
/** * Return whether there are any registered launch configuration types for * the mode of this action. * * @return whether there are any registered launch configuration types for * the mode of this action */ private boolean existsConfigTypesForMode() { ILaunchConfigurationType[] configTypes = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); for (int i = 0; i < configTypes.length; i++) { ILaunchConfigurationType configType = configTypes[i]; if (configType.supportsMode(getMode())) { return true; } } return false; }
/** * Return whether there are any registered launch configuration types for * the mode of this action. * * @return whether there are any registered launch configuration types for * the mode of this action */ private boolean existsConfigTypesForMode() { ILaunchConfigurationType[] configTypes = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); for (int i = 0; i < configTypes.length; i++) { ILaunchConfigurationType configType = configTypes[i]; if (configType.supportsMode(getMode())) { return true; } } return false; } }
/** * Return whether there are any registered launch configuration types for * the mode of this action. * * @return whether there are any registered launch configuration types for * the mode of this action */ private boolean existsConfigTypesForMode() { ILaunchConfigurationType[] configTypes = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); for (int i = 0; i < configTypes.length; i++) { ILaunchConfigurationType configType = configTypes[i]; if (configType.supportsMode(getMode())) { return true; } } return false; }
return getLaunchManager().getLaunchConfigurationTypes();
fTreeViewer.setInput(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes());