private Map promptForOverwrite(List plugins, List locales) { Map overwrites = new HashMap(); if (overwriteWithoutAsking) return overwrites; for (Iterator iter = plugins.iterator(); iter.hasNext(); ) { IPluginModelBase plugin = (IPluginModelBase) iter.next(); for (Iterator it = locales.iterator(); it.hasNext(); ) { Locale locale = (Locale) it.next(); IProject project = getNLProject(plugin, locale); if (project.exists() && !overwrites.containsKey(project.getName())) { boolean overwrite = MessageDialog.openConfirm( PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.InternationalizeWizard_NLSFragmentGenerator_overwriteTitle, NLS.bind( PDEUIMessages.InternationalizeWizard_NLSFragmentGenerator_overwriteMessage, pluginName(plugin, locale))); overwrites.put(project.getName(), overwrite ? OVERWRITE : null); } } } return overwrites; }
private void validateIdentifierAttribute(Element element, Attr attr, ISchemaAttribute attInfo) { int severity = CompilerFlags.getFlag(fProject, CompilerFlags.P_UNKNOWN_IDENTIFIER); if (severity != CompilerFlags.IGNORE) { String value = attr.getValue(); String basedOn = attInfo.getBasedOn(); // only validate if we have a valid value and basedOn value if (value != null && basedOn != null && value.length() > 0 && basedOn.length() > 0) { Map attributes = PDESchemaHelper.getValidAttributes(attInfo); if (!attributes.containsKey(value)) { // report error if we are missing something report( NLS.bind( MDECoreMessages.ExtensionsErrorReporter_unknownIdentifier, (new String[] {attr.getValue(), attr.getName()})), getLine(element, attr.getName()), severity, MDEMarkerFactory.CAT_OTHER); } } } }