Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
49,800
void (PsiFile file, ElementNames names) { if (!(file instanceof XmlFile f)) return; final XmlDocument d = f.getDocument(); if (d == null) return; final XmlTag rootTag = d.getRootTag(); if (rootTag == null) return; //noinspection unchecked names.dependencies.add(new NSDeclTracker(rootTag)); try { final Map<String, Strin...
fillFromSchema
49,801
boolean (String prefix, String namespace) { return IGNORED_URIS.contains(namespace) || prefix.length() == 0 || "xmlns".equals(prefix); }
isIgnoredNamespace
49,802
PsiFile[] (final XPathFile file) { final XmlAttribute attribute = PsiTreeUtil.getContextOfType(file, XmlAttribute.class, false); assert attribute != null; final PsiFile psiFile = attribute.getContainingFile(); assert psiFile != null; final List<PsiFile> files = new ArrayList<>(); psiFile.accept(new XmlRecursiveElementV...
getRelatedFiles
49,803
void (@NotNull XmlAttribute attribute) { final PsiFile[] _files = XsltSupport.getFiles(attribute); for (PsiFile _file : _files) { if (_file != file) files.add(_file); } }
visitXmlAttribute
49,804
XmlElement () { return myContextElement.getElement(); }
getContextElement
49,805
XPathType (XPathExpression expr) { final XmlTag tag = PsiTreeUtil.getContextOfType(expr, XmlTag.class, true); if (tag != null && XsltSupport.isXsltTag(tag)) { final XsltElement element = XsltElementFactory.getInstance().wrapElement(tag, XsltElement.class); if (element instanceof XsltVariable) { return ((XsltVariable)el...
getExpectedType
49,806
XPathType (XmlTag tag, String attribute) { String tagName = tag.getLocalName(); if ("select".equals(attribute)) { if ("copy-of".equals(tagName) || "for-each".equals(tagName) || "apply-templates".equals(tagName)) { return XPathType.NODESET; } else if ("value-of".equals(tagName) || "sort".equals(tagName)) { return XPathT...
getTypeForTag
49,807
NamespaceContext () { return XsltNamespaceContext.NAMESPACE_CONTEXT; }
getNamespaceContext
49,808
VariableContext () { return XsltVariableContext.INSTANCE; }
getVariableContext
49,809
Set<QName> (boolean forValidation) { final ElementNames names = getNames(getFile()); if (names != null) { return !forValidation || names.validateNames ? names.attributeNames : null; } return null; }
getAttributes
49,810
Set<QName> (boolean forValidation) { final ElementNames names = getNames(getFile()); if (names != null) { return !forValidation || names.validateNames ? names.elementNames : null; } return null; }
getElements
49,811
ElementNames (@Nullable PsiFile file) { if (file == null) return null; return myNamesCache.get(this).getValue(); }
getNames
49,812
CachedValue<ElementNames> (final PsiFile file) { return CachedValuesManager.getManager(file.getProject()).createCachedValue(new CachedValueProvider<>() { @Override public Result<ElementNames> compute() { final ElementNames names = new ElementNames(); final PsiFile[] associations = myFileAssociationsManager.getAssociati...
createCachedValue
49,813
Result<ElementNames> () { final ElementNames names = new ElementNames(); final PsiFile[] associations = myFileAssociationsManager.getAssociationsFor(file, FileAssociationsManager.Holder.XML_FILES); if (associations.length == 0) { fillFromSchema(file, names); } else { names.validateNames = true; //noinspection unchecked...
compute
49,814
void (@NotNull XmlTag tag) { names.elementNames.add(QNameUtil.createQName(tag)); super.visitXmlTag(tag); }
visitXmlTag
49,815
void (@NotNull XmlAttribute attribute) { if (!attribute.isNamespaceDeclaration()) { names.attributeNames.add(QNameUtil.createQName(attribute)); } super.visitXmlAttribute(attribute); }
visitXmlAttribute
49,816
PsiFile () { final XmlElement element = getContextElement(); if (element == null) { return null; } return element.getContainingFile().getOriginalFile(); }
getFile
49,817
XPathQuickFixFactory () { return XsltQuickFixFactory.INSTANCE; }
getQuickFixFactory
49,818
ContextProvider (XmlElement xmlElement) { return new XsltContextProvider(xmlElement); }
create
49,819
boolean (Language language) { return language == XPathFileType.XPATH.getLanguage(); }
acceptsLanguage
49,820
XPathVariable (final XPathVariableReference reference) { return (XPathVariable) ResolveCache.getInstance(reference.getProject()).resolveWithCaching(reference, RESOLVER, false, false); }
resolve
49,821
XPathVariable (XPathVariableReference reference) { final XmlTag context = getContextTagImpl(reference); final VariableResolveProcessor processor = new VariableResolveProcessor(reference.getReferencedName(), context); final XPathVariable variable = (XPathVariable)ResolveUtil.treeWalkUp(processor, context); if (variable ...
resolveInner
49,822
boolean (XmlTag context, VariableProcessor processor) { while (context != null && !XsltSupport.isTopLevelElement(context)) { context = context.getParentTag(); } while (context != null && processor.shouldContinue()) { processor.process(context); context = PsiTreeUtil.getNextSiblingOfType(context, XmlTag.class); } return...
processForwardGlobals
49,823
XmlTag (XPathElement element) { return PsiTreeUtil.getContextOfType(element, XmlTag.class, true); }
getContextTagImpl
49,824
boolean (PsiElement element, XPathVariableReference reference) { if (element instanceof XsltParameter) { final XsltTemplate template = XsltCodeInsightUtil.getTemplate(element, false); if (template == null || template.getMatchExpression() == null) return false; final XPathVariable t = reference.resolve(); if (t == null)...
isReferenceTo
49,825
boolean () { return true; }
canResolve
49,826
boolean () { return true; }
followImport
49,827
void (XmlTag tag) { // not interested }
processTemplate
49,828
void (XmlTag tag) { if (tag != myRoot) { processVarOrParamImpl(tag); } }
processVarOrParam
49,829
XsltVariable[] () { return myNames.toArray(new XsltVariable[0]); }
getResult
49,830
void (XmlTag tag) { if (XsltSupport.isVariableOrParam(tag)) { myNames.add(XsltElementFactory.getInstance().wrapElement(tag, XsltVariable.class)); } }
processVarOrParamImpl
49,831
boolean () { return true; }
shouldContinue
49,832
PsiElement () { return myResult; }
getResult
49,833
boolean () { return myResult == null; }
shouldContinue
49,834
void (XmlTag tag) { if (XsltSupport.isVariableOrParam(tag)) { final String name = tag.getAttributeValue("name"); if (myName.equals(name)) { myResult = XsltElementFactory.getInstance().wrapElement(tag, XsltVariable.class); } } }
processVarOrParamImpl
49,835
boolean (XPathFile file) { final PsiElement context = file.getContext(); if (!(context instanceof XmlElement)) return false; final XmlAttribute att = PsiTreeUtil.getParentOfType(context, XmlAttribute.class); if (att == null) return false; return XsltSupport.isXPathAttribute(att) ? acceptsLanguage(file.getLanguage()) : ...
accepts
49,836
ContextProvider (XPathFile file) { final XmlElement xmlElement = (XmlElement)file.getContext(); assert xmlElement != null; return create(xmlElement); }
getContextProvider
49,837
String () { return StringUtil.toLowerCase(name()).replace('_', '-'); }
getName
49,838
Axis (String name) { try { return valueOf(StringUtil.toUpperCase(name).replace('-', '_')); } catch (IllegalArgumentException e) { return INVALID; } }
fromName
49,839
void (XPath2TypeReference o) { visitXPathElement(o); }
visitXPath2TypeReference
49,840
void (XPath2InstanceOf o) { visitXPathExpression(o); // visitXPath2TypeReference(o); }
visitXPath2InstanceOf
49,841
void (XPath2QuantifiedExpr o) { visitXPathExpression(o); // visitXPathVariableDeclaration(o); }
visitXPath2QuantifiedExpr
49,842
void (XPath2TreatAs o) { visitXPathExpression(o); // visitXPath2TypeReference(o); }
visitXPath2TreatAs
49,843
void (XPath2If o) { visitXPathExpression(o); }
visitXPath2If
49,844
void (XPath2Cast o) { visitXPathExpression(o); // visitXPath2TypeReference(o); }
visitXPath2Cast
49,845
void (XPathVariableDeclaration o) { visitXPathElement(o); }
visitXPathVariableDeclaration
49,846
void (XPath2Sequence o) { visitXPathExpression(o); }
visitXPath2Sequence
49,847
void (XPath2For o) { visitXPathExpression(o); // visitXPathVariableDeclaration(o); }
visitXPath2For
49,848
void (XPath2TypeElement o) { visitQNameElement(o); }
visitXPath2TypeElement
49,849
void (XPath2Castable o) { visitXPathExpression(o); // visitXPath2TypeReference(o); }
visitXPath2Castable
49,850
void (XPath2RangeExpression o) { visitXPathBinaryExpression(o); }
visitXPath2RangeExpression
49,851
void (XPathElement o) { if (o instanceof XPath2ElementImpl) { visitXPath2Element(o); } else { super.visitXPathElement(o); } }
visitXPathElement
49,852
void (XPathElement element) { super.visitXPathElement(element); }
visitXPath2Element
49,853
void (XPathString o) { visitXPathExpression(o); }
visitXPathString
49,854
void (XPathPrefixExpression o) { visitXPathExpression(o); }
visitXPathPrefixExpression
49,855
void (XPathVariable o) { visitXPathElement(o); }
visitXPathVariable
49,856
void (XPathToken o) { visitXPathElement(o); }
visitXPathToken
49,857
void (XPathNodeTypeTest o) { visitXPathFunctionCall(o); }
visitXPathNodeTypeTest
49,858
void (XPathPredicate o) { visitXPathElement(o); }
visitXPathPredicate
49,859
void (QNameElement o) { visitXPathElement(o); }
visitQNameElement
49,860
void (XPathNodeTest o) { visitQNameElement(o); }
visitXPathNodeTest
49,861
void (XPathFunctionCall o) { visitXPathExpression(o); // visitQNameElement(o); }
visitXPathFunctionCall
49,862
void (XPathBinaryExpression o) { visitXPathExpression(o); }
visitXPathBinaryExpression
49,863
void (XPathExpression o) { visitXPathElement(o); }
visitXPathExpression
49,864
void (XPathParenthesizedExpression o) { visitXPathExpression(o); }
visitXPathParenthesizedExpression
49,865
void (XPathStep o) { visitXPathExpression(o); }
visitXPathStep
49,866
void (XPathAxisSpecifier o) { visitXPathElement(o); }
visitXPathAxisSpecifier
49,867
void (XPathNumber o) { visitXPathExpression(o); }
visitXPathNumber
49,868
void (XPathVariableReference o) { visitXPathExpression(o); // visitQNameElement(o); }
visitXPathVariableReference
49,869
void (XPathFilterExpression o) { visitXPathExpression(o); }
visitXPathFilterExpression
49,870
void (XPathFunction o) { visitXPathElement(o); }
visitXPathFunction
49,871
void (XPathLocationPath o) { visitXPathExpression(o); }
visitXPathLocationPath
49,872
void (XPathElement o) { visitElement(o); }
visitXPathElement
49,873
void (XPathFile file) { visitFile(file); }
visitXPathFile
49,874
XPath2Type (String s, XPathType superType) { final XPath2Type type = new SchemaType(s, superType); ourMap.put(new QName(XMLSCHEMA_NS, s), type); return type; }
createSchemaType
49,875
XPath2Type (String s, XPathType superType) { final XPath2Type type = new ItemType(s, superType); ourMap.put(new QName("", s), type); return type; }
createItemType
49,876
XPathType () { return mySuperType; }
getSuperType
49,877
boolean (@NotNull XPathType type) { if (type instanceof XPath2SequenceType) { type = ((XPath2SequenceType)type).getType(); } if (type instanceof XPath2Type) { if (this.equals(type)) { return true; } else { XPathType t = ((XPath2Type)type).getSuperType(); while (t != null) { if (t.equals(this)) return true; if (!(t inst...
isAssignableFrom
49,878
boolean (XPathType type) { while (type instanceof XPath2SequenceType) { type = ((XPath2SequenceType)type).getType(); } if (this == ITEM || NODE.isAssignableFrom(this) || (this == ANYATOMICTYPE && ANYATOMICTYPE.isAssignableFrom(type))) return true; if (FLOAT.isAssignableFrom(this) && type == DOUBLE) return true; if (DEC...
canBePromotedTo
49,879
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final XPath2Type type = (XPath2Type)o; if (!mySuperType.equals(type.mySuperType)) return false; if (!Comparing.equal(getQName(), type.getQName())) { return false; } return true; }
equals
49,880
int () { return getName().hashCode() + mySuperType.hashCode() * 5; }
hashCode
49,881
XPath2Type (String name) { return ourMap.get(new QName(XMLSCHEMA_NS, name)); }
schemaType
49,882
XPath2Type (QName name) { final String local = name.getLocalPart(); if (local.endsWith("*")) { return XPath2SequenceType.create(lookupSequenceType(name, local), XPath2SequenceType.Cardinality.ZERO_OR_MORE); } else if (local.endsWith("+")) { return XPath2SequenceType.create(lookupSequenceType(name, local), XPath2Sequenc...
fromName
49,883
QName () { return new QName(null, type); }
getQName
49,884
XPathType (QName name, String local) { final XPath2Type type = ourMap.get(new QName(name.getNamespaceURI(), local.substring(0, local.length() - 1))); return type != null ? type : UNKNOWN; }
lookupSequenceType
49,885
XPathType (XPathType type) { if (type == XPathType.STRING) { type = STRING; } else if (type == XPathType.BOOLEAN) { type = BOOLEAN; } else if (type == XPathType.NUMBER) { type = NUMERIC; } else if (type == XPathType.NODESET) { type = XPath2SequenceType.create(NODE, XPath2SequenceType.Cardinality.ZERO_OR_MORE); } return...
mapType
49,886
boolean (@NotNull XPathType type) { return super.isAssignableFrom(type) || type == NODESET || this == ITEM; }
isAssignableFrom
49,887
String () { return "xs:" + super.getName(); }
getName
49,888
QName () { return new QName(XMLSCHEMA_NS, type); }
getQName
49,889
boolean () { return this == NUMERIC; }
isAbstract
49,890
List<XPath2Type> () { return ContainerUtil.filter(ourMap.values(), type1 -> type1.getQName().getNamespaceURI().equals(XMLSCHEMA_NS) && !type1.isAbstract()); }
listSchemaTypes
49,891
String () { return StringUtil.toLowerCase(name()); }
getType
49,892
String (XPathType s, Cardinality c) { return c.myType != null ? s.getName() + c.myType : "sequence of " + s.getName(); }
makeName
49,893
XPathType () { return myType; }
getType
49,894
XPath2Type (@NotNull XPathType type, Cardinality c) { return new XPath2SequenceType(type, c); }
create
49,895
XPath2Type (@NotNull XPathType type) { return new XPath2SequenceType(type, Cardinality.UNDEFINED); }
create
49,896
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; final XPath2SequenceType that = (XPath2SequenceType)o; if (!myType.equals(that.myType)) return false; return true; }
equals
49,897
boolean (@NotNull XPathType type) { return super.isAssignableFrom(type) || getType().isAssignableFrom(unwrap(type)); }
isAssignableFrom
49,898
XPathType (XPathType type) { return type instanceof XPath2SequenceType ? ((XPath2SequenceType)type).getType() : type; }
unwrap
49,899
boolean (XPathType type) { return super.canBePromotedTo(type) || getType().canBePromotedTo(unwrap(type)); }
canBePromotedTo