private void validatePlugins(Element parent) { NodeList list = getChildrenByName(parent, "plugin"); //$NON-NLS-1$ for (int i = 0; i < list.getLength(); i++) { if (fMonitor.isCanceled()) return; Element plugin = (Element) list.item(i); assertAttributeDefined(plugin, "id", CompilerFlags.ERROR); //$NON-NLS-1$ assertAttributeDefined(plugin, "version", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = plugin.getAttributes(); boolean isFragment = plugin.getAttribute("fragment").equals("true"); //$NON-NLS-1$ //$NON-NLS-2$ for (int j = 0; j < attributes.getLength(); j++) { Attr attr = (Attr) attributes.item(j); String name = attr.getName(); if (name.equals("id")) { //$NON-NLS-1$ validatePluginExists(plugin, attr, isFragment); } else if (name.equals("version")) { //$NON-NLS-1$ validateVersionAttribute(plugin, attr); validateVersion(plugin, attr); } else if (name.equals("fragment") || name.equals("unpack")) { //$NON-NLS-1$ //$NON-NLS-2$ validateBoolean(plugin, attr); } else if (!name.equals("os") && !name.equals("ws") && !name.equals("nl") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ && !name.equals("arch") && !name.equals("download-size") //$NON-NLS-1$ //$NON-NLS-2$ && !name.equals("install-size") && !name.equals("filter")) { //$NON-NLS-1$ //$NON-NLS-2$ reportUnknownAttribute(plugin, name, CompilerFlags.ERROR); } } validateUnpack(plugin); } }