private void validateInstallHandler(Element element) { NodeList elements = getChildrenByName(element, "install-handler"); //$NON-NLS-1$ if (elements.getLength() > 0) { if (fMonitor.isCanceled()) return; Element handler = (Element) elements.item(0); NamedNodeMap attributes = handler.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (!name.equals("library") && !name.equals("handler")) //$NON-NLS-1$ //$NON-NLS-2$ reportUnknownAttribute(handler, name, CompilerFlags.ERROR); } reportExtraneousElements(elements, 1); } }
private void validateInstallHandler(Element element) { NodeList elements = getChildrenByName(element, "install-handler"); //$NON-NLS-1$ if (elements.getLength() > 0) { if (fMonitor.isCanceled()) return; Element handler = (Element)elements.item(0); NamedNodeMap attributes = handler.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (!name.equals("library") && !name.equals("handler")) //$NON-NLS-1$ //$NON-NLS-2$ reportUnknownAttribute(handler, name, CompilerFlags.ERROR); } reportExtraneousElements(elements, 1); } }
private void validateRequires(Element parent) { NodeList list = getChildrenByName(parent, "requires"); //$NON-NLS-1$ if (list.getLength() > 0) { validateImports((Element) list.item(0)); reportExtraneousElements(list, 1); } }
private void validateRequires(Element parent) { NodeList list = getChildrenByName(parent, "requires"); //$NON-NLS-1$ if (list.getLength() > 0) { validateImports((Element)list.item(0)); reportExtraneousElements(list, 1); } }
private void validateURLElement(Element parent) { NodeList list = getChildrenByName(parent, "url"); //$NON-NLS-1$ if (list.getLength() > 0) { Element url = (Element) list.item(0); validateUpdateURL(url); validateDiscoveryURL(url); reportExtraneousElements(list, 1); } }
private void validateURLElement(Element parent) { NodeList list = getChildrenByName(parent, "url"); //$NON-NLS-1$ if (list.getLength() > 0) { Element url = (Element)list.item(0); validateUpdateURL(url); validateDiscoveryURL(url); reportExtraneousElements(list, 1); } }
private void validateLicense(Element parent) { NodeList list = getChildrenByName(parent, "license"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element)list.item(0); validateElementWithContent((Element)list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateUpdateURL(Element parent) { NodeList list = getChildrenByName(parent, "update"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element update = (Element) list.item(0); assertAttributeDefined(update, "url", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = update.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(update, "url"); //$NON-NLS-1$ } else if (!name.equals("label")) { //$NON-NLS-1$ reportUnknownAttribute(update, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateUpdateURL(Element parent) { NodeList list = getChildrenByName(parent, "update"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element update = (Element)list.item(0); assertAttributeDefined(update, "url", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = update.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(update, "url"); //$NON-NLS-1$ } else if (!name.equals("label")) { //$NON-NLS-1$ reportUnknownAttribute(update, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateCopyright(Element parent) { NodeList list = getChildrenByName(parent, "copyright"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element)list.item(0); validateElementWithContent((Element)list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateLicense(Element parent) { NodeList list = getChildrenByName(parent, "license"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element) list.item(0); validateElementWithContent((Element) list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr) attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateDescription(Element parent) { NodeList list = getChildrenByName(parent, "description"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element) list.item(0); validateElementWithContent((Element) list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr) attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateDescription(Element parent) { NodeList list = getChildrenByName(parent, "description"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element)list.item(0); validateElementWithContent((Element)list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateCopyright(Element parent) { NodeList list = getChildrenByName(parent, "copyright"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element) list.item(0); validateElementWithContent((Element) list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr) attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }