Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
297,700 | List<DomReferenceInjector> () { return myInjectors; } | getReferenceInjectors |
297,701 | boolean () { return true; } | isAutomaticHighlightingEnabled |
297,702 | void () {} | initializeFileDescription |
297,703 | Class<T> () { return myRootElementClass; } | getRootElementClass |
297,704 | String () { return myRootTagName; } | getRootTagName |
297,705 | boolean (@NotNull XmlFile file, final @Nullable Module module) { final Namespace namespace = DomReflectionUtil.findAnnotationDFS(myRootElementClass, Namespace.class); if (namespace != null) { final String key = namespace.value(); Set<String> allNs = new HashSet<>(getAllowedNamespaces(key, file)); if (allNs.isEmpty()) { return false; } XmlFileHeader header = DomService.getInstance().getXmlFileHeader(file); return allNs.contains(header.getPublicId()) || allNs.contains(header.getSystemId()) || allNs.contains(header.getRootTagNamespace()); } return true; } | isMyFile |
297,706 | boolean () { return false; } | acceptsOtherRootTagNames |
297,707 | DomElement (GenericDomValue<?> reference) { final DomElement annotation = getScopeFromAnnotation(reference); if (annotation != null) return annotation; return DomUtil.getRoot(reference); } | getResolveScope |
297,708 | DomElement (DomElement element) { final DomElement annotation = getScopeFromAnnotation(element); if (annotation != null) return annotation; return element.getParent(); } | getIdentityScope |
297,709 | boolean () { return false; } | hasStubs |
297,710 | int () { throw new UnsupportedOperationException("define \"stubVersion\" of \"com.intellij.dom.fileMetaData\" extension instead"); } | getStubVersion |
297,711 | String () { return getRootElementClass() + " <" + getRootTagName() + "> \n" + StringUtil.join(getAllPossibleRootTagNamespaces()); } | toString |
297,712 | String (@NotNull String propertyName) { return StringUtil.decapitalize(propertyName); } | convertName |
297,713 | String (final String tagName) { return StringUtil.join(Arrays.asList(NameUtilCore.nameToWords(tagName)), DECAPITALIZE_FUNCTION, " "); } | splitIntoWords |
297,714 | void (@NotNull DomEvent event) { elementChanged(event.getElement()); } | eventOccured |
297,715 | ElementPresentationManager () { return ApplicationManager.getApplication().getService(ElementPresentationManager.class); } | getInstance |
297,716 | String (@NotNull Object element) { Object o = invokeNameValueMethod(element); if (o == null || o instanceof String) return (String)o; if (o instanceof GenericValue gv) { final String s = gv.getStringValue(); if (s == null) { final Object value = gv.getValue(); if (value != null) { return String.valueOf(value); } } return s; } return null; } | getElementName |
297,717 | Object (@NotNull final Object element) { return ourNameValueMethods.get(element.getClass()).map(method -> DomReflectionUtil.invokeMethod(method, element)).orElse(null); } | invokeNameValueMethod |
297,718 | String (Object o) { final Object firstImpl = ModelMergerUtil.getFirstImplementation(o); o = firstImpl != null ? firstImpl : o; String typeName = TypePresentationService.getService().getTypeName(o); if (typeName != null) return typeName; if (o instanceof DomElement element) { return StringUtil.capitalizeWords(element.getNameStrategy().splitIntoWords(element.getXmlElementName()), true); } return TypePresentationService.getDefaultTypeName(o.getClass()); } | getTypeNameForObject |
297,719 | Icon (@NotNull Object o) { if (o instanceof Iconable) { Icon icon = ((Iconable)o).getIcon(Iconable.ICON_FLAG_READ_STATUS); if (icon != null) { return icon; } } if (o instanceof DomElement) { return ((DomElement)o).getPresentation().getIcon(); } return getIconOld(o); } | getIcon |
297,720 | Icon (Object o) { return getFirst(getIconsForClass(o.getClass(), o)); } | getIconOld |
297,721 | Icon (Class clazz) { return getFirst(getIconsForClass(clazz, null)); } | getIconForClass |
297,722 | String () { return null;} | getDocumentation |
297,723 | XmlTag () { return getInvocationElement().getXmlTag(); } | getTag |
297,724 | XmlElement () { return getInvocationElement().getXmlElement(); } | getXmlElement |
297,725 | XmlFile () { return DomUtil.getFile(getInvocationElement()); } | getFile |
297,726 | Module () { final DomFileElement<DomElement> fileElement = DomUtil.getFileElement(getInvocationElement()); if (fileElement == null) { final XmlElement xmlElement = getInvocationElement().getXmlElement(); return xmlElement == null ? null : ModuleUtilCore.findModuleForPsiElement(xmlElement); } return fileElement.isValid() ? fileElement.getRootElement().getModule() : null; } | getModule |
297,727 | GlobalSearchScope () { GlobalSearchScope scope = null; Module[] modules = getConvertContextModules(); if (modules.length != 0) { PsiFile file = getFile(); file = file.getOriginalFile(); VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile != null) { boolean tests = TestSourcesFilter.isTestSources(virtualFile, file.getProject()); for (Module module : modules) { if (scope == null) { scope = module.getModuleRuntimeScope(tests); } else { scope = scope.union(module.getModuleRuntimeScope(tests)); } } } } return scope; // ??? scope == null ? GlobalSearchScope.allScope(getProject()) : scope; ??? } | getSearchScope |
297,728 | String (@Nullable String s, final ConvertContext context) { return XmlDomBundle.message("dom.converter.cannot.convert.default", s); } | getErrorMessage |
297,729 | Integer (final String s, final ConvertContext context) { if (s == null) return null; try { return Integer.decode(s); } catch (Exception e) { return null; } } | fromString |
297,730 | String (final Integer t, final ConvertContext context) { return t == null ? null : t.toString(); } | toString |
297,731 | String (final String s, final ConvertContext context) { return XmlDomBundle.message("dom.converter.value.should.be.integer"); } | getErrorMessage |
297,732 | String (final String s, final ConvertContext context) { return s; } | fromString |
297,733 | String (final String t, final ConvertContext context) { return t; } | toString |
297,734 | DomService () { if (ourCachedInstance == null) { ourCachedInstance = ApplicationManager.getApplication().getService(DomService.class); } return ourCachedInstance; } | getInstance |
297,735 | Collection<VirtualFile> (@NotNull Class<? extends DomElement> rootElementClass, Project project, @NotNull GlobalSearchScope scope) { return getDomFileCandidates(rootElementClass, scope); } | getDomFileCandidates |
297,736 | String (@NotNull String propertyName) { final String[] words = NameUtilCore.nameToWords(propertyName); for (int i = 0; i < words.length; i++) { words[i] = StringUtil.decapitalize(words[i]); } return StringUtil.join(words, "-"); } | convertName |
297,737 | String (final String tagName) { return tagName.replace('-', ' '); } | splitIntoWords |
297,738 | TypeChooser (final Type type) { final TypeChooser typeChooser = myClassChoosers.get(type); return typeChooser != null ? typeChooser : new TypeChooser() { @Override public Type chooseType(final XmlTag tag) { return type; } @Override public void distinguishTag(final XmlTag tag, final Type aClass) { } @Override public Type[] getChooserTypes() { return new Type[]{type}; } }; } | getTypeChooser |
297,739 | Type (final XmlTag tag) { return type; } | chooseType |
297,740 | void (final XmlTag tag, final Type aClass) { } | distinguishTag |
297,741 | Type[] () { return new Type[]{type}; } | getChooserTypes |
297,742 | void (final Type aClass, final TypeChooser typeChooser) { myClassChoosers.put(aClass, typeChooser); } | registerTypeChooser |
297,743 | void (Type aClass) { myClassChoosers.remove(aClass); } | unregisterTypeChooser |
297,744 | void (TypeChooserManager manager) { myClassChoosers.putAll(manager.myClassChoosers); } | copyFrom |
297,745 | void () { myClassChoosers.clear(); } | clearCache |
297,746 | XmlElement () { final XmlElement element = getXmlElement(); if (element instanceof XmlTag) { return element; } if (element instanceof XmlAttribute) { return ((XmlAttribute)element).getValueElement(); } return null; } | getReferenceXmlElement |
297,747 | PsiManager () { return PsiManager.getInstance(getProject()); } | getPsiManager |
297,748 | Project () { return getInvocationElement().getManager().getProject(); } | getProject |
297,749 | String (@Nullable String s, final ConvertContext context) { return AnalysisBundle.message("error.cannot.resolve.default.message", s); } | getErrorMessage |
297,750 | Set<String> (@NotNull final ConvertContext context) { return Collections.emptySet(); } | getAdditionalVariants |
297,751 | void (final GenericDomValue<T> genericValue, final ConvertContext context, final String newElementName) { genericValue.setStringValue(newElementName); } | handleElementRename |
297,752 | void (final GenericDomValue<T> genericValue, final ConvertContext context, final PsiElement newTarget) { if (newTarget instanceof XmlTag) { DomElement domElement = genericValue.getManager().getDomElement((XmlTag) newTarget); if (domElement != null) { genericValue.setStringValue(ElementPresentationManager.getElementName(domElement)); } } } | bindReference |
297,753 | PsiElement (@Nullable T resolvedValue) { if (resolvedValue instanceof PsiElement) { return (PsiElement)resolvedValue; } if (resolvedValue instanceof DomElement) { return ((DomElement)resolvedValue).getXmlElement(); } return null; } | getPsiElement |
297,754 | boolean (@NotNull PsiElement element, final String stringValue, @Nullable T resolveResult, final ConvertContext context) { return resolveResult != null && element.getManager().areElementsEquivalent(element, getPsiElement(resolveResult)); } | isReferenceTo |
297,755 | boolean (Class<? extends PsiElement> elementClass) { return true; } | canResolveTo |
297,756 | PsiElement (final T o, final ConvertContext context) { final PsiElement psiElement = getPsiElement(o); return psiElement == null && o != null ? DomUtil.getValueElement((GenericDomValue)context.getInvocationElement()) : psiElement; } | resolve |
297,757 | LocalQuickFix[] (final ConvertContext context) { return LocalQuickFix.EMPTY_ARRAY; } | getQuickFixes |
297,758 | LookupElement (T t) { return null; } | createLookupElement |
297,759 | String (final String s, final ConvertContext context) { return s; } | fromString |
297,760 | String (final String s, final ConvertContext context) { return s; } | toString |
297,761 | T (final String s, final ConvertContext context) { return myWrappedConverter.fromString(s, context); } | fromString |
297,762 | String (final T t, final ConvertContext context) { return myWrappedConverter.toString(t, context); } | toString |
297,763 | Collection (final ConvertContext context) { return Collections.emptyList(); } | getVariants |
297,764 | Object (final String s, final ConvertContext context) { return s; } | fromString |
297,765 | String (final Object t, final ConvertContext context) { return String.valueOf(t); } | toString |
297,766 | Boolean (final String s, final ConvertContext context) { if ("true".equalsIgnoreCase(s)) { return Boolean.TRUE; } if ("false".equalsIgnoreCase(s)) { return Boolean.FALSE; } return null; } | fromString |
297,767 | String (final Boolean t, final ConvertContext context) { return t == null ? null : t.toString(); } | toString |
297,768 | PsiElement () { return myElement.getXmlTag(); } | getDeclaration |
297,769 | T () { return myElement; } | getElement |
297,770 | String (PsiElement context) { return getName(); } | getName |
297,771 | String () { final String s = ElementPresentationManager.getElementName(myElement); if (s != null) return s; final GenericDomValue value = getNameElement(myElement); return value == null ? null : value.getStringValue(); } | getName |
297,772 | void (PsiElement element) { myElement = (T) DomManager.getDomManager(element.getProject()).getDomElement((XmlTag)element); assert myElement != null : element; myNameElement = getNameElement(myElement); } | init |
297,773 | void (final T element) { myElement = element; } | setElement |
297,774 | GenericDomValue (final T t) { return myElement.getGenericInfo().getNameDomElement(t); } | getNameElement |
297,775 | String () { return ElementPresentationManager.getTypeNameForObject(myElement); } | getTypeName |
297,776 | Icon () { return ElementPresentationManager.getIcon(myElement); } | getIcon |
297,777 | DomElement (GenericDomValue<?> reference) { final DomElement annotation = getScopeFromAnnotation(reference); if (annotation != null) return annotation; final DomFileElement<T> element = DomUtil.getFileElement(reference); return getMergedRoot(element); } | getResolveScope |
297,778 | T (DomFileElement<T> element) { final DomManager domManager = element.getManager(); XmlFile xmlFile = element.getFile(); Set<XmlFile> files = new HashSet<>(); files.add(xmlFile); final XmlFile originalFile = (XmlFile)xmlFile.getOriginalFile(); if (originalFile != xmlFile) { final DomFileElement originalElement = domManager.getFileElement(originalFile); if (originalElement != null) { element = originalElement; } } files.addAll(getFilesToMerge(element)); ArrayList<T> roots = new ArrayList<>(files.size()); for (XmlFile file: files) { final DomFileElement<T> fileElement = domManager.getFileElement(file); if (fileElement != null) { roots.add(fileElement.getRootElement()); } } if (roots.size() == 1) { return roots.iterator().next(); } if (myMerger == null) { myMerger = DomService.getInstance().createModelMerger(); } return myMerger.mergeModels(getRootElementClass(), roots); } | getMergedRoot |
297,779 | DomElement (DomElement element) { final DomElement annotation = getScopeFromAnnotation(element); if (annotation != null) return annotation; final List<JavaMethod> methods = DomUtil.getFixedPath(element.getParent()); if (methods == null) return super.getIdentityScope(element); final DomFileElement<T> root = DomUtil.getFileElement(element); Object o = getMergedRoot(root); for (final JavaMethod method : methods) { o = method.invoke(o, ArrayUtilRt.EMPTY_OBJECT_ARRAY); } return (DomElement)o; } | getIdentityScope |
297,780 | boolean () { return false; } | isAutomaticHighlightingEnabled |
297,781 | boolean (Type type) { return boolean.class.equals(type) || Boolean.class.equals(type) || Boolean.class.equals(DomUtil.getGenericValueParameter(type)); } | canHaveIsPropertyGetterPrefix |
297,782 | JavaMethod[] (String[] path, Class<? extends DomElement> startClass) { final JavaMethod[] methods = new JavaMethod[path.length]; Class<?> aClass = startClass; for (int i = 0; i < path.length; i++) { JavaMethod getter = findGetter(aClass, path[i]); assert getter != null : "Couldn't find getter for property " + path[i] + " in class " + aClass; methods[i] = getter; aClass = getter.getReturnType(); if (List.class.isAssignableFrom(aClass)) { @NotNull Type type = Objects.requireNonNull(extractCollectionElementType(getter.getGenericReturnType())); aClass = ClassUtil.getRawType(type); } } return methods; } | getGetterMethods |
297,783 | JavaMethod (Class<?> aClass, String propertyName) { final String capitalized = StringUtil.capitalize(propertyName); Method method = ReflectionUtil.getMethod(aClass, "get" + capitalized); if (method != null) return JavaMethod.getMethod(aClass, method); method = ReflectionUtil.getMethod(aClass, "is" + capitalized); if (method == null) return null; final JavaMethod javaMethod = JavaMethod.getMethod(aClass, method); return canHaveIsPropertyGetterPrefix(javaMethod.getGenericReturnType()) ? javaMethod : null; } | findGetter |
297,784 | Object (Method method, Object object, Object... args) { try { return method.invoke(object, args); } catch (IllegalArgumentException e) { throw new RuntimeException("Calling method " + method + " on object " + object + " with arguments " + Arrays.asList(args), e); } catch (InvocationTargetException e) { final Throwable cause = e.getCause(); if (cause instanceof ProcessCanceledException) { throw (ProcessCanceledException)cause; } ExceptionUtil.rethrow(cause); return null; } catch (ProcessCanceledException e) { throw e; } catch (Throwable throwable) { throw new RuntimeException(throwable); } } | invokeMethod |
297,785 | String () { return myLocalName; } | getLocalName |
297,786 | String () { return myNamespaceKey; } | getNamespaceKey |
297,787 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final XmlName xmlName = (XmlName)o; if (!myLocalName.equals(xmlName.myLocalName)) return false; return Objects.equals(myNamespaceKey, xmlName.myNamespaceKey); } | equals |
297,788 | int () { return myHashCode; } | hashCode |
297,789 | int (XmlName o) { final int i = myLocalName.compareTo(o.myLocalName); if (i != 0) { return i; } return Comparing.compare(myNamespaceKey, o.myNamespaceKey); } | compareTo |
297,790 | String () { return myNamespaceKey + " : " + myLocalName; } | toString |
297,791 | DomElement (@NotNull DomElement element) { return DomUtil.getRoot(element); } | getScope |
297,792 | DomElement (@NotNull DomElement element) { return element.getParent(); } | getScope |
297,793 | DomTarget (@NotNull DomElement element) { final GenericDomValue nameElement = element.getGenericInfo().getNameDomElement(element); if (nameElement == null) { return null; } return getTarget(element, nameElement); } | getTarget |
297,794 | DomTarget (DomElement element, GenericDomValue nameElement) { if (nameElement instanceof GenericAttributeValue genericAttributeValue) { final XmlAttributeValue attributeValue = genericAttributeValue.getXmlAttributeValue(); if (attributeValue == null) { return null; } final int length = attributeValue.getTextLength(); if (length >= 2) { return new DomTarget(element, attributeValue, new TextRange(1, length - 1), nameElement); } } final XmlTag tag = nameElement.getXmlTag(); if (tag == null) { return null; } XmlTagValue tagValue = tag.getValue(); if (StringUtil.isEmpty(tagValue.getTrimmedText())) { return null; } return new DomTarget(element, tag, XmlTagUtil.getTrimmedValueRange(tag), nameElement); } | getTarget |
297,795 | TextRange () { return myRange; } | getNameIdentifierRange |
297,796 | boolean () { return getNavigationElement().isWritable(); } | isWritable |
297,797 | Object (@NotNull String newName) { myNameDomElement.setStringValue(newName); return myDomElement; } | setName |
297,798 | String () { return myNameDomElement.getStringValue(); } | getName |
297,799 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; DomTarget domTarget = (DomTarget)o; if (myDomElement != null ? !myDomElement.equals(domTarget.myDomElement) : domTarget.myDomElement != null) return false; return true; } | equals |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.