Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
---|---|---|
303,500 | DomCollectionChildDescription (@NonNls String tagName, @NonNls String namespace) { checkInitialized(); return myCollections.getDescription(tagName, namespace); } | getCollectionChildDescription |
303,501 | AttributeChildDescriptionImpl (String attributeName) { checkInitialized(); return myAttributes.findDescription(attributeName); } | getAttributeChildDescription |
303,502 | boolean () { return myStaticGenericInfo.isTagValueElement(); } | isTagValueElement |
303,503 | List<AttributeChildDescriptionImpl> () { checkInitialized(); return myAttributes.getDescriptions(); } | getAttributeChildrenDescriptions |
303,504 | boolean (final Processor<? super AttributeChildDescriptionImpl> processor) { final Set<AttributeChildDescriptionImpl> visited = new HashSet<>(); if (!myStaticGenericInfo.processAttributeChildrenDescriptions(attributeChildDescription -> { visited.add(attributeChildDescription); return processor.process(attributeChildDescription); })) { return false; } for (final AttributeChildDescriptionImpl description : getAttributeChildrenDescriptions()) { if (!visited.contains(description) && !processor.process(description)) { return false; } } return true; } | processAttributeChildrenDescriptions |
303,505 | void () { myCache = null; } | clearCache |
303,506 | V (T key) { SofterReference<ConcurrentMap<T, V>> ref = myCache; ConcurrentMap<T, V> map = ref == null ? null : ref.get(); if (map == null) { map = new ConcurrentHashMap<>(); myCache = new SofterReference<>(map); } return map.computeIfAbsent(key, myValueProvider); } | getCachedValue |
303,507 | XmlFileHeader (@NotNull XmlFile file) { if (file instanceof PsiFileEx && ((PsiFileEx)file).isContentsLoaded() && file.getNode().isParsed()) { return computeHeaderByPsi(file); } if (FileBasedIndex.getInstance().getFileBeingCurrentlyIndexed() == null && XmlUtil.BUILDING_DOM_STUBS.get() != Boolean.TRUE && file.getFileType() == XmlFileType.INSTANCE) { VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile instanceof VirtualFileWithId) { ObjectStubTree<?> tree = StubTreeLoader.getInstance().readFromVFile(file.getProject(), virtualFile); if (tree != null) { Stub root = tree.getRoot(); if (root instanceof FileStub) { return ((FileStub)root).getHeader(); } } } } if (!file.isValid()) return XmlFileHeader.EMPTY; XmlFileHeader header = NanoXmlUtil.parseHeader(file); if (header.getRootTagLocalName() == null) { // nanoxml failed return computeHeaderByPsi(file); } return header; } | calcXmlFileHeader |
303,508 | XmlFileHeader (XmlFile file) { final XmlDocument document = file.getDocument(); if (document == null) { return XmlFileHeader.EMPTY; } String publicId = null; String systemId = null; final XmlProlog prolog = document.getProlog(); if (prolog != null) { final XmlDoctype doctype = prolog.getDoctype(); if (doctype != null) { publicId = doctype.getPublicId(); systemId = doctype.getSystemId(); if (systemId == null) { systemId = doctype.getDtdUri(); } } } final XmlTag tag = document.getRootTag(); if (tag == null) { return XmlFileHeader.EMPTY; } String localName = tag.getLocalName(); if (StringUtil.isNotEmpty(localName)) { if (tag.getPrevSibling() instanceof PsiErrorElement) { return XmlFileHeader.EMPTY; } String psiNs = tag.getLocalNamespaceDeclarations().get(tag.getNamespacePrefix()); return new XmlFileHeader(localName, psiNs, publicId, systemId); } return XmlFileHeader.EMPTY; } | computeHeaderByPsi |
303,509 | ModelMerger () { return new ModelMergerImpl(); } | createModelMerger |
303,510 | XmlFile (@NotNull DomElement domElement) { if (domElement instanceof DomFileElement) { return ((DomFileElement<?>)domElement).getFile(); } return DomManagerImpl.getNotNullHandler(domElement).getFile(); } | getContainingFile |
303,511 | EvaluatedXmlName (final @NotNull DomElement element) { return DomManagerImpl.getNotNullHandler(element).getXmlName(); } | getEvaluatedXmlName |
303,512 | XmlFileHeader (@NotNull XmlFile file) { if (FileBasedIndex.getInstance().getFileBeingCurrentlyIndexed() != null) { return calcXmlFileHeader(file); } return CachedValuesManager.getCachedValue(file, () -> new CachedValueProvider.Result<>(calcXmlFileHeader(file), file)); } | getXmlFileHeader |
303,513 | Collection<VirtualFile> (@NotNull Class<? extends DomElement> rootElementClass, @NotNull GlobalSearchScope scope) { DomFileDescription<?> description = DomApplicationComponent .getInstance() .findFileDescription(rootElementClass); if (description == null) return Collections.emptySet(); String[] namespaces = description.getAllPossibleRootTagNamespaces(); if (namespaces.length == 0) { namespaces = new String[]{null}; } String rootTagName = description.getRootTagName(); Set<VirtualFile> files = new HashSet<>(); for (String namespace : namespaces) { files.addAll(DomFileIndex.findFiles(rootTagName, namespace, scope)); } return files; } | getDomFileCandidates |
303,514 | StructureViewBuilder (@NotNull XmlFile file, @NotNull Function<DomElement, StructureViewMode> modeProvider) { return new DomStructureViewBuilder(file, modeProvider); } | createSimpleStructureViewBuilder |
303,515 | long () { return myModificationTracker.getModificationStamp(); } | getModCount |
303,516 | DomInvocationHandler () { return myParentHandler; } | getParentHandler |
303,517 | XmlElement () { return null; } | getXmlElement |
303,518 | DomParentStrategy (final @NotNull XmlElement element) { return new PhysicalDomParentStrategy(element, DomManagerImpl.getDomManager(element.getProject())); } | setXmlElement |
303,519 | XmlFile (DomInvocationHandler handler) { return DomImplUtil.getFile(handler); } | getContainingFile |
303,520 | boolean () { return false; } | isPhysical |
303,521 | boolean (final Object o) { if (this == o) return true; if (!(o instanceof VirtualDomParentStrategy that)) return false; if (!myParentHandler.equals(that.myParentHandler)) return false; return true; } | equals |
303,522 | int () { return myParentHandler.hashCode(); } | hashCode |
303,523 | ConvertContext (final DomElement element) { return new ConvertContextImpl(DomManagerImpl.getDomInvocationHandler(element)) { @Override public @NotNull DomElement getInvocationElement() { return element; } }; } | createConvertContext |
303,524 | DomElement () { return element; } | getInvocationElement |
303,525 | ConvertContext (final DomInvocationHandler element) { return new ConvertContextImpl(element); } | createConvertContext |
303,526 | boolean (final @NotNull XmlFile xmlFile, final Module module) { return xmlFile.getViewProvider().getVirtualFile().equals(myFile); } | isMyFile |
303,527 | boolean () { return true; } | acceptsOtherRootTagNames |
303,528 | boolean () { return false; } | isAutomaticHighlightingEnabled |
303,529 | Object (Class<?> key) { Class<?> implementation = implementationClassCache.get(key); Class<?> aClass = implementation == null ? key : implementation; try { Constructor<?> constructor = aClass.getDeclaredConstructor(); constructor.setAccessible(true); return constructor.newInstance(); } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { throw new RuntimeException("Couldn't instantiate " + aClass, e); } } | computeValue |
303,530 | void (Class<?> clazz, Converter<?> converter) { mySimpleConverters.put(clazz, converter); } | addConverter |
303,531 | PsiElement () { T t = retrieveDomElement(); return t == null ? null : t.getXmlElement(); } | getPsiElement |
303,532 | boolean (final Object o) { if (this == o) return true; if (!(o instanceof NamedAnchor that)) return false; if (myDescr != null ? !myDescr.equals(that.myDescr) : that.myDescr != null) return false; if (myName != null ? !myName.equals(that.myName) : that.myName != null) return false; if (myParent != null ? !myParent.equals(that.myParent) : that.myParent != null) return false; if (myIndex != that.myIndex) return false; return true; } | equals |
303,533 | int () { int result; result = (myParent != null ? myParent.hashCode() : 0); result = 31 * result + (myDescr != null ? myDescr.hashCode() : 0); result = 31 * result + (myName != null ? myName.hashCode() : 0); result = 31 * result + myIndex; return result; } | hashCode |
303,534 | T () { final DomElement parent = myParent.retrieveDomElement(); if (parent == null) return null; final List<? extends DomElement> list = myDescr.getValues(parent); int i = 0; for (final DomElement element : list) { final String s = element.getGenericInfo().getElementName(element); if (myName.equals(s)) { if (i == myIndex) { //noinspection unchecked return (T)element; } i++; } } return null; } | retrieveDomElement |
303,535 | XmlFile () { return myParent.getContainingFile(); } | getContainingFile |
303,536 | boolean (final Object o) { if (this == o) return true; if (!(o instanceof IndexedAnchor that)) return false; if (myIndex != that.myIndex) return false; if (myDescr != null ? !myDescr.equals(that.myDescr) : that.myDescr != null) return false; if (myParent != null ? !myParent.equals(that.myParent) : that.myParent != null) return false; return true; } | equals |
303,537 | int () { int result; result = (myParent != null ? myParent.hashCode() : 0); result = 31 * result + (myDescr != null ? myDescr.hashCode() : 0); result = 31 * result + myIndex; return result; } | hashCode |
303,538 | T () { final DomElement parent = myParent.retrieveDomElement(); if (parent == null) return null; final List<? extends DomElement> list = myDescr.getValues(parent); if (myIndex < 0 || myIndex >= list.size()) return null; //noinspection unchecked return (T)list.get(myIndex); } | retrieveDomElement |
303,539 | XmlFile () { return myParent.getContainingFile(); } | getContainingFile |
303,540 | boolean (final Object o) { if (this == o) return true; if (!(o instanceof RootAnchor that)) return false; if (myClass != null ? !myClass.equals(that.myClass) : that.myClass != null) return false; if (myFile != null ? !myFile.equals(that.myFile) : that.myFile != null) return false; return true; } | equals |
303,541 | int () { int result; result = (myFile != null ? myFile.hashCode() : 0); result = 31 * result + (myClass != null ? myClass.hashCode() : 0); return result; } | hashCode |
303,542 | T () { final DomFileElement<T> fileElement = DomManager.getDomManager(myFile.getProject()).getFileElement(myFile, myClass); return fileElement == null ? null : fileElement.getRootElement(); } | retrieveDomElement |
303,543 | XmlFile () { return myFile; } | getContainingFile |
303,544 | T () { PsiElement psi = myAnchor.retrieve(); if (psi == null) return null; if (psi instanceof XmlTag) { return (T)DomManager.getDomManager(myProject).getDomElement((XmlTag)psi); } if (psi instanceof XmlAttribute) { return (T)DomManager.getDomManager(myProject).getDomElement((XmlAttribute)psi); } return null; } | retrieveDomElement |
303,545 | XmlFile () { return (XmlFile)myAnchor.getFile(); } | getContainingFile |
303,546 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PsiBasedDomAnchor anchor = (PsiBasedDomAnchor)o; if (myAnchor != null ? !myAnchor.equals(anchor.myAnchor) : anchor.myAnchor != null) return false; if (myProject != null ? !myProject.equals(anchor.myProject) : anchor.myProject != null) return false; return true; } | equals |
303,547 | int () { int result = myAnchor != null ? myAnchor.hashCode() : 0; result = 31 * result + (myProject != null ? myProject.hashCode() : 0); return result; } | hashCode |
303,548 | T () { return (T)myHandler.getProxy(); } | retrieveDomElement |
303,549 | XmlFile () { return myHandler.getFile(); } | getContainingFile |
303,550 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StubAnchor anchor = (StubAnchor)o; if (myHandler != null ? !myHandler.equals(anchor.myHandler) : anchor.myHandler != null) return false; return true; } | equals |
303,551 | int () { return myHandler != null ? myHandler.hashCode() : 0; } | hashCode |
303,552 | Type (final @NotNull Type nominalType) { return getStub() == null ? getManager().getTypeChooserManager().getTypeChooser(nominalType).chooseType(getXmlTag()) : nominalType; } | narrowType |
303,553 | XmlTag () { throw new UnsupportedOperationException("CollectionElementInvocationHandler.setXmlTag() shouldn't be called;" + "\nparent=" + getParent() + ";\n" + "xmlElementName=" + getXmlElementName()); } | setEmptyXmlTag |
303,554 | String () { final String s = super.checkValidity(); if (s != null) { return s; } if (getXmlTag() == null) { return "no XmlTag for collection element: " + getDomElementType(); } return null; } | checkValidity |
303,555 | void () { final DomElement parent = getParent(); final XmlTag tag = getXmlTag(); if (tag == null) return; setXmlElement(null); deleteTag(tag); getManager().fireEvent(new DomEvent(parent, false)); } | undefineInternal |
303,556 | DomElement () { AbstractDomChildDescriptionImpl description = getChildDescription(); final DomElement parent = getParent(); assert parent != null; final DomElement parentCopy = parent.createStableCopy(); final int index = description.getValues(parent).indexOf(getProxy()); return getManager().createStableValue((Factory<DomElement>)() -> { if (parentCopy.isValid()) { final List<? extends DomElement> list = description.getValues(parentCopy); if (list.size() > index) { return list.get(index); } } return null; }); } | createPathStableCopy |
303,557 | int () { ElementStub stub = (ElementStub)getStub(); if (stub != null) { return stub.getName().hashCode() + stub.getStubId(); } final XmlElement element = getXmlElement(); return element == null ? super.hashCode() : element.hashCode(); } | hashCode |
303,558 | int (final AbstractDomChildDescriptionImpl o) { return equals(o) ? 0 : -1; } | compareTo |
303,559 | List<XmlTag> (final DomInvocationHandler handler, final XmlTag[] subTags, final XmlFile file) { return DomImplUtil.getCustomSubTags(handler, subTags, file); } | getSubTags |
303,560 | EvaluatedXmlName (final DomInvocationHandler parent, final XmlTag childTag) { return new DummyEvaluatedXmlName(childTag.getLocalName(), childTag.getNamespace()); } | createEvaluatedXmlName |
303,561 | TagNameDescriptor () { return myTagNameDescriptor; } | getTagNameDescriptor |
303,562 | AttributeDescriptor () { return myAttributeDescriptor; } | getCustomAttributeDescriptor |
303,563 | boolean (Object obj) { return obj instanceof CustomDomChildrenDescriptionImpl; } | equals |
303,564 | int () { return 239; } | hashCode |
303,565 | boolean (final Class<?> first, final Class<?> second) { return isInt(first) && second.equals(Class.class); } | isIndexClassAdder |
303,566 | boolean (final Class<?> aClass) { return aClass.equals(int.class) || aClass.equals(Integer.class); } | isInt |
303,567 | boolean (JavaMethod method) { final XmlName tagName = extractTagName(method, "add"); if (tagName == null) return false; final Type type = myCollectionChildrenTypes.get(tagName); if (type == null || !ClassUtil.getRawType(type).isAssignableFrom(method.getReturnType())) return false; if (method.getParameterCount() == 0) return true; return ADDER_PARAMETER_TYPES.containsAll(Arrays.asList(method.getParameterTypes())); } | isAddMethod |
303,568 | boolean (final Type type) { return type != null && DomElement.class.isAssignableFrom(ClassUtil.getRawType(type)); } | isDomElement |
303,569 | boolean (final JavaMethod method) { if (DomImplUtil.isTagValueGetter(method)) { myValueElement = true; return true; } final Class returnType = method.getReturnType(); final boolean isAttributeValueMethod = GenericAttributeValue.class.isAssignableFrom(returnType); final JavaMethodSignature signature = method.getSignature(); final Attribute annotation = method.getAnnotation(Attribute.class); final boolean isAttributeMethod = annotation != null || isAttributeValueMethod; if (annotation != null) { assert isAttributeValueMethod || GenericAttributeValue.class.isAssignableFrom(returnType) : method + " should return GenericAttributeValue"; } if (isAttributeMethod) { final String s = annotation == null ? null : annotation.value(); String attributeName = StringUtil.isEmpty(s) ? getNameFromMethod(method, true) : s; assert attributeName != null && StringUtil.isNotEmpty(attributeName) : "Can't guess attribute name from method name: " + method.getName(); final XmlName attrName = DomImplUtil.createXmlName(attributeName, method); myAttributes.put(signature, new AttributeChildDescriptionImpl(attrName, method)); return true; } if (isDomElement(returnType)) { final String qname = getSubTagName(method); if (qname != null) { final XmlName xmlName = DomImplUtil.createXmlName(qname, method); Type collectionType = myCollectionChildrenTypes.get(xmlName); if (collectionType != null) { LOG.error("Collection (" + collectionType + ") and fixed children cannot intersect: " + qname + " for " + myClass); } int index = 0; final SubTag subTagAnnotation = method.getAnnotation(SubTag.class); if (subTagAnnotation != null && subTagAnnotation.index() != 0) { index = subTagAnnotation.index(); } Int2ObjectMap<Collection<JavaMethod>> map = myFixedChildrenGetters.get(xmlName); Collection<JavaMethod> methods = map.get(index); if (methods == null) { map.put(index, methods = new SmartList<>()); } methods.add(method); return true; } } final Type type = DomReflectionUtil.extractCollectionElementType(method.getGenericReturnType()); if (isDomElement(type)) { final CustomChildren customChildren = method.getAnnotation(CustomChildren.class); if (customChildren != null) { myCustomChildrenGetter = method; return true; } final SubTagsList subTagsList = method.getAnnotation(SubTagsList.class); if (subTagsList != null) { myCompositeCollectionGetters.put(signature, subTagsList.value()); return true; } final String qname = getSubTagNameForCollection(method); if (qname != null) { XmlName xmlName = DomImplUtil.createXmlName(qname, type, method); assert !myFixedChildrenGetters.containsKey(xmlName) : "Collection and fixed children cannot intersect: " + qname; myCollectionChildrenTypes.put(xmlName, type); myCollectionGetters.put(xmlName, method); return true; } } return false; } | processGetterMethod |
303,570 | boolean (final JavaMethod method) { if (ourDomElementMethods.contains(method.getSignature())) return true; final Class<?> aClass = method.getDeclaringClass(); return aClass.equals(GenericAttributeValue.class) || aClass.equals(GenericDomValue.class) && "getConverter".equals(method.getName()); } | isCoreMethod |
303,571 | DomNameStrategy (boolean isAttribute) { final DomNameStrategy strategy = DomImplUtil.getDomNameStrategy(ClassUtil.getRawType(myClass), isAttribute); return strategy != null ? strategy : DomNameStrategy.HYPHEN_STRATEGY; } | getNameStrategy |
303,572 | JavaMethod () { return myNameValueGetter; } | getNameValueGetter |
303,573 | boolean () { return myValueElement; } | isValueElement |
303,574 | Object (final DomInvocationHandler handler, final Object[] args) { final XmlTag tag = handler.ensureTagExists(); Set<XmlTag> set = new HashSet<>(); for (final CollectionChildDescriptionImpl qname : myQnames) { set.addAll(qname.getCollectionSubTags(handler, tag, true)); } int index = args != null && args.length == 1 ? (Integer)args[0] : Integer.MAX_VALUE; XmlTag lastTag = null; int i = 0; final XmlTag[] tags = tag.getSubTags(); for (final XmlTag subTag : tags) { if (i == index) break; if (set.contains(subTag)) { lastTag = subTag; i++; } } final DomManagerImpl manager = handler.getManager(); final boolean b = manager.setChanging(true); try { final EvaluatedXmlName evaluatedXmlName = handler.createEvaluatedXmlName(myMainDescription.getXmlName()); final XmlTag emptyTag = handler.createChildTag(evaluatedXmlName); final XmlTag newTag; if (lastTag == null) { if (tags.length == 0) { newTag = (XmlTag)tag.add(emptyTag); } else { newTag = (XmlTag)tag.addBefore(emptyTag, tags[0]); } } else { newTag = (XmlTag)tag.addAfter(emptyTag, lastTag); } return new CollectionElementInvocationHandler(myType, newTag, myMainDescription, handler, null).getProxy(); } finally { manager.setChanging(b); } } | invoke |
303,575 | void (@NotNull PluginDescriptor pluginDescriptor) { this.pluginDescriptor = pluginDescriptor; } | setPluginDescriptor |
303,576 | Converter () { return myConverter; } | getConverter |
303,577 | boolean () { return mySoft; } | soft |
303,578 | boolean (Object o) { if (this == o) return true; if (!(o instanceof ConvertAnnotationImpl that)) return false; if (mySoft != that.mySoft) return false; if (!myConverter.getClass().equals(that.myConverter.getClass())) return false; return true; } | equals |
303,579 | int () { int result = myConverter.getClass().hashCode(); result = 31 * result + (mySoft ? 1 : 0); return result; } | hashCode |
303,580 | void (DomElement element, String msg) { if (element instanceof DomFileElementImpl) { final String s = ((DomFileElementImpl<?>)element).checkValidity(); if (s != null) { throw new AssertionError(s); } return; } final DomInvocationHandler handler = DomManagerImpl.getDomInvocationHandler(element); assert handler != null; try { handler.assertValid(); } catch (AssertionError e) { throw new AssertionError(msg + e.getMessage()); } } | assertValidity |
303,581 | boolean (final JavaMethod method) { if (!isGetter(method)) { return false; } if (hasTagValueAnnotation(method)) { return true; } if ("getValue".equals(method.getName())) { if (method.getAnnotation(SubTag.class) != null) return false; if (method.getAnnotation(SubTagList.class) != null) return false; if (method.getAnnotation(Convert.class) != null || method.getAnnotation(Resolve.class) != null) { return !ReflectionUtil.isAssignable(GenericDomValue.class, method.getReturnType()); } if (ReflectionUtil.isAssignable(DomElement.class, method.getReturnType())) return false; return true; } return false; } | isTagValueGetter |
303,582 | boolean (final JavaMethod method) { return method.getAnnotation(TagValue.class) != null; } | hasTagValueAnnotation |
303,583 | boolean (final JavaMethod method) { final @NonNls String name = method.getName(); final boolean isGet = name.startsWith("get"); final boolean isIs = !isGet && name.startsWith("is"); if (!isGet && !isIs) { return false; } if (method.getGenericParameterTypes().length != 0) { return false; } final Type returnType = method.getGenericReturnType(); if (isGet) { return returnType != void.class; } return DomReflectionUtil.canHaveIsPropertyGetterPrefix(returnType); } | isGetter |
303,584 | boolean (final JavaMethod method) { boolean setter = method.getName().startsWith("set") && method.getGenericParameterTypes().length == 1 && method.getReturnType() == void.class; return setter && (hasTagValueAnnotation(method) || "setValue".equals(method.getName())); } | isTagValueSetter |
303,585 | List<XmlTag> (final @NotNull XmlTag tag, final EvaluatedXmlName name, final XmlFile file) { return findSubTags(tag, name, file, false); } | findSubTags |
303,586 | List<XmlTag> (final @NotNull XmlTag tag, final EvaluatedXmlName name, final XmlFile file, boolean processIncludes) { if (!tag.isValid()) { throw new AssertionError("Invalid tag"); } final XmlTag[] tags = tag instanceof XmlTagImpl ? ((XmlTagImpl)tag).getSubTags(processIncludes) : tag.getSubTags(); if (tags.length == 0) { return Collections.emptyList(); } return ContainerUtil.findAll(tags, childTag -> { ProgressManager.checkCanceled(); try { return isNameSuitable(name, childTag, file); } catch (PsiInvalidElementAccessException e) { if (!childTag.isValid()) { LOG.error("tag.getSubTags() returned invalid, " + "tag=" + tag + ", " + "containing file: " + tag.getContainingFile() + "subTag.parent=" + childTag.getNode().getTreeParent()); return false; } throw e; } }); } | findSubTags |
303,587 | List<XmlTag> (final XmlTag[] tags, final EvaluatedXmlName name, final XmlFile file) { if (tags.length == 0) { return Collections.emptyList(); } return ContainerUtil.findAll(tags, childTag -> isNameSuitable(name, childTag, file)); } | findSubTags |
303,588 | boolean (final XmlName name, final XmlTag tag, final @NotNull DomInvocationHandler handler, final XmlFile file) { return isNameSuitable(handler.createEvaluatedXmlName(name), tag, file); } | isNameSuitable |
303,589 | boolean (final EvaluatedXmlName evaluatedXmlName, final XmlTag tag, final XmlFile file) { String evaluatedLocalName = evaluatedXmlName.getXmlName().getLocalName(); boolean qNameMatch = evaluatedLocalName.equals(tag.getName()); return (qNameMatch || evaluatedLocalName.equals(tag.getLocalName())) && evaluatedXmlName.isNamespaceAllowed(tag.getNamespace(), file, !qNameMatch); } | isNameSuitable |
303,590 | List<XmlTag> (final DomInvocationHandler handler, final XmlTag[] subTags, final XmlFile file) { if (subTags.length == 0) { return Collections.emptyList(); } final DomGenericInfoEx info = handler.getGenericInfo(); final Set<XmlName> usedNames = new HashSet<>(); List<? extends DomCollectionChildDescription> collectionChildrenDescriptions = info.getCollectionChildrenDescriptions(); //noinspection ForLoopReplaceableByForEach for (int i = 0, size = collectionChildrenDescriptions.size(); i < size; i++) { DomCollectionChildDescription description = collectionChildrenDescriptions.get(i); usedNames.add(description.getXmlName()); } List<? extends DomFixedChildDescription> fixedChildrenDescriptions = info.getFixedChildrenDescriptions(); //noinspection ForLoopReplaceableByForEach for (int i = 0, size = fixedChildrenDescriptions.size(); i < size; i++) { DomFixedChildDescription description = fixedChildrenDescriptions.get(i); usedNames.add(description.getXmlName()); } return ContainerUtil.findAll(subTags, tag -> { if (StringUtil.isEmpty(tag.getLocalName())) return false; for (final XmlName name : usedNames) { if (isNameSuitable(name, tag, handler, file)) { return false; } } return true; }); } | getCustomSubTags |
303,591 | XmlFile (DomElement domElement) { if (domElement instanceof DomFileElement) { return ((DomFileElement<?>)domElement).getFile(); } DomInvocationHandler handler = DomManagerImpl.getDomInvocationHandler(domElement); assert handler != null : domElement; while (true) { if (handler instanceof DomRootInvocationHandler) { return ((DomRootInvocationHandler)handler).getParent().getFile(); } XmlTag tag = handler.getXmlTag(); if (tag != null) { return getContainingFile(tag); } DomInvocationHandler parent = handler.getParentHandler(); if (parent == null) { throw new AssertionError("No parent for " + handler.toStringEx()); } handler = parent; } } | getFile |
303,592 | XmlFile (XmlTag tag) { while (true) { final PsiElement parentTag = PhysicalDomParentStrategy.getParentTagCandidate(tag); if (!(parentTag instanceof XmlTag)) { return (XmlFile)tag.getContainingFile(); } tag = (XmlTag)parentTag; } } | getContainingFile |
303,593 | JavaMethod (int index) { if (myGetterMethods.length == 0) return null; final Collection<JavaMethod> methods = myGetterMethods[index]; return methods == null || methods.isEmpty() ? null : methods.iterator().next(); } | getGetterMethod |
303,594 | int () { return myCount; } | getCount |
303,595 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; final FixedChildDescriptionImpl that = (FixedChildDescriptionImpl)o; if (myCount != that.myCount) return false; if (!Arrays.equals(myGetterMethods, that.myGetterMethods)) return false; return true; } | equals |
303,596 | String () { return getXmlElementName() + " " + getGetterMethod(0) + " " + getType(); } | toString |
303,597 | int () { int result = super.hashCode(); result = 29 * result + myCount; return result; } | hashCode |
303,598 | DomElementAnnotationsManagerImpl (@NotNull Project project) { return (DomElementAnnotationsManagerImpl)DomElementAnnotationsManager.getInstance(project); } | getAnnotationsManager |
303,599 | void (@NotNull PsiElement psiElement, @NotNull AnnotationHolder holder) { if (!(psiElement instanceof XmlFile)) { return; } PsiFile file = holder.getCurrentAnnotationSession().getFile(); Project project = file.getProject(); DomManager domManager = DomManager.getDomManager(project); DomFileDescription<?> description = file instanceof XmlFile ? domManager.getDomFileDescription((XmlFile)file) : null; if (description != null) { psiElement.accept(new XmlRecursiveElementWalkingVisitor(){ @Override public void visitXmlElement(@NotNull XmlElement element) { DomElement domElement = getDomElement(element, domManager); if (domElement != null) { DomFileElement<DomElement> root = DomUtil.getFileElement(domElement); DomElementsInspection<DomElement> inspection = getAnnotationsManager(project).getMockInspection(root); if (inspection != null) { runInspection(inspection, root, holder); } } else { super.visitXmlElement(element); } } }); } } | annotate |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.