/** * Return <code>true</code> if the specified launch configuration type should * be visible in the specified mode, <code>false</code> otherwise. */ private boolean isVisible(ILaunchConfigurationType configType, String mode) { if (!configType.isPublic()) { return false; } if (mode == null) { return true; } return configType.supportsMode(mode); }
@Override public boolean supportsMode(String mode) throws CoreException { return getType().supportsMode(mode); }
/** * Returns whether any launch config supports the given mode. * * @param mode launch mode * @return whether any launch config supports the given mode */ public synchronized boolean launchModeAvailable(String mode) { if (fActiveModes == null) { ILaunchConfigurationType[] types = getLaunchConfigurationTypes(); ILaunchMode[] modes = getLaunchModes(); fActiveModes = new HashSet<String>(3); for (int i = 0; i < types.length; i++) { for (int j = 0; j < modes.length; j++) { if (types[i].supportsMode(modes[j].getIdentifier())) { fActiveModes.add(modes[j].getIdentifier()); } } } } return fActiveModes.contains(mode); }
/** * 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; } }
/** * Returns the launch group the given launch configuration type belongs to, in * the specified mode, or <code>null</code> if none. * * @param type the type * @param mode the mode * @return the launch group the given launch configuration belongs to, in * the specified mode, or <code>null</code> if none */ public ILaunchGroup getLaunchGroup(ILaunchConfigurationType type, String mode) { if (!type.supportsMode(mode)) { return null; } String category = type.getCategory(); ILaunchGroup[] groups = getLaunchGroups(); ILaunchGroup extension = null; for (int i = 0; i < groups.length; i++) { extension = groups[i]; if (category == null) { if (extension.getCategory() == null && extension.getMode().equals(mode)) { return extension; } } else if (category.equals(extension.getCategory())) { if (extension.getMode().equals(mode)) { return extension; } } } return null; }
/** * 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; }
if(type.supportsMode(ILaunchManager.RUN_MODE)) { group = lcm.getLaunchGroup(type, ILaunchManager.RUN_MODE); else if(type.supportsMode(ILaunchManager.DEBUG_MODE)) { group = lcm.getLaunchGroup(type, ILaunchManager.DEBUG_MODE); else if(type.supportsMode(ILaunchManager.PROFILE_MODE)) { group = lcm.getLaunchGroup(type, ILaunchManager.PROFILE_MODE);
/** * Returns whether the given configuration is included in the group * associated with this launch history. * * @param launch * @return boolean */ public boolean accepts(ILaunchConfiguration configuration) { try { if (!LaunchConfigurationManager.isVisible(configuration)) { return false; } if (configuration.getType().supportsMode(getLaunchGroup().getMode())) { String launchCategory = null; launchCategory = configuration.getCategory(); String category = getLaunchGroup().getCategory(); if (launchCategory == null || category == null) { return launchCategory == category; } return category.equals(launchCategory); } } catch (CoreException e) { DebugUIPlugin.log(e); } return false; }
return !priv && type.supportsMode(fGroup.getMode()) && equalCategories(type.getCategory(), fGroup.getCategory()) && !WorkbenchActivityHelper.filterItem(new LaunchConfigurationTypeContribution(type));
/** * Returns if the specified configuration is supported by this instance of the view. * Supported means that: * <ul> * <li>The configuration is not private</li> * <li>AND that the configurations' type supports the mode of the current launch group</li> * <li>AND that the category of the configurations' type matches that of the current launch group</li> * </ul> * @param configuration the configuration * @return true if the configuration is supported by this instance of the view, false otherwise * * @since 3.4 */ protected boolean isSupportedConfiguration(ILaunchConfiguration configuration) { try { ILaunchConfigurationType type = configuration.getType(); return !configuration.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false) && type.supportsMode(getLaunchGroup().getMode()) && equalCategories(type.getCategory(), getLaunchGroup().getCategory()); } catch(CoreException ce) { DebugUIPlugin.log(ce); } return false; }