Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
49,700 | void (String key, String nsPrefix, String nsURI, String value, String type) { if (key.equals("name") && (nsURI == null || nsURI.length() == 0) && value != null) { if (myMap.put(value, myKind) != null) { myMap.put(value, Kind.ANYTHING); } } } | addAttribute |
49,701 | void (@NotNull Processor<? super String> processor, @NotNull GlobalSearchScope scope, @Nullable IdFilter filter) { FileBasedIndex.getInstance().processAllKeys(XsltSymbolIndex.NAME, processor, scope, filter); } | processNames |
49,702 | void (@NotNull String name, @NotNull Processor<? super NavigationItem> processor, @NotNull FindSymbolParameters parameters) { PsiManager psiManager = PsiManager.getInstance(parameters.getProject()); FileBasedIndex.getInstance().processValues(XsltSymbolIndex.NAME, name, null, (file, kind) -> { if (kind == null) return t... | processElementsWithName |
49,703 | boolean (XmlFile which, XmlFile from) { return from == which || _isReachableFrom(from.getVirtualFile(), FileIncludeManager.getManager(which.getProject()).getIncludingFiles(which.getVirtualFile(), true)); } | isReachableFrom |
49,704 | boolean (VirtualFile from, VirtualFile[] which) { //noinspection ForLoopReplaceableByForEach for (int i = 0; i < which.length; i++) { final VirtualFile file = which[i]; if (Comparing.equal(file, from)) { return true; } } return false; } | _isReachableFrom |
49,705 | boolean (@NotNull XmlFile file, Processor<? super XmlFile> processor) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) { return true; } final Project project = file.getProject(); final VirtualFile[] files = FileIncludeManager.getManager(project).getIncludedFiles(virtualFile, true); retu... | processForwardDependencies |
49,706 | boolean (@NotNull XmlFile file, Processor<? super XmlFile> processor) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) { return true; } final Project project = file.getProject(); final VirtualFile[] files = FileIncludeManager.getManager(project).getIncludingFiles(virtualFile, true); ret... | processBackwardDependencies |
49,707 | boolean (VirtualFile[] files, Project project, Processor<? super XmlFile> processor) { final PsiManager psiManager = PsiManager.getInstance(project); final List<PsiFile> psiFiles = ContainerUtil.mapNotNull(files, (NullableFunction<VirtualFile, PsiFile>)file -> psiManager.findFile(file)); for (final PsiFile psiFile : ps... | _process |
49,708 | boolean (@NotNull PsiElement element) { if (!(element instanceof XmlAttribute attr)) { return false; } if (!attr.isNamespaceDeclaration()) { return false; } final PsiFile file = attr.getContainingFile(); if (!(file instanceof XmlFile)) { return false; } // also catch namespace declarations in "normal" XML files that ha... | isImplicitUsage |
49,709 | boolean (@NotNull PsiElement element) { return false; } | isImplicitRead |
49,710 | boolean (@NotNull PsiElement element) { return false; } | isImplicitWrite |
49,711 | PsiElement () { final ResolveResult[] results = multiResolve(false); return results.length == 1 ? results[0].getElement() : null; } | resolveImpl |
49,712 | TextRange () { return myImplicitModeElement.getModeRange(); } | getTextRange |
49,713 | boolean () { return myIsDeclaration; } | isSoft |
49,714 | PsiElement () { if (myIsDeclaration) { return myImplicitModeElement; } else { final ResolveResult[] results = multiResolve(false); return results.length == 1 ? results[0].getElement() : null; } } | resolveImpl |
49,715 | MyModeMatcher () { return new MyModeMatcher(myAttribute, myImplicitModeElement.getQName()); } | getMatcher |
49,716 | PsiReference[] (XmlAttribute attribute, boolean isDeclaration) { final String value = attribute.getValue(); if (value == null) { return PsiReference.EMPTY_ARRAY; } if (value.trim().indexOf(' ') != -1) { // TODO: fix for xslt 2.0 return PsiReference.EMPTY_ARRAY; } return createImpl(attribute, isDeclaration, value); } | create |
49,717 | PsiReference[] (XmlAttribute attribute, boolean isDeclaration, String value) { final int p = value.indexOf(':'); if (p == -1) { return new PsiReference[]{new ModeReference(attribute, isDeclaration)}; } else if (p == value.length() - 1) { return new PsiReference[]{new MyPrefixReference(attribute)}; } else { return new P... | createImpl |
49,718 | Object[] (XmlAttribute attribute) { final ModeReference.MyModeMatcher matcher = new ModeReference.MyModeMatcher(attribute, QNameUtil.ANY); final PsiElement[] modes = ResolveUtil.collect(matcher); final Collection<String> prefixes = XsltNamespaceContext.getPrefixes(attribute); final Set<NamespaceLookup> lookups = new Ha... | getPrefixCompletions |
49,719 | PsiElement (XmlTag element) { return new ImplicitModeElement(element.getAttribute("mode", null)); } | transform |
49,720 | boolean (XmlTag element) { final String s = element.getAttributeValue("mode"); return myMode != null && s != null && !s.contains(CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED) && super.matches(element); } | matches |
49,721 | String () { final QName qName = myImplicitModeElement.getQName(); if (qName != null && qName != QNameUtil.UNRESOLVED) { return XPathBundle.message("inspection.message.undefined.mode", qName); } else { return XPathBundle.partialMessage("inspection.message.undefined.mode", 1); } } | getUnresolvedMessagePattern |
49,722 | PsiElement () { return myAttribute.getValueElement(); } | getElement |
49,723 | TextRange () { final XmlAttributeValue value = myAttribute.getValueElement(); return value != null ? TextRange.from(1, value.getTextLength() - 2) : TextRange.from(0, 0); } | getRangeInElement |
49,724 | PsiElement () { final String value = myAttribute.getValue(); final String resourceLocation = myResourceManager.getResourceLocation(value); if (!Objects.equals(resourceLocation, value)) { VirtualFile file; try { file = VfsUtil.findFileByURL(new URL(resourceLocation)); } catch (MalformedURLException e) { try { file = Vfs... | resolve |
49,725 | String () { return myAttribute.getValue(); } | getCanonicalText |
49,726 | boolean (@NotNull PsiElement element) { return element == resolve(); } | isReferenceTo |
49,727 | boolean () { return false; } | isSoft |
49,728 | Result<PsiReference[]> () { final PsiReference[] referencesImpl = getReferencesImpl(myAttribute); final Object[] refs = new PsiElement[referencesImpl.length]; for (int i = 0; i < refs.length; i++) { refs[i] = referencesImpl[i].getElement(); } return new Result<>(referencesImpl, ArrayUtil.append(refs, myAttribute.getVal... | compute |
49,729 | PsiReference[] (final XmlAttribute attribute) { final PsiReference[] psiReferences; final XmlTag tag = attribute.getParent(); if (XsltSupport.isTemplateCallName(attribute)) { psiReferences = createReferencesWithPrefix(attribute, new TemplateReference(attribute)); } else if (XsltSupport.isTemplateCallParamName(attribute... | getReferencesImpl |
49,730 | PsiReference[] (XmlAttribute attribute, PsiReference reference) { if (attribute.getValue().contains(":")) { return new PsiReference[]{ new PrefixReference(attribute), reference }; } else { return new PsiReference[]{ reference }; } } | createReferencesWithPrefix |
49,731 | boolean (@NotNull PsiElement element) { // self-reference is only a trick to enable rename/find usages etc. but it shouldn't actually // refer to itself because this would list the element to be renamed/searched for twice assert !super.isReferenceTo(element); if (element == myParam) return false; if (!(element instance... | isReferenceTo |
49,732 | PsiReference[] (XmlAttribute attribute, Pattern pattern) { final Matcher matcher = pattern.matcher(attribute.getValue()); if (matcher.find()) { final List<PsiReference> refs = new SmartList<>(); do { final int start = matcher.start(1); if (start >= 0) { refs.add(new PrefixReference(attribute, TextRange.create(start, ma... | createPrefixReferences |
49,733 | boolean (XmlTag tag) { final XmlTag t = XsltCodeInsightUtil.getTemplateTag(tag, false, false); return t != null && t.getAttribute("name", null) == null; } | isInsideUnnamedTemplate |
49,734 | XmlDocument (XsltCallTemplate call) { final XsltTemplate template = call.getTemplate(); return XsltCodeInsightUtil.getDocument(template != null ? template : call); } | getDocument |
49,735 | Result (XmlTag element) { if (matches(element)) { return Result.create(new ParamMatcher(element, myExcludedNames, myParamName)); } return null; } | matchImpl |
49,736 | Result (XmlTag element) { if (matches(element)) { return Result.create(new ParamMatcher(element, myExcludedNames, myParamName)); } return null; } | matchImpl |
49,737 | TextRange (XmlAttribute attribute) { final String value = attribute.getValue(); final int p = value.indexOf(':'); if (p == -1) { return TextRange.from(0, 0); } else { for (int i = p - 1; i >= 0 ; i--) { if (!Character.isJavaIdentifierPart(value.charAt(i))) { return TextRange.create(i + 1, p); } } return TextRange.from(... | getPrefixRange |
49,738 | boolean () { return false; } | isSoft |
49,739 | TextRange () { return myRange; } | getTextRange |
49,740 | PsiElement () { return XsltNamespaceContext.resolvePrefix(getCanonicalText(), myAttribute); } | resolveImpl |
49,741 | String () { return XPathBundle.partialMessage("inspection.message.undeclared.namespace.prefix", 1); } | getUnresolvedMessagePattern |
49,742 | String () { return XPathBundle.partialMessage("inspection.message.cannot.resolve.template", 1); } | getUnresolvedMessagePattern |
49,743 | TextRange () { return TextRange.from(0, myAttribute.getValue().length()); } | getTextRange |
49,744 | boolean () { return mySoft; } | isSoft |
49,745 | PsiElement () { return ResolveUtil.resolve(myMatcher); } | resolveImpl |
49,746 | String () { return getTextRange().substring(myAttribute.getValue()); } | getCanonicalText |
49,747 | PsiElement () { final XmlAttributeValue value = myAttribute.getValueElement(); assert value != null; return value; } | getElement |
49,748 | TextRange () { return getTextRange().shiftRight(1); } | getRangeInElement |
49,749 | boolean (@NotNull PsiElement element) { if (this instanceof PsiPolyVariantReference reference) { final ResolveResult[] results = reference.multiResolve(false); for (ResolveResult result : results) { if (Comparing.equal(result.getElement(), element)) return true; } return false; } else { return Comparing.equal(resolve()... | isReferenceTo |
49,750 | PsiElement () { return ResolveCache.getInstance(myAttribute.getProject()).resolveWithCaching(this, (ResolveCache.Resolver)(psiReference, b) -> resolveImpl(), false, false); } | resolve |
49,751 | PsiElement () { return myValue; } | getElement |
49,752 | TextRange () { return TextRange.from(1 + myStartOffset, myValue.getTextLength() - (2 + myStartOffset)); } | getRangeInElement |
49,753 | PsiElement () { return myValue.isValid() ? myTarget : null; } | resolve |
49,754 | String () { return myValue.getText(); } | getCanonicalText |
49,755 | boolean (@NotNull PsiElement element) { return false; } | isReferenceTo |
49,756 | boolean () { return false; } | isSoft |
49,757 | SelfReference (XmlAttribute element, PsiElement target) { if (element.getValue().contains(":")) { return new SelfReference(element, target, element.getValue().indexOf(':') + 1); } return new SelfReference(element, target); } | create |
49,758 | String (String prefix, XmlElement context) { return getNamespaceUriStatic(prefix, context); } | getNamespaceURI |
49,759 | String (String prefix, XmlElement context) { final XmlTag tag = PsiTreeUtil.getParentOfType(context, XmlTag.class); return tag != null ? tag.getNamespaceByPrefix(prefix) : null; } | getNamespaceUriStatic |
49,760 | String (String uri, XmlElement context) { final XmlTag tag = PsiTreeUtil.getParentOfType(context, XmlTag.class); return tag != null ? tag.getPrefixByNamespace(uri) : null; } | getPrefixForURI |
49,761 | Collection<String> (XmlElement context) { return getPrefixes(context); } | getKnownPrefixes |
49,762 | Collection<String> (XmlElement context) { final XmlTag tag = PsiTreeUtil.getParentOfType(context, XmlTag.class); if (tag != null) { final HashSet<String> allPrefixes = new HashSet<>(); final String[] uris = tag.knownNamespaces(); for (String uri : uris) { for (XmlTag p = tag; p != null; p = p.getParentTag()) { final Se... | getPrefixes |
49,763 | PsiElement (String prefix, XmlElement context) { return resolvePrefix(prefix, context); } | resolve |
49,764 | PsiElement (final String prefix, XmlElement context) { final String name = "xmlns:" + prefix; XmlTag parent = PsiTreeUtil.getParentOfType(context, XmlTag.class); while (parent != null) { final XmlAttribute attribute = parent.getAttribute(name, null); if (attribute != null) { final TextRange textRange = TextRange.from("... | resolvePrefix |
49,765 | boolean (Object obj) { if (obj instanceof SchemaPrefix p) { return prefix.equals(p.getName()) && p.getParent() == attribute; } return super.equals(obj); } | equals |
49,766 | IntentionAction[] (@NotNull PsiReference reference, String localName) { return getUnresolvedNamespaceFixesStatic(reference, localName); } | getUnresolvedNamespaceFixes |
49,767 | String (XmlElement context) { if (context != null) { if (XsltSupport.getXsltLanguageLevel(context.getContainingFile()) == XsltChecker.LanguageLevel.V2) { context = PsiTreeUtil.getParentOfType(context, XmlTag.class, false); if (context != null) { do { final XmlTag tag = (XmlTag)context; String uri; if ((uri = tag.getAtt... | getDefaultNamespace |
49,768 | IntentionAction[] (PsiReference reference, String localName) { PsiElement element = reference.getElement(); XmlElementFactory factory = XmlElementFactory.getInstance(element.getProject()); XmlTag tag = factory.createTagFromText("<" + reference.getCanonicalText() + ":" + localName + " />", XMLLanguage.INSTANCE); XmlFile... | getUnresolvedNamespaceFixesStatic |
49,769 | boolean (@NotNull Editor editor) { return false; // doesn't work properly yet } | showHint |
49,770 | boolean (@NotNull Project project, Editor editor, PsiFile psiFile) { XmlFile xmlFile = myXmlFile.getElement(); return xmlFile != null && super.isAvailable(project, editor, xmlFile); } | isAvailable |
49,771 | ContextType () { return TYPE; } | getContextType |
49,772 | XPathType (XmlTag tag, String attribute) { if ("select".equals(attribute)) { final String tagName = tag.getLocalName(); if ("sequence".equals(tagName)) { final XPathType declaredType = XsltCodeInsightUtil.getDeclaredType(tag); if (declaredType != null) { return declaredType; } if (XsltSupport.isFunction(tag.getParentTa... | getTypeForTag |
49,773 | FunctionContext (final XmlFile xmlFile, Void p) { final FunctionContext base = Xslt2FunctionContext.getInstance(); return new FunctionContext() { @Override public Map<Pair<QName, Integer>, Function> getFunctions() { return ContainerUtil.union(base.getFunctions(), getCustomFunctions(xmlFile)); } @Override public boolean... | compute |
49,774 | boolean () { return base.allowsExtensions(); } | allowsExtensions |
49,775 | Function (QName name, int argCount) { final Function f = base.resolve(name, argCount); if (f == null) { return resolveCustomFunction(xmlFile, name, argCount); } return f; } | resolve |
49,776 | FunctionContext () { final XmlElement contextElement = getContextElement(); return contextElement != null && contextElement.isValid() ? functionContextCache.get((XmlFile)contextElement.getContainingFile(), null) : Xslt2FunctionContext.getInstance(); } | createFunctionContext |
49,777 | Function (final XmlFile file, final QName name, int argCount) { final Map<Pair<QName, Integer>, Function> functions = getCustomFunctions(file); final Function exactMatch = functions.get(Pair.create(name, argCount)); if (exactMatch != null) { return exactMatch; } Function candidate = null; for (Pair<QName, Integer> pair... | resolveCustomFunction |
49,778 | ContextProvider (XmlElement xmlElement) { return new Xslt2ContextProvider(xmlElement); } | create |
49,779 | boolean (Language language) { return language == XPathFileType.XPATH2.getLanguage(); } | acceptsLanguage |
49,780 | boolean () { return true; } | allowsExtensions |
49,781 | Function (QName name, int argCount) { if (name.getNamespaceURI().length() == 0) { name = new QName(FunctionDeclarationParsing.FUNCTION_NAMESPACE, name.getLocalPart()); } return super.resolve(name, argCount); } | resolve |
49,782 | FunctionContext () { return getInstance(Xslt2ContextProvider.TYPE, FACTORY); } | getInstance |
49,783 | void (String[] args) { } | main |
49,784 | Fix<XPathExpression>[] (XPathExpression expression, XPathType type, boolean explicit) { //noinspection unchecked return explicit ? new Fix[]{ new RemoveExplicitConversionFix(expression), new MakeTypeExplicitFix(expression, type), } : new Fix[]{ new MakeTypeExplicitFix(expression, type), }; } | createImplicitTypeConversionFixes |
49,785 | Fix<XPathExpression>[] (XPathExpression expression) { //noinspection unchecked return new Fix[]{ new RemoveRedundantConversionFix(expression), }; } | createRedundantTypeConversionFixes |
49,786 | Fix<XPathNodeTest>[] (XPathNodeTest test) { //noinspection unchecked return new Fix[]{ new EditAssociationsFix(test) }; } | createUnknownNodeTestFixes |
49,787 | boolean (PsiElement element, XPathInspection inspection) { return InspectionUtil.isSuppressed(inspection, element); } | isSuppressedFor |
49,788 | boolean () { return false; } | startInWriteAction |
49,789 | String () { return getFamilyName(); } | getText |
49,790 | String () { return XPathBundle.message("intention.family.name.edit.file.associations"); } | getFamilyName |
49,791 | ContextType () { return TYPE; } | getContextType |
49,792 | FunctionContext () { return XsltFunctionContext.getInstance(); } | createFunctionContext |
49,793 | boolean () { return true; } | allowsExtensions |
49,794 | FunctionContext () { return getInstance(XsltContextProvider.TYPE, FACTORY); } | getInstance |
49,795 | CachedValue<ElementNames> (final XsltContextProviderBase xsltContextProvider) { return xsltContextProvider.createCachedValue(xsltContextProvider.getFile()); } | compute |
49,796 | CachedValue<ElementNames> (final XsltContextProviderBase xsltContextProvider) { return xsltContextProvider.myNames; } | getValue |
49,797 | void (final CachedValue<ElementNames> elementNamesCachedValue, final XsltContextProviderBase xsltContextProvider) { xsltContextProvider.myNames = elementNamesCachedValue; } | putValue |
49,798 | boolean () { return super.isValid() && matchContextType(); } | isValid |
49,799 | boolean () { final PsiFile file = myContextElement.getContainingFile(); return file != null && XsltSupport.getXsltLanguageLevel(file).getXPathVersion() == getContextType().getVersion(); } | matchContextType |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.