/** * getProperty method * @return java.lang.Object * * Returns the object property desciped by the propertyName * */ public Object getProperty(String propertyName) { return getDocument().getProperty(propertyName); }
private String getNamespace(CMNode cmNode) { String namespace = null; CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument"); //$NON-NLS-1$ if (cmDocument != null) { namespace = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ } return namespace; }
protected String getFallbackNamepaceURI(CMElementDeclaration ed) { String fallbackNamepaceURI = null; CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$ if (cmDocument != null) { fallbackNamepaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ } return fallbackNamepaceURI; }
/** * getProperty method * * @return java.lang.Object * * Returns the object property desciped by the propertyName * */ public Object getProperty(String propertyName) { if (propertyName != null && propertyName.equals(JSP12TLDNames.DESCRIPTION)) { return getDescription(); // return attribute description } else if (propertyName.equals(TLDDocument.CM_KIND)) { return TLDDocument.JSP_TLD; } else if (propertyName.equals(JSP12TLDNames.SMALL_ICON) || propertyName.equals(JSP12TLDNames.LARGE_ICON)) { return getOwnerDocument().getProperty(propertyName); } return null; }
public boolean isXSIType(CMAttributeDeclaration ad) { boolean result = false; if (ad.getNodeName().equals("type")) //$NON-NLS-1$ { CMDocument cmDocument = (CMDocument)ad.getProperty("CMDocument"); //$NON-NLS-1$ if (cmDocument != null) { String namespaceName = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ if (namespaceName != null && namespaceName.equals("http://www.w3.org/2001/XMLSchema-instance")) //$NON-NLS-1$ { result = true; } } } return result; }
protected String getKey(CMNode cmNode) { String key = cmNode.getNodeName(); CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument"); //$NON-NLS-1$ if (cmDocument != null) { String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ if (namespaceURI != null) { key = "[" + namespaceURI + "]" + key; //$NON-NLS-1$ //$NON-NLS-2$ } } return key; }
/** * */ 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; }
return smallIconURL; return getOwnerDocument().getProperty(propertyName);
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$ } } } }
public static void loadAnnotationsForGrammar(String publicId, CMDocument cmDocument) { List annotationFiles = ContentModelManager.getInstance().getAnnotationFilesInfos(publicId); AnnotationMap map = (AnnotationMap) cmDocument.getProperty("annotationMap"); //$NON-NLS-1$ if (map != null) { for (Iterator i = annotationFiles.iterator(); i.hasNext();) { try { AnnotationFileInfo annotationFileInfo = (AnnotationFileInfo) i.next(); AnnotationFileParser parser = new AnnotationFileParser(); parser.parse(map, annotationFileInfo); } catch (Exception e) { Logger.logException(e); } } } } }
if (cmDocument != null) excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
if (cmDocument != null) String excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ if (excludedURI != null) if (cmDocument != null) String targetNamespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ String specifiedURI = getURIForContentSpecification(string); if (specifiedURI != null && !targetNamespaceURI.equals(specifiedURI))
if (uri == null || uri.startsWith("##") || uri.equals(parentCMDocument.getProperty(targetNSProperty))) //$NON-NLS-1$
List namespaceInfoList = (List) document.getProperty("http://org.eclipse.wst/cm/properties/namespaceInfo"); //$NON-NLS-1$ NamespaceInfo info = (NamespaceInfo) namespaceInfoList.get(0); if ((uriField.getText().trim().length() == 0) && (info.uri != null)) {
if (cmDocument != null) String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$ if (namespaceURI != null)
public void createNamespaceInfoList() { List result = new Vector(); if (cmDocument != null) { result = (List) cmDocument.getProperty("http://org.eclipse.wst/cm/properties/completeNamespaceInfo"); //$NON-NLS-1$ if (result != null) { int size = result.size();
/** * Get the taginfo for this current element * * @return String taginfo if it exists, null otherwise */ private String getTagInfo() { if (getOwnerDocument().supports("annotationMap")) { //$NON-NLS-1$ AnnotationMap map = (AnnotationMap) getOwnerDocument().getProperty("annotationMap"); //$NON-NLS-1$ String spec = getSpec(); String result = map.getProperty(spec, "tagInfo"); //$NON-NLS-1$ return result; // bug88336 no need to restore markers // return StringUtils.restoreMarkers(result); // return tag info } return null; }
String defaultRootName = (String) (generator.getCMDocument()).getProperty("http://org.eclipse.wst/cm/properties/defaultRootName"); //$NON-NLS-1$ int defaultRootIndex = -1; combo.removeAll();