示例#1
0
 @NotNull
 public Map<String, String> getLocalNamespaceDeclarations() {
   Map<String, String> namespaces = new THashMap<String, String>();
   for (final XmlAttribute attribute : getAttributes()) {
     if (!attribute.isNamespaceDeclaration() || attribute.getValue() == null) continue;
     // xmlns -> "", xmlns:a -> a
     final String localName = attribute.getLocalName();
     namespaces.put(localName.equals(attribute.getName()) ? "" : localName, attribute.getValue());
   }
   return namespaces;
 }
示例#2
0
  public String getAttributeValue(String qname) { // todo ?
    Map<String, String> map = myAttributeValueMap;
    while (map == null) {
      getAttributes();
      map = myAttributeValueMap;

      if (map == null) {
        myAttributes = null;
      }
    }
    return map.get(qname);
  }
示例#3
0
 public static void putInfo(PsiFile psiFile, Map<String, String> info) {
   info.put("fileName", psiFile.getName());
   info.put("fileType", psiFile.getFileType().toString());
 }
示例#4
0
 protected void cacheOneAttributeValue(
     String name, String value, final Map<String, String> attributesValueMap) {
   attributesValueMap.put(name, value);
 }