Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
5,500
void (AntDomTypeDef typedef) { visitAntDomElement(typedef); }
visitTypeDef
5,501
void (AntDomTaskdef typedef) { visitTypeDef(typedef); }
visitTaskDef
5,502
void (AntDomMacroDef macrodef) { visitAntDomElement(macrodef); }
visitMacroDef
5,503
void (AntDomPresetDef presetdef) { visitAntDomElement(presetdef); }
visitPresetDef
5,504
void (AntDomScriptDef scriptdef) { visitAntDomElement(scriptdef); }
visitScriptDef
5,505
void (AntDomTarget target) { visitAntDomElement(target); }
visitTarget
5,506
void (AntDomProject project) { visitAntDomElement(project); }
visitProject
5,507
void (AntDomProperty property) { visitAntDomElement(property); }
visitProperty
5,508
void (AntDomInclude includeTag) { visitAntDomElement(includeTag); }
visitInclude
5,509
void (AntDomImport importTag) { visitAntDomElement(importTag); }
visitImport
5,510
void (AntDomAntCall antCall) { visitAntDomElement(antCall); }
visitAntDomAntCall
5,511
void (AntDomAntCallParam antCallParam) { visitAntDomElement(antCallParam); }
visitAntDomAntCallParam
5,512
ClassLoader () { ClassLoader loader = myCachedLoader; if (loader == null) { myCachedLoader = loader = CustomAntElementsRegistry.createClassLoader(CustomAntElementsRegistry.collectUrls(this), getContextAntProject()); } return loader; }
getClassLoader
5,513
AntDomElement (@Nullable @NonNls String s, ConvertContext context) { if (s != null) { final AntDomElement element = AntSupport.getInvocationAntDomElement(context); if (element != null) { return findElementById(element.getContextAntProject(), s, CustomAntElementsRegistry.ourIsBuildingClasspathForCustomTagLoading.get());...
fromString
5,514
String (@Nullable AntDomElement antDomElement, ConvertContext context) { return antDomElement != null? antDomElement.getId().getRawText() : null; }
toString
5,515
PsiElement () { final AntDomElement value = genericDomValue.getValue(); if (value == null) { return null; } final DomTarget target = DomTarget.getTarget(value, value.getId()); if (target == null) { return null; } return PomService.convertToPsi(element.getProject(), target); }
resolve
5,516
void (AntDomElement element) { final String variant = element.getId().getRawText(); if (variant != null) { variants.add(variant); } super.visitAntDomElement(element); }
visitAntDomElement
5,517
String () { return AntBundle.message("cannot.resolve.refid", getCanonicalText()); }
getUnresolvedMessagePattern
5,518
AntDomElement (AntDomElement from, final String id, final boolean skipCustomTags) { if (id.equals(from.getId().getRawText())) { return from; } final Ref<AntDomElement> result = new Ref<>(null); from.accept(new AntDomRecursiveVisitor() { @Override public void visitAntDomCustomElement(AntDomCustomElement custom) { if (!s...
findElementById
5,519
void (AntDomCustomElement custom) { if (!skipCustomTags) { super.visitAntDomCustomElement(custom); } }
visitAntDomCustomElement
5,520
void (AntDomElement element) { if (result.get() != null) { return; } if (id.equals(element.getId().getRawText())) { result.set(element); return; } super.visitAntDomElement(element); }
visitAntDomElement
5,521
void (@NotNull XmlAttributeValue element, final Collection<? super PsiReference> refs) { final DomElement domElement = DomUtil.getDomElement(element); if (domElement == null) { return; } final AntDomMacroDef macrodef = domElement.getParentOfType(AntDomMacroDef.class, true); if (macrodef == null) { return; } final Strin...
addMacrodefParameterRefs
5,522
PsiElement () { return ResolveCache.getInstance(getElement().getProject()).resolveWithCaching(this, MyResolver.INSTANCE, false, false); }
resolve
5,523
AntDomElement () { final DomElement selfElement = DomUtil.getDomElement(getElement()); if (selfElement == null) { return null; } return selfElement.getParentOfType(AntDomElement.class, false); }
getHostingAntDomElement
5,524
Set<String> () { final AntDomElement hostingElement = getHostingAntDomElement(); if (hostingElement == null) { return Collections.emptySet(); } final AntDomTarget contextTarget = hostingElement.getParentOfType(AntDomTarget.class, false); if (contextTarget == null) { return Collections.emptySet(); } final Set<String> ex...
getExistingNames
5,525
String () { return AntBundle.message("cannot.resolve.target", getCanonicalText()); }
getUnresolvedMessagePattern
5,526
PsiElement (@NotNull PsiReference psiReference, boolean incompleteCode) { final TargetResolver.Result result = ((AntDomTargetReference)psiReference).doResolve(psiReference.getCanonicalText()); if (result == null) { return null; } final Pair<AntDomTarget,String> pair = result.getResolvedTarget(psiReference.getCanonicalT...
resolve
5,527
void (AntDomTargetReference ref) { myRefs.add(ref); }
addReference
5,528
void (AntDomTargetReference ref, String newText) { Integer lengthDelta = null; for (AntDomTargetReference r : myRefs) { if (lengthDelta != null) { r.setRangeInElement(r.getRangeInElement().shiftRight(lengthDelta)); } else if (r.equals(ref)) { final TextRange range = r.getRangeInElement(); final int oldLength = range.ge...
textChanged
5,529
void (@NotNull final AntDomElement antDomElement, @NotNull DomExtensionsRegistrar registrar) { final XmlElement xmlElement = antDomElement.getXmlElement(); if (xmlElement instanceof XmlTag xmlTag) { final String tagName = xmlTag.getName(); final AntDomProject antProject = antDomElement.getAntProject(); if (antProject =...
registerExtensions
5,530
void (XmlTag xmlTag, DomExtensionsRegistrar registrar, DomGenericInfo genericInfo, AbstractIntrospector parentIntrospector) { final Map<String, Pair<Type, Class<?>>> registeredAttribs = getStaticallyRegisteredAttributes(genericInfo); // define attributes discovered by introspector and not yet defined statically final I...
defineAttributes
5,531
void (DomExtensionsRegistrar registrar, String attribName, final @NotNull Type attributeType, final @Nullable Class converterType) { final DomExtension extension = registrar.registerGenericAttributeValueChildExtension(new XmlName(attribName), attributeType); if (converterType != null) { try { extension.setConverter((Co...
registerAttribute
5,532
DomExtension (DomExtensionsRegistrar registrar, DomGenericInfo elementInfo, String childName) { if (elementInfo.getCollectionChildDescription(childName) == null) { // register if not yet defined statically Class<? extends AntDomElement> modelClass = getModelClass(childName); if (modelClass == null) { modelClass = AntDo...
registerChild
5,533
AntIntrospector (Class c) { try { return AntIntrospector.getInstance(c); } catch (Throwable ignored) { } return null; }
getIntrospector
5,534
boolean (final String baseClassName, final Class clazz) { try { final ClassLoader loader = clazz.getClassLoader(); if (loader != null) { final Class<?> baseClass = loader.loadClass(baseClassName); return baseClass.isAssignableFrom(clazz); } } catch (ClassNotFoundException ignored) { } return false; }
isAssignableFrom
5,535
Set<EvaluatedXmlName> (@NotNull DomElement parent) { if (!(parent instanceof AntDomElement element)) { return Collections.emptySet(); } final AntDomProject antDomProject = element.getAntProject(); if (antDomProject == null) { return Collections.emptySet(); } final CustomAntElementsRegistry registry = CustomAntElementsR...
getCompletionVariants
5,536
PomTarget (DomElement parent, @NotNull EvaluatedXmlName name) { final XmlName xmlName = name.getXmlName(); return doFindDeclaration(parent, xmlName); }
findDeclaration
5,537
PomTarget (@NotNull DomElement child) { XmlName name = new XmlName(child.getXmlElementName(), child.getXmlElementNamespace()); return doFindDeclaration(child.getParent(), name); }
findDeclaration
5,538
PomTarget (DomElement parent, XmlName xmlName) { if (!(parent instanceof AntDomElement parentElement)) { return null; } final AntDomProject antDomProject = parentElement.getAntProject(); if (antDomProject == null) { return null; } final CustomAntElementsRegistry registry = CustomAntElementsRegistry.getInstance(antDomPr...
doFindDeclaration
5,539
Iterator<String> () { return Collections.emptyIterator(); }
getAttributesIterator
5,540
Iterator<String> () { return Collections.emptyIterator(); }
getNestedElementsIterator
5,541
Class (String attribName) { return null; }
getAttributeType
5,542
Class (String elementName) { return null; }
getNestedElementType
5,543
Iterator<String> () { return new EnumerationToIteratorAdapter<>(myIntrospector.getAttributes()); }
getAttributesIterator
5,544
Class (String attribName) { return myIntrospector.getAttributeType(attribName); }
getAttributeType
5,545
boolean () { return myIntrospector.isContainer(); }
isContainer
5,546
Iterator<String> () { initNestedElements(); return myNestedElements.iterator(); }
getNestedElementsIterator
5,547
Class (String attribName) { initNestedElements(); return myNestedElementTypes.get(attribName); }
getNestedElementType
5,548
void () { if (myNestedElements != null) { return; } myNestedElements = new ArrayList<>(); myNestedElementTypes = new HashMap<>(); final Enumeration<String> nestedElements = myIntrospector.getNestedElements(); while (nestedElements.hasMoreElements()) { final String elemName = nestedElements.nextElement(); myNestedElemen...
initNestedElements
5,549
void (String extPoint, Map<String, Class<?>> definitions) { for (Map.Entry<String, Class<?>> entry : definitions.entrySet()) { final Class taskClass = entry.getValue(); if (isAssignableFrom(extPoint, taskClass)) { final String elementName = entry.getKey(); myNestedElements.add(elementName); myNestedElementTypes.put(ele...
processEntries
5,550
void (String extPoint) { for (Map.Entry<String, Collection<Class<?>>> entry : myRestrictedDefinitions.entrySet()) { for (Class<?> typeClass : entry.getValue()) { final String elementName = entry.getKey(); if (!myNestedElementTypes.containsKey(elementName) && isAssignableFrom(extPoint, typeClass)) { myNestedElements.add...
processRestrictedTypeDefinitions
5,551
Iterator<String> () { final List<AntDomMacrodefAttribute> macrodefAttributes = myMacrodef.getMacroAttributes(); if (macrodefAttributes.isEmpty()) { return Collections.emptyIterator(); } final List<String> attribs = new ArrayList<>(macrodefAttributes.size()); for (AntDomMacrodefAttribute attribute : macrodefAttributes) ...
getAttributesIterator
5,552
boolean () { return myMacrodef.getMacroElements().stream() .map(AntDomMacrodefElement::isImplicit) .anyMatch(implicit -> implicit != null && Boolean.TRUE.equals(implicit.getValue())); }
isContainer
5,553
boolean () { return getContexts().stream().allMatch(AbstractIntrospector::isContainer); }
isContainer
5,554
Iterator<String> () { return getNestedElementsMap().keySet().iterator(); }
getNestedElementsIterator
5,555
Class (String elementName) { return getNestedElementsMap().get(elementName); }
getNestedElementType
5,556
List<AbstractIntrospector> () { if (myContexts != null) { return myContexts; } final List<AbstractIntrospector> parents = new ArrayList<>(); final AntDomMacroDef macroDef = myElement.getParentOfType(AntDomMacroDef.class, true); if (macroDef != null) { final AntDomSequentialTask body = macroDef.getMacroBody(); if (body ...
getContexts
5,557
void (AntDomCustomElement custom) { if (myElement.equals(custom.getDeclaringElement())) { final AntDomElement parent = custom.getParentOfType(AntDomElement.class, true); if (parent != null) { final Class type = parent.getChildDescription().getUserData(ELEMENT_IMPL_CLASS_KEY); if (type != null) { final AntIntrospector a...
visitAntDomCustomElement
5,558
Iterator<String> () { final List<AntDomScriptdefAttribute> macrodefAttributes = myScriptDef.getScriptdefAttributes(); final List<String> attribs = new ArrayList<>(macrodefAttributes.size()); for (AntDomScriptdefAttribute attribute : macrodefAttributes) { final String nameAttrib = attribute.getName().getRawText(); if (n...
getAttributesIterator
5,559
boolean () { return false; }
isContainer
5,560
boolean () { return myEnum.hasMoreElements(); }
hasNext
5,561
T () { return myEnum.nextElement(); }
next
5,562
void () { throw new UnsupportedOperationException("remove is not supported"); }
remove
5,563
AntDomProject (GenericAttributeValue attribValue) { return attribValue.getParentOfType(AntDomProject.class, false); }
getEffectiveAntProject
5,564
List<GenericAttributeValue<String>> () { return Collections.singletonList(getName()); }
getPropertyDefiningAttributes
5,565
boolean () { return myShouldBeSkippedByAnnotator; }
shouldBeSkippedByAnnotator
5,566
void (boolean value) { myShouldBeSkippedByAnnotator = true; }
setShouldBeSkippedByAnnotator
5,567
DomElement (PsiElement resolve) { if (resolve instanceof PomTargetPsiElement) { final PomTarget target = ((PomTargetPsiElement)resolve).getTarget(); if(target instanceof DomTarget) { return ((DomTarget)target).getDomElement(); } return null; } return DomUtil.getDomElement(resolve); }
toDomElement
5,568
String (@Nullable TargetResolver.Result result, ConvertContext context) { return result != null? result.getRefsString() : null; }
toString
5,569
PsiElement (@NlsSafe String propertyName) { return PROPERTY_NAME.equals(propertyName)? getXmlElement() : null; }
getNavigationElement
5,570
PsiFileSystemItem (@Nullable @NonNls String s, ConvertContext context) { final GenericAttributeValue attribValue = context.getInvocationElement().getParentOfType(GenericAttributeValue.class, false); if (attribValue == null) { return null; } String path = attribValue.getStringValue(); if (path == null) { path = getAttri...
fromString
5,571
AntDomProject (GenericAttributeValue attribValue) { AntDomProject project = attribValue.getParentOfType(AntDomProject.class, false); if (project != null) { project = project.getContextAntProject(); } return project; }
getEffectiveAntProject
5,572
String (@Nullable PsiFileSystemItem file, ConvertContext context) { final GenericAttributeValue attribValue = context.getInvocationElement().getParentOfType(GenericAttributeValue.class, false); if (attribValue == null) { return null; } return attribValue.getRawText(); }
toString
5,573
boolean (@NotNull XmlFile file, @Nullable Module module) { return super.isMyFile(file, module) && isAntFile(file); }
isMyFile
5,574
Icon (@Iconable.IconFlags int flags) { return AntIcons.AntBuildXml; }
getFileIcon
5,575
boolean (final XmlFile xmlFile) { final XmlDocument document = xmlFile.getDocument(); if (document != null) { final XmlTag tag = document.getRootTag(); final VirtualFile vFile = xmlFile.getOriginalFile().getVirtualFile(); if (tag != null && ROOT_TAG_NAME.equals(tag.getName()) && tag.getContext() instanceof XmlDocument)...
isAntFile
5,576
void (AntDomAntCallParam antCallParam) { // deliberately skip ancall params, they will be processed as a special case }
visitAntDomAntCallParam
5,577
record (PsiElement element, Collection<String> variants, PropertiesProvider provider) {}
PropertyData
5,578
PropertyData (@NotNull AntDomProject project, @NotNull String propertyName, DomElement contextElement) { final PropertyResolver resolver = new PropertyResolver(propertyName, contextElement); resolver.execute(project, project.getDefaultTarget().getRawText()); if (resolver.getContextElement() instanceof PropertiesProvide...
resolve
5,579
PropertyData () { final PsiElement element = myResult != null ? myResult.getNavigationElement(myPropertyName) : null; return new PropertyData(element, Collections.unmodifiableSet(myVariants), myResult); }
getResult
5,580
void (PropertiesProvider propertiesProvider) { boolean found = false; for (Iterator<String> it = propertiesProvider.getNamesIterator(); it.hasNext();) { final String providerProperty = it.next(); myVariants.add(providerProperty); if (myPropertyName.equals(providerProperty)) { found = true; } } if (found) { myResult = p...
propertyProviderFound
5,581
List<Converter> (@NotNull GenericDomValue domElement) { final String raw = domElement.getRawText(); if (raw != null) { if (raw.contains("${") || raw.contains(File.separator) || (File.separatorChar != '/' && raw.contains("/"))) { return Collections.singletonList(new AntPathConverter()); } } return Collections.emptyList(...
getConverters
5,582
Converter (@NotNull GenericDomValue domElement) { final List<Converter> converterList = getConverters(domElement); return converterList.isEmpty()? null : converterList.get(0); }
getConverter
5,583
List<File> (@Nullable AntDomPattern pattern, Set<AntFilesProvider> processed) { assert pattern != null; final File singleFile = getCanonicalFile(getFile().getStringValue()); if (singleFile == null || pattern.hasIncludePatterns()) { // if singleFile is specified, there are no implicit includes final File root = getCanon...
getFiles
5,584
void (List<? super File> container, File from, String relativePath, final AntDomPattern pattern) { if (myDirsProcessed > MAX_DIRS_TO_PROCESS) { return; } final File[] children = from.listFiles(); if (children != null && children.length > 0) { if (myDirCheckEnabled) { if (!pattern.couldBeIncluded(relativePath)) { return...
collectFiles
5,585
String (final String parentPath, final String name) { if (parentPath.length() == 0) { return name; } return parentPath + "/" + name; }
makePath
5,586
void (@NotNull PsiElement element, @NotNull @NlsSafe String newName, @NotNull Map<PsiElement, String> allRenames) { final AntDomElement antElement = convertToAntDomElement(element); String propName = null; if (antElement instanceof AntDomProperty) { propName = ((AntDomProperty)antElement).getName().getStringValue(); } ...
prepareRenaming
5,587
boolean (@NotNull PsiElement element) { final AntDomElement antElement = convertToAntDomElement(element); if (antElement instanceof AntDomProperty || antElement instanceof AntDomAntCallParam) { return true; } return false; }
canProcessElement
5,588
AntDomElement (PsiElement element) { if (element instanceof PomTargetPsiElement) { final PomTarget target = ((PomTargetPsiElement)element).getTarget(); if (target instanceof DomTarget) { final DomElement domElement = ((DomTarget)target).getDomElement(); if (domElement instanceof AntDomElement) { return (AntDomElement)d...
convertToAntDomElement
5,589
void (@NonNls String refsString) { myRefsString = refsString; }
setRefsString
5,590
Collection<String> () { return Collections.unmodifiableSet(myMap.keySet()); }
getTargetReferences
5,591
Result (@NotNull AntDomProject project, @Nullable AntDomTarget contextTarget, @NotNull String declaredTargetRef) { return resolve(project, contextTarget, Collections.singletonList(declaredTargetRef)); }
resolve
5,592
Result (AntDomProject project, AntDomTarget contextTarget, @NotNull Collection<String> declaredTargetRefs) { final TargetResolver resolver = new TargetResolver(declaredTargetRefs, contextTarget); resolver.execute(project, null); final Result result = resolver.getResult(); result.setVariants(resolver.getDiscoveredTarget...
resolve
5,593
void (AntDomProject project, final TargetSink sink) { final TargetResolver resolver = new TargetResolver(Collections.emptyList(), null) { @Override protected void duplicateTargetFound(AntDomTarget existingTarget, AntDomTarget duplicatingTarget, String taregetEffectiveName) { sink.duplicateTargetDetected(existingTarget,...
validateDuplicateTargets
5,594
void (AntDomTarget existingTarget, AntDomTarget duplicatingTarget, String taregetEffectiveName) { sink.duplicateTargetDetected(existingTarget, duplicatingTarget, taregetEffectiveName); }
duplicateTargetFound
5,595
void (Stage completedStage, Stage startingStage) { if (Stage.RESOLVE_MAP_BUILDING_STAGE.equals(completedStage)) { stop(); } }
stageCompleted
5,596
void (AntDomTarget target, String targetEffectiveName, Map<String, Pair<AntDomTarget, String>> dependenciesMap) { if (myContextTarget != null && myDeclaredTargetRefs.size() > 0 && target.equals(myContextTarget)) { for (Iterator<String> it = myDeclaredTargetRefs.iterator(); it.hasNext();) { final String declaredRef = it...
targetDefined
5,597
void (Stage completedStage, Stage startingStage) { if (completedStage == Stage.RESOLVE_MAP_BUILDING_STAGE) { if (myDeclaredTargetRefs.size() > 0) { for (Iterator<String> it = myDeclaredTargetRefs.iterator(); it.hasNext();) { final String declaredRef = it.next(); final AntDomTarget result = getTargetByName(declaredRef);...
stageCompleted
5,598
Result () { return myResult; }
getResult
5,599
void (PropertiesProvider propertiesProvider) { }
propertyProviderFound