Search in sources :

Example 21 with AnnotationBackedDescriptor

use of com.intellij.lang.javascript.flex.AnnotationBackedDescriptor in project intellij-plugins by JetBrains.

the class ClassBackedElementDescriptor method appendSuperClassDescriptors.

private void appendSuperClassDescriptors(final Map<String, AnnotationBackedDescriptor> map, final Map<String, Map<String, AnnotationBackedDescriptor>> packageToInternalDescriptors, final PsiElement _clazz, @Nullable Set<JSClass> visited) {
    if (_clazz instanceof JSClass) {
        final JSClass clazz = (JSClass) _clazz;
        ClassBackedElementDescriptor parentDescriptor = context.getElementDescriptor(clazz.getName(), clazz.getQualifiedName());
        if (parentDescriptor == null) {
            parentDescriptor = new ClassBackedElementDescriptor(null, clazz.getQualifiedName(), context, project);
        }
        parentDescriptor.ensureDescriptorsMapsInitialized(clazz, visited);
        map.putAll(parentDescriptor.myDescriptors);
        for (final Map.Entry<String, Map<String, AnnotationBackedDescriptor>> entry : parentDescriptor.myPackageToInternalDescriptors.entrySet()) {
            Map<String, AnnotationBackedDescriptor> descriptorMap = packageToInternalDescriptors.get(entry.getKey());
            if (descriptorMap == null) {
                descriptorMap = new THashMap<>();
                packageToInternalDescriptors.put(entry.getKey(), descriptorMap);
            }
            descriptorMap.putAll(entry.getValue());
        }
    }
}
Also used : MxmlJSClass(com.intellij.javascript.flex.mxml.MxmlJSClass) THashMap(gnu.trove.THashMap) AnnotationBackedDescriptor(com.intellij.lang.javascript.flex.AnnotationBackedDescriptor)

Aggregations

AnnotationBackedDescriptor (com.intellij.lang.javascript.flex.AnnotationBackedDescriptor)21 XmlAttributeDescriptor (com.intellij.xml.XmlAttributeDescriptor)7 PsiElement (com.intellij.psi.PsiElement)6 XmlElementDescriptor (com.intellij.xml.XmlElementDescriptor)6 Nullable (org.jetbrains.annotations.Nullable)6 MxmlJSClass (com.intellij.javascript.flex.mxml.MxmlJSClass)5 ClassBackedElementDescriptor (com.intellij.javascript.flex.mxml.schema.ClassBackedElementDescriptor)5 TextRange (com.intellij.openapi.util.TextRange)4 XmlBackedJSClassImpl (com.intellij.lang.javascript.flex.XmlBackedJSClassImpl)3 JSClass (com.intellij.lang.javascript.psi.ecmal4.JSClass)3 PsiMetaData (com.intellij.psi.meta.PsiMetaData)3 XmlTag (com.intellij.psi.xml.XmlTag)3 AnyXmlAttributeDescriptor (com.intellij.xml.impl.schema.AnyXmlAttributeDescriptor)3 InvalidPropertyException (com.intellij.flex.uiDesigner.InvalidPropertyException)2 XmlAttributeValueProvider (com.intellij.flex.uiDesigner.mxml.XmlAttributeValueProvider)2 JavaScriptSupportLoader (com.intellij.lang.javascript.JavaScriptSupportLoader)2 JSCommonTypeNames (com.intellij.lang.javascript.psi.JSCommonTypeNames)2 JSAttribute (com.intellij.lang.javascript.psi.ecmal4.JSAttribute)2 JSAttributeNameValuePair (com.intellij.lang.javascript.psi.ecmal4.JSAttributeNameValuePair)2 JSReferenceSet (com.intellij.lang.javascript.psi.impl.JSReferenceSet)2