com.intellij.xml.XmlAttributeDescriptor Java Examples
The following examples show how to use
com.intellij.xml.XmlAttributeDescriptor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WeexAttrDescriptorProvider.java From weex-language-support with MIT License | 6 votes |
@Override public XmlAttributeDescriptor[] getAttributeDescriptors(XmlTag xmlTag) { if (!WeexFileUtil.isOnWeexFile(xmlTag)) { return new XmlAttributeDescriptor[0]; } final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); WeexTag tag = DirectiveLint.getWeexTag(xmlTag.getName()); if (tag == null) { return new XmlAttributeDescriptor[0]; } for (String attributeName : tag.getExtAttrs()) { result.put(attributeName, new WeexAttrDescriptor(attributeName, tag.getAttribute(attributeName).valueEnum, null)); } return result.values().toArray(new XmlAttributeDescriptor[result.size()]); }
Example #2
Source File: ISMLTagDescriptor.java From intellij-demandware with MIT License | 6 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { if (context != null) { final String tagName = context.getName(); if (attrMap.containsKey(tagName)) { final String[] attrs = attrMap.get(tagName).split(","); final XmlAttributeDescriptor[] result = new XmlAttributeDescriptor[attrs.length]; for (int i = 0; i < attrs.length; i++) { result[i] = new ISMLXmlAttributeDescriptor(tagName, attrs[i]); } return result; } } final XmlAttributeDescriptor[] commonAttributes = HtmlNSDescriptorImpl.getCommonAttributeDescriptors(context); return RelaxedHtmlFromSchemaElementDescriptor.addAttrDescriptorsForFacelets(context, commonAttributes); }
Example #3
Source File: RTClassTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { // final Project project = xmlTag.getProject(); // final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); // result.put(RTTagDescriptorsProvider.DEPENDENCY, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.DEPENDENCY)); // result.put(RTTagDescriptorsProvider.AS, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.AS)); // <rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/> // return result.values().toArray(new XmlAttributeDescriptor[result.size()]); return new XmlAttributeDescriptor[0]; }
Example #4
Source File: ViewHelperXmlElementDescriptor.java From idea-php-typo3-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { Collection<XmlAttributeDescriptor> attributeDescriptors = new ArrayList<>(); viewHelper.arguments.forEach((s, viewHelperArgument) -> { attributeDescriptors.add(new ViewHelperArgumentDescriptor(viewHelper, viewHelperArgument)); }); final XmlAttributeDescriptor[] commonAttributes = HtmlNSDescriptorImpl.getCommonAttributeDescriptors(context); return ArrayUtil.mergeArrays(attributeDescriptors.toArray(new XmlAttributeDescriptor[0]), commonAttributes); }
Example #5
Source File: RTAttributeDescriptorsProvider.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributeDescriptors(XmlTag xmlTag) { if (xmlTag instanceof HtmlTag /*&& RTFileUtil.hasRTExt(xmlTag.getContainingFile())*/) { final Project project = xmlTag.getProject(); if (RTActionUtil.isRTEnabled(project)) { final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); for (String attr : RTAttributes.ALL_ATTRIBUTES) { result.put(attr, new RTXmlAttributeDescriptor(attr)); } // result.put("rt-repeat", new RTXmlAttributeDescriptor("rt-repeat")); // x in [javascript] // result.put("rt-if", new RTXmlAttributeDescriptor("rt-if")); //[javascript] // result.put("rt-scope", new RTXmlAttributeDescriptor("rt-scope")); //a as b;c as d // result.put("rt-class", new RTXmlAttributeDescriptor("rt-class")); // [javascript] // result.put("rt-props", new RTXmlAttributeDescriptor("rt-props")); // [javascript] return result.values().toArray(new XmlAttributeDescriptor[result.size()]); // return new XmlAttributeDescriptor[]{ // new AnyXmlAttributeDescriptor("rt-if"), // new AnyXmlAttributeDescriptor("rt-repeat"), // new AnyXmlAttributeDescriptor("rt-scope"), // new AnyXmlAttributeDescriptor("rt-props"), // new AnyXmlAttributeDescriptor("rt-class"), // new AnyXmlAttributeDescriptor("rt-require") // }; } } return XmlAttributeDescriptor.EMPTY; }
Example #6
Source File: RTAttributeDescriptorsProvider.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(final String attrName, XmlTag xmlTag) { if (xmlTag != null) { if (RTAttributes.isRTAttribute(attrName)) { return new AnyXmlAttributeDescriptor(attrName); } } return null; }
Example #7
Source File: VueAttributeDescriptorProvider.java From vue-for-idea with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributeDescriptors(XmlTag xmlTag) { if (xmlTag == null) { return XmlAttributeDescriptor.EMPTY; } if (vueComponent == null) { vueComponent = VueComponent.getInstance(xmlTag.getProject()); } return vueComponent.getAttrArray(); }
Example #8
Source File: VueAttributeDescriptorProvider.java From vue-for-idea with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(String attrName, XmlTag tag) { if (tag != null && attrName != null) { if (vueComponent == null) { vueComponent = VueComponent.getInstance(tag.getProject()); } return vueComponent.getAttrLookup().get(attrName); } return null; }
Example #9
Source File: VueComponent.java From vue-for-idea with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void initComponent() { super.initComponent(); directiveNames.forEach((name)-> attrs.add(new VueAttributeDescriptor("v-"+name)) ); jsEventNames.forEach((name)-> attrs.add(new VueAttributeDescriptor("@"+name)) ); attrs.forEach((descriptor)-> attrLookup.put(descriptor.getName(),descriptor) ); attrArray=new XmlAttributeDescriptor[attrs.size()]; attrArray=attrs.toArray(attrArray); }
Example #10
Source File: ISMLTagDescriptor.java From intellij-demandware with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { @Override public boolean value(XmlAttributeDescriptor descriptor) { return attributeName.equals(descriptor.getName()); } }); }
Example #11
Source File: RTRequireTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { @Override public boolean value(XmlAttributeDescriptor descriptor) { return attributeName.equals(descriptor.getName()); } }); }
Example #12
Source File: RTClassTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return new AnyXmlAttributeDescriptor(attributeName); // return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { // @Override // public boolean value(XmlAttributeDescriptor descriptor) { // return attributeName.equals(descriptor.getName()); // } // }); }
Example #13
Source File: RTImportTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { // final Project project = xmlTag.getProject(); final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); result.put(RTTagDescriptorsProvider.NAME, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.NAME)); result.put(RTTagDescriptorsProvider.AS, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.AS)); result.put(RTTagDescriptorsProvider.FROM, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.FROM)); // <rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/> return result.values().toArray(new XmlAttributeDescriptor[result.size()]); // return new XmlAttributeDescriptor[0]; }
Example #14
Source File: RTImportTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { @Override public boolean value(XmlAttributeDescriptor descriptor) { return attributeName.equals(descriptor.getName()); } }); }
Example #15
Source File: RTRequireTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { // final Project project = xmlTag.getProject(); final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); result.put(RTTagDescriptorsProvider.DEPENDENCY, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.DEPENDENCY)); result.put(RTTagDescriptorsProvider.AS, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.AS)); // <rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/> return result.values().toArray(new XmlAttributeDescriptor[result.size()]); // return new XmlAttributeDescriptor[0]; }
Example #16
Source File: RTRequireTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { @Override public boolean value(XmlAttributeDescriptor descriptor) { return attributeName.equals(descriptor.getName()); } }); }
Example #17
Source File: RTAttributeDescriptorsProvider.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributeDescriptors(XmlTag xmlTag) { if (xmlTag instanceof HtmlTag /*&& RTFileUtil.hasRTExt(xmlTag.getContainingFile())*/) { final Project project = xmlTag.getProject(); if (RTActionUtil.isRTEnabled(project)) { final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); for (String attr : RTAttributes.ALL_ATTRIBUTES) { result.put(attr, new RTXmlAttributeDescriptor(attr)); } // result.put("rt-repeat", new RTXmlAttributeDescriptor("rt-repeat")); // x in [javascript] // result.put("rt-if", new RTXmlAttributeDescriptor("rt-if")); //[javascript] // result.put("rt-scope", new RTXmlAttributeDescriptor("rt-scope")); //a as b;c as d // result.put("rt-class", new RTXmlAttributeDescriptor("rt-class")); // [javascript] // result.put("rt-props", new RTXmlAttributeDescriptor("rt-props")); // [javascript] return result.values().toArray(new XmlAttributeDescriptor[result.size()]); // return new XmlAttributeDescriptor[]{ // new AnyXmlAttributeDescriptor("rt-if"), // new AnyXmlAttributeDescriptor("rt-repeat"), // new AnyXmlAttributeDescriptor("rt-scope"), // new AnyXmlAttributeDescriptor("rt-props"), // new AnyXmlAttributeDescriptor("rt-class"), // new AnyXmlAttributeDescriptor("rt-require") // }; } } return XmlAttributeDescriptor.EMPTY; }
Example #18
Source File: RTAttributeDescriptorsProvider.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(final String attrName, XmlTag xmlTag) { if (xmlTag != null) { if (RTAttributes.isRTAttribute(attrName)) { return new AnyXmlAttributeDescriptor(attrName); } } return null; }
Example #19
Source File: ViewHelperXmlElementDescriptor.java From idea-php-typo3-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(String attributeName, @Nullable XmlTag context) { if (!viewHelper.arguments.containsKey(attributeName)) { return null; } return new ViewHelperArgumentDescriptor(viewHelper, viewHelper.arguments.get(attributeName)); }
Example #20
Source File: RTImportTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { @Override public boolean value(XmlAttributeDescriptor descriptor) { return attributeName.equals(descriptor.getName()); } }); }
Example #21
Source File: RTImportTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { // final Project project = xmlTag.getProject(); final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); result.put(RTTagDescriptorsProvider.NAME, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.NAME)); result.put(RTTagDescriptorsProvider.AS, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.AS)); result.put(RTTagDescriptorsProvider.FROM, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.FROM)); // <rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/> return result.values().toArray(new XmlAttributeDescriptor[result.size()]); // return new XmlAttributeDescriptor[0]; }
Example #22
Source File: RTClassTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(@NonNls final String attributeName, @Nullable XmlTag context) { return new AnyXmlAttributeDescriptor(attributeName); // return ContainerUtil.find(getAttributesDescriptors(context), new Condition<XmlAttributeDescriptor>() { // @Override // public boolean value(XmlAttributeDescriptor descriptor) { // return attributeName.equals(descriptor.getName()); // } // }); }
Example #23
Source File: FluidTagNameProvider.java From idea-php-typo3-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributeDescriptors(XmlTag context) { XmlElementDescriptor descriptor = getDescriptor(context); if (descriptor == null) { return XmlAttributeDescriptor.EMPTY; } return descriptor.getAttributesDescriptors(context); }
Example #24
Source File: RTClassTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { // final Project project = xmlTag.getProject(); // final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); // result.put(RTTagDescriptorsProvider.DEPENDENCY, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.DEPENDENCY)); // result.put(RTTagDescriptorsProvider.AS, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.AS)); // <rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/> // return result.values().toArray(new XmlAttributeDescriptor[result.size()]); return new XmlAttributeDescriptor[0]; }
Example #25
Source File: FluidTagNameProvider.java From idea-php-typo3-plugin with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(String attributeName, XmlTag context) { XmlElementDescriptor descriptor = getDescriptor(context); if (descriptor == null) { return null; } return descriptor.getAttributeDescriptor(attributeName, context); }
Example #26
Source File: WeexAttrDescriptorProvider.java From weex-language-support with MIT License | 5 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(String s, XmlTag xmlTag) { if (!WeexFileUtil.isOnWeexFile(xmlTag)) { return null; } WeexTag tag = DirectiveLint.getWeexTag(xmlTag.getName()); if (tag == null) { return null; } if (tag.getExtAttrs().contains(s)) { return new WeexAttrDescriptor(s, tag.getAttribute(s).valueEnum, null); } return null; }
Example #27
Source File: RTRequireTagDescriptor.java From react-templates-plugin with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { // final Project project = xmlTag.getProject(); final Map<String, XmlAttributeDescriptor> result = new LinkedHashMap<String, XmlAttributeDescriptor>(); result.put(RTTagDescriptorsProvider.DEPENDENCY, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.DEPENDENCY)); result.put(RTTagDescriptorsProvider.AS, new RTXmlAttributeDescriptor2(RTTagDescriptorsProvider.AS)); // <rt-require dependency="./CodeMirrorEditor" as="CodeEditor"/> return result.values().toArray(new XmlAttributeDescriptor[result.size()]); // return new XmlAttributeDescriptor[0]; }
Example #28
Source File: WeexTagDescriptor.java From weex-language-support with MIT License | 5 votes |
@Override public XmlAttributeDescriptor[] getAttributesDescriptors(@Nullable XmlTag context) { XmlAttributeDescriptor[] attributeDescriptors = HtmlNSDescriptorImpl.getCommonAttributeDescriptors(context); XmlAttributeDescriptor[] customAttributes = new XmlAttributeDescriptor[1]; customAttributes[0] = new AnyXmlAttributeDescriptor("weex"); return ArrayUtil.mergeArrays(attributeDescriptors, customAttributes); }
Example #29
Source File: AfxFusionElementDescriptorProvider.java From intellij-neos with GNU General Public License v3.0 | 4 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(String attributeName, @Nullable XmlTag context) { return null; }
Example #30
Source File: ViewHelperXmlElementDescriptor.java From idea-php-typo3-plugin with MIT License | 4 votes |
@Nullable @Override public XmlAttributeDescriptor getAttributeDescriptor(XmlAttribute attribute) { return getAttributeDescriptor(attribute.getName(), attribute.getParent()); }