/** * */ protected String createContentSpecificationForCMElementDeclaration(CMElementDeclaration ed) { CMDocument document = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$ String uri = document != null ? (String)document.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") : null; //$NON-NLS-1$ String string = ed.getNodeName(); if (uri != null) { string = "[" + uri + "]" + string; //$NON-NLS-1$ //$NON-NLS-2$ } return string; }
public void debugPrint(Collection collection) { for (Iterator iter = collection.iterator(); iter.hasNext(); ) { CMDocument cmDocument = (CMDocument)iter.next(); System.out.println("-----------------------------------------------"); //$NON-NLS-1$ System.out.println("cmDocument (" + cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") +")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ CMNamedNodeMapImpl elementMap = (CMNamedNodeMapImpl)cmDocument.getElements(); int size = elementMap.getLength(); for (int i = 0; i < size; i++) { CMElementDeclaration ed = (CMElementDeclaration)elementMap.item(i); CMDescriptionBuilder builder = new CMDescriptionBuilder(); System.out.println(" ELEMENT " + ed.getNodeName() + " = " + builder.buildDescription(ed)); //$NON-NLS-1$ //$NON-NLS-2$ } } } }
String name = rootCMElementDeclaration.getNodeName(); if (namespaceInfoList.size() > 0) { NamespaceInfo info = (NamespaceInfo) namespaceInfoList.get(0);
CMElementDeclaration ed = createElementDeclaration(document, (IFile) tagfiles[i]); if (ed != null) { document.fElements.setNamedItem(ed.getNodeName(), ed);
CMElementDeclaration ed = createElementDeclaration(document, child); if (ed != null) { document.fElements.setNamedItem(ed.getNodeName(), ed);
/** * getElements method * @return CMNamedNodeMap * * Returns CMNamedNodeMap of ElementDeclaration */ public CMNamedNodeMap getElements() { if (fElements == null) { int length = getDocument().getElements().getLength(); CMNamedNodeMapImpl elements = new CMNamedNodeMapImpl(); for (int i = 0; i < length; i++) { CMElementDeclaration ed = new CMElementDeclarationWrapperImpl(fPrefix, (CMElementDeclaration) getDocument().getElements().item(i)); elements.setNamedItem(ed.getNodeName(), ed); } fElements = elements; } return fElements; }
addPCDATAProposal(parentDecl.getNodeName(), contentAssistRequest);