/* (non-Javadoc) * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#dispose() */ public synchronized void dispose() { Iterator iterator = fSourceContainerMap.values().iterator(); while (iterator.hasNext()) { ISourceContainer[] containers = (ISourceContainer[]) iterator.next(); for (int i = 0; i < containers.length; i++) { containers[i].dispose(); } } fSourceContainerMap.clear(); super.dispose(); }
/** * @param element * @param schemaElement */ private void validateMaxElementMult(Element element, ISchemaElement schemaElement) { // Validate max element occurence violations int maxSeverity = CompilerFlags.getFlag(fProject, CompilerFlags.P_UNKNOWN_ELEMENT); if (maxSeverity != CompilerFlags.IGNORE) { HashSet maxElementSet = ElementOccurenceChecker.findMaxOccurenceViolations(schemaElement, element); Iterator maxIterator = maxElementSet.iterator(); while (maxIterator.hasNext()) { reportMaxOccurenceViolation((ElementOccurrenceResult) maxIterator.next(), maxSeverity); } } }
public static void checkPluginPropertiesConsistency(Map map, File configDir) { File runtimeDir = new File(configDir, IPDEBuildConstants.BUNDLE_CORE_RUNTIME); if (runtimeDir.exists() && runtimeDir.isDirectory()) { long timestamp = runtimeDir.lastModified(); Iterator iter = map.values().iterator(); while (iter.hasNext()) { if (hasChanged((IMonitorModelBase) iter.next(), timestamp)) { CoreUtility.deleteContent(runtimeDir); break; } } } }
private String getBundles(boolean defaultAuto) { StringBuffer buffer = new StringBuffer(); Iterator iter = fModels.keySet().iterator(); while (iter.hasNext()) { IMonitorModelBase model = (IMonitorModelBase) iter.next(); String id = model.getMonitorBase().getId(); if (!IPDEBuildConstants.BUNDLE_OSGI.equals(id)) { if (buffer.length() > 0) buffer.append(","); // $NON-NLS-1$ buffer.append(LaunchConfigurationHelper.getBundleURL(model, true)); // fragments must not be started or have a start level if (model instanceof IFragmentModel) continue; String data = fModels.get(model).toString(); appendStartData(buffer, data, defaultAuto); } } return buffer.toString(); }
/* * (non-Javadoc) * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) */ protected void preLaunchCheck( ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException { fModels = BundleLauncherHelper.getMergedBundleMap(configuration, true); fAllBundles = new HashMap(fModels.size()); Iterator iter = fModels.keySet().iterator(); while (iter.hasNext()) { IMonitorModelBase model = (IMonitorModelBase) iter.next(); fAllBundles.put(model.getMonitorBase().getId(), model); } if (!fAllBundles.containsKey(IPDEBuildConstants.BUNDLE_OSGI)) { // implicitly add it IMonitorModelBase model = MonitorRegistry.findModel(IPDEBuildConstants.BUNDLE_OSGI); if (model != null) { fModels.put(model, "default:default"); // $NON-NLS-1$ fAllBundles.put(IPDEBuildConstants.BUNDLE_OSGI, model); } else { String message = MDEMessages.EquinoxLaunchConfiguration_oldTarget; throw new CoreException(LauncherUtils.createErrorStatus(message)); } } super.preLaunchCheck(configuration, launch, monitor); }