Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
299,700
boolean () { return true; }
askParentDescriptorViaXsi
299,701
String () { String ns = getNS(); if (ns != null && !ns.isEmpty()) { return ns + ":" + getName(); } return getName(); }
getQualifiedName
299,702
String () { return isQualifiedForm() ? getQualifiedName() : getName(); }
getDefaultName
299,703
boolean () { String value = myDescriptorTag.getAttributeValue("form"); if (value == null) { final PsiFile psiFile = myDescriptorTag.getContainingFile(); XmlTag rootTag = psiFile instanceof XmlFile ?((XmlFile)psiFile).getRootTag():null; if (rootTag != null) { value = rootTag.getAttributeValue(ELEMENT_FORM_DEFAULT); } } ...
isQualifiedForm
299,704
boolean () { return isAbstractDeclaration(myDescriptorTag); }
isAbstract
299,705
Boolean (final XmlTag descriptorTag) { return Boolean.valueOf(descriptorTag.getAttributeValue("abstract")); }
isAbstractDeclaration
299,706
void (final Validator<XmlTag> validator) { myValidator = validator; }
setValidator
299,707
void (@NotNull XmlTag context, @NotNull ValidationHost host) { Validator<XmlTag> validator = myValidator; if (validator != null) { validator.validate(context, host); } }
validate
299,708
PsiReference[] (XmlTag xmlTag, @NotNull String text) { XmlTagValue value = xmlTag.getValue(); XmlText[] elements = value.getTextElements(); if (elements.length == 0 || xmlTag.getSubTags().length > 0) return PsiReference.EMPTY_ARRAY; return new XmlEnumeratedReferenceSet(xmlTag, this).getPsiReferences(); }
getValueReferences
299,709
boolean (final String namespace, final XmlTag context) { final TypeDescriptor type = getType(context); if (type instanceof ComplexTypeDescriptor typeDescriptor) { return typeDescriptor.canContainTag("a", namespace, context) || typeDescriptor.getNsDescriptor().hasSubstitutions() || XmlUtil.nsFromTemplateFramework(namesp...
allowElementsFromNamespace
299,710
String () { String namespace; try { namespace = getNamespace(); } catch (PsiInvalidElementAccessException e) { namespace = "!!!Invalid!!!"; } return getName() + " (" + namespace + ")"; }
toString
299,711
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; XmlElementDescriptorImpl that = (XmlElementDescriptorImpl)o; if (myDescriptorTag != null ? !myDescriptorTag.equals(that.myDescriptorTag) : that.myDescriptorTag != null) return false; return true; }
equals
299,712
int () { return myDescriptorTag != null ? myDescriptorTag.hashCode() : 0; }
hashCode
299,713
NullElementDescriptor () { return INSTANCE; }
getInstance
299,714
String () { return null; }
getQualifiedName
299,715
String () { return null; }
getDefaultName
299,716
XmlElementDescriptor[] (XmlTag context) { return XmlElementDescriptor.EMPTY_ARRAY; }
getElementsDescriptors
299,717
XmlElementDescriptor (XmlTag childTag, XmlTag contextTag) { return null; }
getElementDescriptor
299,718
XmlAttributeDescriptor[] (final XmlTag context) { return XmlAttributeDescriptor.EMPTY; }
getAttributesDescriptors
299,719
XmlAttributeDescriptor (String attributeName, final XmlTag context) { return null; }
getAttributeDescriptor
299,720
XmlAttributeDescriptor (XmlAttribute attribute) { return null; }
getAttributeDescriptor
299,721
XmlNSDescriptor () { return null; }
getNSDescriptor
299,722
XmlElementsGroup () { return null; }
getTopGroup
299,723
int () { return 0; }
getContentType
299,724
String () { return null; }
getDefaultValue
299,725
PsiElement () { return null; }
getDeclaration
299,726
String (PsiElement context) { return null; }
getName
299,727
String () { return null; }
getName
299,728
void (PsiElement element) { }
init
299,729
List<XmlElementsGroup> () { return mySubGroups; }
getSubGroups
299,730
XmlElementDescriptor () { throw new RuntimeException("not a leaf group"); }
getLeafDescriptor
299,731
void (XmlElementsGroup group) { mySubGroups.add(group); }
addSubGroup
299,732
String () { return getGroupType().toString(); }
toString
299,733
String (PsiElement context) { return myDescriptorTag.getName(); }
getName
299,734
XmlNSDescriptor () { XmlNSDescriptor nsDescriptor = NSDescriptor; if (nsDescriptor ==null) { final XmlFile file = XmlUtil.getContainingFile(getType(null).getDeclaration()); if(file == null) return null; final XmlDocument document = file.getDocument(); if(document == null) return null; NSDescriptor = nsDescriptor = (Xml...
getNSDescriptor
299,735
ComplexTypeDescriptor (XmlElement context) { return myType; }
getType
299,736
String () { XmlTag rootTag = ((XmlFile)getType(null).getDeclaration().getContainingFile()).getDocument().getRootTag(); if (QUALIFIED_ATTR_VALUE.equals(rootTag.getAttributeValue("elementFormDefault"))) { return getQualifiedName(); } return getName(); }
getDefaultName
299,737
boolean () { return false; }
askParentDescriptorViaXsi
299,738
boolean (final Object o) { if (this == o) return true; if (!(o instanceof XmlElementDescriptorByType that)) return false; if (myType != null ? !myType.equals(that.myType) : that.myType != null) return false; return true; }
equals
299,739
int () { return (myType != null ? myType.hashCode() : 0); }
hashCode
299,740
void (final @NotNull XmlTag tag, @NotNull ValidationHost host) { if (!isFromSchemaNs(tag)) return; final boolean hasRefAttribute = tag.getAttributeValue(REF_ATTR_NAME) != null; if (hasRefAttribute) { for (XmlAttribute attr : tag.getAttributes()) { final String name = attr.getName(); if (name.indexOf(':') == -1 && !MIN_...
validate
299,741
void (final @NotNull XmlTag tag, @NotNull ValidationHost host) { if (!isFromSchemaNs(tag)) return; if (tag.getAttributeValue(REF_ATTR_NAME) == null && tag.getAttributeValue(NAME_ATTR_NAME) == null) { host.addMessage( tag, XmlPsiBundle.message("xml.schema.validation.name.or.ref.should.present"), ValidationHost.ErrorType...
validate
299,742
String (final @NotNull XmlTag t) { return t.getAttributeValue(NAME_ATTR_NAME); }
getName
299,743
String (final @NotNull XmlTag t, @NotNull String name) { return name; }
getNameKey
299,744
PsiElement (final @NotNull XmlTag t) { return t.getAttribute(NAME_ATTR_NAME, null).getValueElement(); }
getNodeForMessage
299,745
void (final @NotNull XmlTag tag, @NotNull ValidationHost host) { if (!isFromSchemaNs(tag)) return; final String nsPrefix = tag.getNamespacePrefix(); final XmlTag[] attrDeclTags = tag.findSubTags((nsPrefix.length() > 0 ? nsPrefix + ":" : "") + "attribute"); XmlUtil.doDuplicationCheckForElements( attrDeclTags, new HashMa...
validate
299,746
boolean (final XmlTag tag) { return XmlUtil.XML_SCHEMA_URI.equals(tag.getNamespace()); }
isFromSchemaNs
299,747
XmlElementDescriptor (final XmlTag tag) { final XmlElementDescriptor descriptor = super.createElementDescriptor(tag); String localName = tag.getAttributeValue(NAME_ATTR_NAME); if (ELEMENT_TAG_NAME.equals(localName)) { ((XmlElementDescriptorImpl)descriptor).setValidator(ELEMENT_VALIDATOR); } else if (COMPLEX_TYPE_TAG_NA...
createElementDescriptor
299,748
String () { return getDefaultNamespace(); }
toString
299,749
XmlElementsGroup (XmlNSDescriptorImpl descriptor, XmlTag tag) { XmlElementsGroupProcessor processor = new XmlElementsGroupProcessor(descriptor); processor.startProcessing(tag); return processor.getRootGroup(); }
computeGroups
299,750
XmlElementsGroup () { return myGroups.get(0); }
getRootGroup
299,751
String () { return "root"; }
toString
299,752
void (XmlTag tag, String tagName, XmlTag context, XmlTag ref) { XmlElementsGroup.Type type = XmlElementsGroupImpl.getTagType(tag); if (type != null) { XmlElementsGroupImpl group = new XmlElementsGroupImpl(tag, myGroups.peek(), ref); addSubGroup(group); myGroups.push(group); } else if ("element".equals(tagName)) { XmlEl...
tagStarted
299,753
void (XmlTag tag) { if (!myGroups.empty() && XmlElementsGroupImpl.getTagType(tag) != null) { myGroups.pop(); } }
tagFinished
299,754
void (XmlElementsGroup group) { if (!myGroups.empty()) { XmlElementsGroup last = myGroups.peek(); if (last instanceof XmlElementsGroupImpl) { ((XmlElementsGroupImpl)last).addSubGroup(group); } } }
addSubGroup
299,755
XmlTag () { return myTag; }
getDeclaration
299,756
String () { return myTag.getAttributeValue("name"); }
getName
299,757
void (PsiElement element) { myTag = (XmlTag) element; myUse = myTag.getAttributeValue("use"); }
init
299,758
boolean () { return REQUIRED_ATTR_VALUE.equals(myUse); }
isRequired
299,759
boolean (@NonNls String type) { final String attributeValue = getType(); if (attributeValue != null) { if (attributeValue.endsWith(type)) { final String namespacePrefix = myTag.getNamespacePrefix(); if (namespacePrefix.length() > 0) { return attributeValue.equals(namespacePrefix+":"+type); } else { return attributeValu...
hasSimpleSchemaType
299,760
boolean () { return hasSimpleSchemaType("ID"); }
hasIdType
299,761
boolean () { return hasSimpleSchemaType("IDREF"); }
hasIdRefType
299,762
boolean () { return isEnumerated(null); }
isEnumerated
299,763
String (PsiElement context) { String name = getName(); if (context == null) { return name; } final XmlTag rootTag = (((XmlFile) myTag.getContainingFile())).getRootTag(); assert rootTag != null; String targetNs = rootTag.getAttributeValue("targetNamespace"); if (targetNs == null) return name; XmlTag contextTag = (XmlTag...
getName
299,764
boolean (String targetNs, XmlTag contextTag) { boolean attributeShouldBeQualified = false; String contextNs = contextTag.getNamespace(); if (!contextNs.equals(targetNs)) { final XmlElementDescriptor xmlElementDescriptor = contextTag.getDescriptor(); if (xmlElementDescriptor instanceof XmlElementDescriptorImpl elementDe...
shouldBeQualified
299,765
String () { return getName(); }
toString
299,766
void (@Nullable XmlTag myTag, @NotNull XmlFile myFile, @NotNull Set<PsiFile> visited) { if (visited.contains(myFile)) return; visited.add( myFile ); if (myTag == null) return; XmlTag[] tags = myTag.getSubTags(); for (final XmlTag tag : tags) { if (equalsToSchemaName(tag, INCLUDE_TAG_NAME) || equalsToSchemaName(tag, IMP...
collectDependencies
299,767
void (final XmlFile file, final Set<PsiFile> visited) { if (file != null) { final XmlDocument document = file.getDocument(); collectDependencies(document != null ? document.getRootTag():null, file, visited); } }
addDependency
299,768
boolean (@NotNull String name, @NotNull XmlTag context) { final String namespace = context.getNamespaceByPrefix(XmlUtil.findPrefixByQualifiedName(name)); if(namespace.length() > 0){ return checkSchemaNamespace(namespace); } return XSD_PREFIX.equals(XmlUtil.findPrefixByQualifiedName(name)); }
checkSchemaNamespace
299,769
boolean (String namespace) { return XmlUtil.XML_SCHEMA_URI.equals(namespace) || XmlUtil.XML_SCHEMA_URI2.equals(namespace) || XmlUtil.XML_SCHEMA_URI3.equals(namespace); }
checkSchemaNamespace
299,770
boolean (@NotNull XmlTag context) { LOG.assertTrue(context.isValid()); final String namespace = context.getNamespace(); if (namespace.length() > 0) { return checkSchemaNamespace(namespace); } return StringUtil.startsWithConcatenation(context.getName(), XSD_PREFIX, ":"); }
checkSchemaNamespace
299,771
XmlNSDescriptorImpl (XmlTag rootTag, final String name, XmlNSDescriptorImpl defaultNSDescriptor) { if (name == null) return defaultNSDescriptor; final String namespacePrefix = XmlUtil.findPrefixByQualifiedName(name); if (namespacePrefix.length() > 0) { final String namespace = rootTag.getNamespaceByPrefix(namespacePref...
getNSDescriptorToSearchIn
299,772
boolean (String[] tagNames, PsiElementProcessor<? super XmlTag> processor) { return processTagsInNamespaceInner(myTag, tagNames, processor, null); }
processTagsInNamespace
299,773
boolean (final @NotNull XmlTag rootTag, final String[] tagNames, final PsiElementProcessor<? super XmlTag> processor, Set<? super XmlTag> visitedTags) { if (visitedTags == null) visitedTags = new HashSet<>(3); else if (visitedTags.contains(rootTag)) return true; visitedTags.add(rootTag); XmlTag[] tags = rootTag.getSubT...
processTagsInNamespaceInner
299,774
boolean (@NotNull XmlTag tag, @NonNls String schemaName) { return schemaName.equals(tag.getLocalName()) && checkSchemaNamespace(tag); }
equalsToSchemaName
299,775
XmlTag (final XmlTag[] tags, final String specialName, final String name, final XmlTag rootTag, final XmlNSDescriptorImpl descriptor, final HashSet<XmlTag> visited) { for (XmlTag tag : tags) { if (equalsToSchemaName(tag, specialName)) { String attribute = tag.getAttributeValue("name"); if (name.equals(attribute) || nam...
findSpecialTagIn
299,776
XmlNSDescriptorImpl (final XmlTag parentTag) { XmlFile file = getRedefinedElementDescriptorFile(parentTag); if (file != null) { final XmlDocument document = file.getDocument(); final PsiMetaData metaData = document != null ? document.getMetaData():null; if (metaData instanceof XmlNSDescriptorImpl) return (XmlNSDescript...
getRedefinedElementDescriptor
299,777
XmlFile (final XmlTag parentTag) { XmlAttribute attribute = parentTag.getAttribute(XmlUtil.SCHEMA_LOCATION_ATT); if (attribute != null) { XmlAttributeValue element = attribute.getValueElement(); PsiElement psiElement = new URLReference(element).resolve(); if (psiElement instanceof XmlFile) { return ((XmlFile)psiElement...
getRedefinedElementDescriptorFile
299,778
XmlFile () { return myFile; }
getDescriptorFile
299,779
String () { return myTargetNamespace != null ? myTargetNamespace : ""; }
getDefaultNamespace
299,780
XmlElementDescriptor (final XmlTag tag) { return new XmlElementDescriptorImpl(tag); }
createElementDescriptor
299,781
boolean (String localName, String namespace, String fqn, XmlTag context) { final String localAttrName = XmlUtil.findLocalNameByQualifiedName(fqn); if (!localAttrName.equals(localName)) return false; final String attrNamespace = context.getNamespaceByPrefix(XmlUtil.findPrefixByQualifiedName(fqn)); if (attrNamespace.equa...
checkElementNameEquivalence
299,782
TypeDescriptor (XmlTag descriptorTag) { String type = descriptorTag.getAttributeValue("type"); if (type != null) { return getTypeDescriptor(type, descriptorTag); } return findTypeDescriptorImpl(descriptorTag, null, null); }
getTypeDescriptor
299,783
TypeDescriptor (@NotNull String name, XmlTag context) { if(checkSchemaNamespace(name, context)){ final String localNameByQualifiedName = XmlUtil.findLocalNameByQualifiedName(name); if (STD_TYPES.contains(localNameByQualifiedName) && ( name.length() == localNameByQualifiedName.length() || UNDECLARED_STD_TYPES.contains(l...
getTypeDescriptor
299,784
TypeDescriptor (final XmlTag[] tags, final String name, final String namespace, final Pair<QNameKey, XmlTag> pair, final XmlTag rootTag) { for (final XmlTag tag : tags) { if (equalsToSchemaName(tag, "complexType")) { if (name == null) { CachedValue<TypeDescriptor> value = createAndPutTypesCachedValue(tag, pair); return...
doFindIn
299,785
boolean (@NotNull String name, String namespace, String nameAttribute) { return nameAttribute != null && (nameAttribute.equals(name) || (name.contains(":") && nameAttribute.equals(name.substring(name.indexOf(":") + 1)))) && (namespace == null || namespace.length() == 0 || namespace.equals(getDefaultNamespace())) ; }
isSameName
299,786
XmlNSDescriptorImpl (final XmlTag tag, final XmlDocument document) { final XmlNSDescriptorImpl nsDescriptor; if(IMPORT_TAG_NAME.equals(tag.getLocalName())) { final XmlNSDescriptor importedDescriptor = (XmlNSDescriptor)document.getMetaData(); nsDescriptor = (importedDescriptor instanceof XmlNSDescriptorImpl) ? (XmlNSDes...
findNSDescriptor
299,787
CachedValue<TypeDescriptor> (final XmlTag tag, final Pair<QNameKey, XmlTag> pair) { final CachedValue<TypeDescriptor> value = CachedValuesManager.getManager(tag.getProject()).createCachedValue(() -> { final SimpleTypeDescriptor simpleTypeDescriptor = new SimpleTypeDescriptor(tag); return new CachedValueProvider.Result<...
createAndPutTypesCachedValueSimpleType
299,788
CachedValue<TypeDescriptor> (final XmlTag tag, final Pair<QNameKey, XmlTag> pair) { final CachedValue<TypeDescriptor> value = CachedValuesManager.getManager(tag.getProject()).createCachedValue( () -> { final String name = tag.getAttributeValue("name"); if (name != null && pair.first != null && pair.first.first != null ...
createAndPutTypesCachedValue
299,789
XmlElementDescriptor (@NotNull XmlTag tag) { PsiElement parent = tag.getParent(); final String namespace = tag.getNamespace(); while(parent instanceof XmlTag && !namespace.equals(((XmlTag)parent).getNamespace())) parent = parent.getContext(); if (parent instanceof XmlTag parentTag) { final XmlElementDescriptor parentDe...
getElementDescriptor
299,790
boolean (final @NotNull XmlTag element) { ContainerUtil.addIfNotNull(result, getElementDescriptor(element.getAttributeValue("name"), getDefaultNamespace())); return true; }
execute
299,791
boolean (final @NotNull XmlTag element) { if (!XmlElementDescriptorImpl.isAbstractDeclaration(element)) return super.execute(element); return true; }
execute
299,792
XmlAttributeDescriptor[] (final XmlTag context) { if (myTag == null) return XmlAttributeDescriptor.EMPTY; return CachedValuesManager.getProjectPsiDependentCache(myTag, XmlNSDescriptorImpl::computeAttributeDescriptors) .toArray(XmlAttributeDescriptor.EMPTY); }
getRootAttributeDescriptors
299,793
List<XmlAttributeDescriptor> (XmlTag tag) { List<XmlAttributeDescriptor> result = new ArrayList<>(); processTagsInNamespaceInner(tag, new String[] {ATTRIBUTE_TAG_NAME}, element -> result.add(new XmlAttributeDescriptorImpl(element)), null); return result; }
computeAttributeDescriptors
299,794
boolean () { if (mySubstitutions == null && myTag != null) { mySubstitutions = new MultiMap<>(); XmlTag[] tags = myTag.getSubTags(); for (XmlTag tag : tags) { if (equalsToSchemaName(tag, ELEMENT_TAG_NAME)) { final String substAttr = tag.getAttributeValue("substitutionGroup"); if (substAttr != null) { String substLocalN...
initSubstitutes
299,795
PsiElement () { return myFile.getDocument(); }
getDeclaration
299,796
String (PsiElement context) { return getName(); }
getName
299,797
String () { return ""; }
getName
299,798
void (PsiElement element) { myFile = (XmlFile) element.getContainingFile(); if (element instanceof XmlTag) { myTag = (XmlTag)element; } else { final XmlDocument document = myFile.getDocument(); if (document != null) { myTag = document.getRootTag(); } } if (myTag != null) { myTargetNamespace = myTag.getAttributeValue("t...
init
299,799
void (@NotNull XmlDocument context, @NotNull Validator.ValidationHost host) { ExternalDocumentValidator.doValidation(context,host); }
validate