Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
77,500
boolean () { return false; }
hasTypeParameters
77,501
PsiJavaToken () { return null; }
getLBrace
77,502
PsiJavaToken () { return null; }
getRBrace
77,503
PsiIdentifier () { return null; }
getNameIdentifier
77,504
PsiElement () { return null; }
getScope
77,505
boolean (@NotNull PsiClass baseClass, PsiClass classToByPass) { return InheritanceImplUtil.isInheritorDeep(this, baseClass, classToByPass); }
isInheritorDeep
77,506
boolean (@NotNull PsiClass baseClass, boolean checkDeep) { return InheritanceImplUtil.isInheritor(this, baseClass, checkDeep); }
isInheritor
77,507
String () { return myName; }
getName
77,508
PsiModifierList () { return null; }
getModifierList
77,509
boolean (@NotNull String name) { return PsiModifier.PUBLIC.equals(name); }
hasModifierProperty
77,510
PsiDocComment () { return null; }
getDocComment
77,511
boolean () { return false; }
isDeprecated
77,512
PsiMetaData () { return null; }
getMetaData
77,513
Icon (final int flags) { return PsiClassImplUtil.getClassIcon(flags, this); }
getElementIcon
77,514
boolean (final PsiElement another) { return PsiClassImplUtil.isClassEquivalentTo(this, another); }
isEquivalentTo
77,515
SearchScope () { return PsiClassImplUtil.getClassUseScope(this); }
getUseScope
77,516
PsiMigrationManager (Project project) { return project.getService(PsiMigrationManager.class); }
getInstance
77,517
PsiMigrationImpl () { return myCurrentMigration; }
getCurrentMigration
77,518
PsiMigration () { LOG.assertTrue(myCurrentMigration == null); myCurrentMigration = new PsiMigrationImpl(this, JavaPsiFacade.getInstance(myProject), (PsiManagerImpl)PsiManager.getInstance(myProject)); return myCurrentMigration; }
startMigration
77,519
void (boolean terminated) { if (terminated) { myCurrentMigration = null; } PsiManager.getInstance(myProject).dropPsiCaches(); }
migrationModified
77,520
String () { return "MigrationPackage: " + getQualifiedName(); }
toString
77,521
boolean () { return false; }
isWritable
77,522
boolean () { return myMigration.isValid(); }
isValid
77,523
void (@NotNull String newQualifiedName) { throw new UnsupportedOperationException(); }
handleQualifiedNameChange
77,524
boolean (@NotNull GlobalSearchScope scope) { return true; }
mayHaveContentInScope
77,525
PsiClass (String qualifiedName) { assertValid(); ApplicationManager.getApplication().assertWriteAccessAllowed(); final MigrationClassImpl migrationClass = new MigrationClassImpl(this, qualifiedName); final MigrationClassImpl oldMigrationClass = myQNameToClassMap.put(qualifiedName, migrationClass); LOG.assertTrue(oldMig...
createClass
77,526
List<PsiClass> (String packageName) { assertValid(); ApplicationManager.getApplication().assertReadAccessAllowed(); List<PsiClass> psiClasses = myPackageToClassesMap.get(packageName); if (psiClasses == null) { psiClasses = new ArrayList<>(); myPackageToClassesMap.put(packageName, psiClasses); } return psiClasses; }
getClassesList
77,527
PsiPackage (String qualifiedName) { assertValid(); ApplicationManager.getApplication().assertWriteAccessAllowed(); final MigrationPackageImpl migrationPackage = new MigrationPackageImpl(this, qualifiedName); final MigrationPackageImpl oldMigrationPackage = myQNameToPackageMap.put(qualifiedName, migrationPackage); LOG.a...
createPackage
77,528
void () { assertValid(); myQNameToClassMap.clear(); myQNameToPackageMap.clear(); myPackageToClassesMap.clear(); myPackageToSubpackagesMap.clear(); myIsValid = false; myMigrationManager.migrationModified(true); }
finish
77,529
void () { LOG.assertTrue(myIsValid); }
assertValid
77,530
List<PsiPackage> (final String parentName) { assertValid(); List<PsiPackage> psiPackages = myPackageToSubpackagesMap.get(parentName); if (psiPackages == null) { psiPackages = new ArrayList<>(); myPackageToSubpackagesMap.put(parentName, psiPackages); } return psiPackages; }
getSubpackagesList
77,531
List<PsiClass> (String packageName) { assertValid(); return getClassesList(packageName); }
getMigrationClasses
77,532
List<PsiPackage> (String packageName) { assertValid(); return getSubpackagesList(packageName); }
getMigrationPackages
77,533
PsiClass (String qualifiedName) { assertValid(); return myQNameToClassMap.get(qualifiedName); }
getMigrationClass
77,534
PsiPackage (String qualifiedName) { assertValid(); return myQNameToPackageMap.get(qualifiedName); }
getMigrationPackage
77,535
String (String qualifiedName) { final int lastDotIndex = qualifiedName.lastIndexOf('.'); return lastDotIndex >= 0 ? qualifiedName.substring(0, lastDotIndex) : ""; }
parentPackageName
77,536
PsiElement (@NotNull PsiElement element) { if (!element.getLanguage().isKindOf(JavaLanguage.INSTANCE) || !element.isPhysical()) { return null; } if (element instanceof PsiAnonymousClass) { return ((PsiAnonymousClass)element).getBaseClassReference().getReferenceNameElement(); } if (element instanceof PsiClass || element...
getAnchor
77,537
PsiElement (@NotNull PsiElement anchor) { if (anchor instanceof PsiIdentifier) { PsiElement parent = anchor.getParent(); if (parent instanceof PsiJavaCodeReferenceElement) { // anonymous class, type parent = parent.getParent(); } return parent; } if (anchor instanceof PsiJavaFile) { return ((PsiJavaFile)anchor).getImpo...
restoreElement
77,538
PsiPackage (@NotNull PsiDirectory dir) { Project project = dir.getProject(); VirtualFile file = dir.getVirtualFile(); if (file instanceof LightVirtualFile lvf && lvf.getOriginalFile() != null) { file = lvf.getOriginalFile(); } String packageName = PackageIndex.getInstance(project).getPackageNameByDirectory(file); if (p...
getPackage
77,539
PsiPackage (@NotNull PsiDirectory dir) { PsiPackage aPackage = getPackage(dir); if (aPackage != null) { ProjectFileIndex fileIndex = ProjectRootManager.getInstance(dir.getProject()).getFileIndex(); VirtualFile virtualFile = dir.getVirtualFile(); if (fileIndex.isInSourceContent(virtualFile) && !fileIndex.isUnderSourceRo...
getPackageInSources
77,540
String (String templateName, Project project) { return JavaBundle.message("psi.error.incorrect.class.template.message", FileTemplateManager.getInstance(project).internalTemplateToSubject(templateName), templateName); }
getIncorrectTemplateMessage
77,541
boolean (@NotNull PsiDirectory dir) { final VirtualFile file = dir.getVirtualFile(); final VirtualFile sourceRoot = ProjectRootManager.getInstance(dir.getProject()).getFileIndex().getSourceRootForFile(file); return file.equals(sourceRoot); }
isSourceRoot
77,542
LanguageLevel (@NotNull PsiDirectory dir) { return JavaPsiImplementationHelper.getInstance(dir.getProject()).getEffectiveLanguageLevel(dir.getVirtualFile()); }
getLanguageLevel
77,543
PsiDirectory (@NotNull final VirtualFile file) { return new PsiJavaDirectoryImpl(myManager, file); }
createDirectory
77,544
String (@NotNull final PsiDirectory directory, final boolean presentable) { final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(directory); if (aPackage != null) { final String qualifiedName = aPackage.getQualifiedName(); if (!qualifiedName.isEmpty()) return qualifiedName; if (presentable) { retur...
getQualifiedName
77,545
PsiDirectoryContainer (@NotNull PsiDirectory directory) { return JavaDirectoryService.getInstance().getPackage(directory); }
getDirectoryContainer
77,546
boolean (@NotNull PsiDirectory directory) { ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myManager.getProject()).getFileIndex(); VirtualFile virtualFile = directory.getVirtualFile(); PackageIndex packageIndex = PackageIndex.getInstance(myManager.getProject()); return fileIndex.isUnderSourceRootOfType(vir...
isPackage
77,547
boolean (String name) { return PsiNameHelper.getInstance(myManager.getProject()).isQualifiedName(name); }
isValidPackageName
77,548
GlobalSearchScope (@NotNull PsiPackage psiPackage, @NotNull GlobalSearchScope globalSearchScope) { return NonClasspathClassFinder.addNonClasspathScope(psiPackage.getProject(), globalSearchScope); }
adjustAllScope
77,549
void (@NotNull final PsiPackage psiPackage, @NotNull final String newQualifiedName) { ApplicationManager.getApplication().assertWriteAccessAllowed(); final String oldQualifedName = psiPackage.getQualifiedName(); final boolean anyChanged = changePackagePrefixes(psiPackage, oldQualifedName, newQualifiedName); if (anyChan...
handleQualifiedNameChange
77,550
void () { changePackagePrefixes(psiPackage, newQualifiedName, oldQualifedName); }
undo
77,551
void () { changePackagePrefixes(psiPackage, oldQualifedName, newQualifiedName); }
redo
77,552
boolean (@NotNull PsiPackage psiPackage, @NotNull String oldQualifiedName, @NotNull String newQualifiedName) { final Module[] modules = ModuleManager.getInstance(psiPackage.getProject()).getModules(); List<ModifiableRootModel> modelsToCommit = new ArrayList<>(); for (final Module module : modules) { boolean anyChange =...
changePackagePrefixes
77,553
void (@NotNull final PsiPackage psiPackage, final boolean requestFocus) { final Project project = psiPackage.getProject(); ToolWindow window = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.PROJECT_VIEW); if (window != null) { window.activate(null); } final ProjectView projectView = ProjectView.getIn...
navigate
77,554
boolean (@NotNull PsiPackage psiPackage) { return PackagePrefixElementFinder.getInstance(psiPackage.getProject()).packagePrefixExists(psiPackage.getQualifiedName()); }
packagePrefixExists
77,555
boolean (@NotNull final PsiFile file) { return file instanceof PsiClassOwner && !JavaProjectRootsUtil.isOutsideJavaSourceRoot(file); }
canProcessElement
77,556
ItemPresentation () { PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(this); return aPackage != null && !StringUtil.isEmpty(aPackage.getName()) ? aPackage.getPresentation() : super.getPresentation(); }
getPresentation
77,557
int () { return myJavaSettings.getNamesCountToUseImportOnDemand(); }
getNamesCountToUseImportOnDemand
77,558
boolean (String qualifiedName) { return myJavaSettings.PACKAGES_TO_USE_IMPORT_ON_DEMAND.contains(qualifiedName); }
isToImportOnDemand
77,559
boolean () { return myJavaSettings.USE_FQ_CLASS_NAMES; }
useFQClassNames
77,560
boolean () { return myJavaSettings.JD_LEADING_ASTERISKS_ARE_ENABLED; }
isJavaDocLeadingAsterisksEnabled
77,561
boolean () { return myJavaSettings.GENERATE_FINAL_PARAMETERS; }
isGenerateFinalParameters
77,562
boolean () { return myJavaSettings.GENERATE_FINAL_LOCALS; }
isGenerateFinalLocals
77,563
JavaFileCodeStyleFacade (@NotNull PsiFile psiFile) { return new JavaFileCodeStyleFacadeImpl(CodeStyle.getSettings(psiFile)); }
createFacade
77,564
List<String> () { return myRepeatAnnotations; }
getRepeatAnnotations
77,565
void (List<String> repeatAnnotations) { myRepeatAnnotations.clear(); myRepeatAnnotations.addAll(repeatAnnotations); }
setRepeatAnnotations
77,566
List<String> () { return myDoNotImportInner; }
getDoNotImportInner
77,567
void (List<String> doNotImportInner) { myDoNotImportInner = doNotImportInner; }
setDoNotImportInner
77,568
boolean () { return CLASS_NAMES_IN_JAVADOC == FULLY_QUALIFY_NAMES_ALWAYS; }
useFqNamesInJavadocAlways
77,569
boolean () { return LAYOUT_STATIC_IMPORTS_SEPARATELY; }
isLayoutStaticImportsSeparately
77,570
void (boolean value) { LAYOUT_STATIC_IMPORTS_SEPARATELY = value; }
setLayoutStaticImportsSeparately
77,571
int () { return NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND; }
getNamesCountToUseImportOnDemand
77,572
void (int value) { NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND = value; }
setNamesCountToUseImportOnDemand
77,573
int () { return CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND; }
getClassCountToUseImportOnDemand
77,574
void (int value) { CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND = value; }
setClassCountToUseImportOnDemand
77,575
boolean () { return INSERT_INNER_CLASS_IMPORTS; }
isInsertInnerClassImports
77,576
void (boolean value) { INSERT_INNER_CLASS_IMPORTS = value; }
setInsertInnerClassImports
77,577
boolean (String className) { return INSERT_INNER_CLASS_IMPORTS && !myDoNotImportInner.contains(className); }
isInsertInnerClassImportsFor
77,578
boolean () { return USE_SINGLE_CLASS_IMPORTS; }
isUseSingleClassImports
77,579
void (boolean value) { USE_SINGLE_CLASS_IMPORTS = value; }
setUseSingleClassImports
77,580
boolean () { return USE_FQ_CLASS_NAMES; }
isUseFqClassNames
77,581
void (boolean value) { USE_FQ_CLASS_NAMES = value; }
setUseFqClassNames
77,582
PackageEntryTable () { return IMPORT_LAYOUT_TABLE; }
getImportLayoutTable
77,583
PackageEntryTable () { return PACKAGES_TO_USE_IMPORT_ON_DEMAND; }
getPackagesToUseImportOnDemand
77,584
void () { PACKAGES_TO_USE_IMPORT_ON_DEMAND.addEntry(new PackageEntry(false, "java.awt", false)); PACKAGES_TO_USE_IMPORT_ON_DEMAND.addEntry(new PackageEntry(false,"javax.swing", false)); IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.ALL_OTHER_IMPORTS_ENTRY); IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.BLANK_LINE_ENTRY); IMPOR...
initImportsByDefault
77,585
boolean () { return GENERATE_FINAL_LOCALS; }
isGenerateFinalLocals
77,586
boolean () { return GENERATE_FINAL_PARAMETERS; }
isGenerateFinalParameters
77,587
void (@NotNull CodeStyleSettings rootSettings) { USE_EXTERNAL_ANNOTATIONS = rootSettings.USE_EXTERNAL_ANNOTATIONS; INSERT_OVERRIDE_ANNOTATION = rootSettings.INSERT_OVERRIDE_ANNOTATION; REPEAT_SYNCHRONIZED = rootSettings.REPEAT_SYNCHRONIZED; setRepeatAnnotations(rootSettings.getRepeatAnnotations()); LAYOUT_STATIC_IMPORT...
importLegacySettings
77,588
Object () { JavaCodeStyleSettings cloned = (JavaCodeStyleSettings)super.clone(); cloned.myRepeatAnnotations = new ArrayList<>(); cloned.setRepeatAnnotations(getRepeatAnnotations()); cloned.PACKAGES_TO_USE_IMPORT_ON_DEMAND = new PackageEntryTable(); cloned.PACKAGES_TO_USE_IMPORT_ON_DEMAND.copyFrom(PACKAGES_TO_USE_IMPORT...
clone
77,589
JavaCodeStyleSettings (@NotNull PsiFile file) { return CodeStyle.getCustomSettings(file, JavaCodeStyleSettings.class); }
getInstance
77,590
JavaCodeStyleSettings (@NotNull Project project) { return CodeStyle.getSettings(project).getCustomSettings(JavaCodeStyleSettings.class); }
getInstance
77,591
void (Element parentElement, Collection<? super String> collection, String collectionName, String itemName) { Element child = parentElement.getChild(getTagName()); if (child != null) { collection.clear(); Element item = child.getChild(collectionName); if (item != null) { for (Element element : item.getChildren(itemName...
readExternalCollection
77,592
void (Element parentElement, Collection<String> collection, String collectionName, String itemName) { if (!collection.isEmpty()) { Element child = parentElement.getChild(getTagName()); if (child == null) { child = new Element(getTagName()); parentElement.addContent(child); } Element element = new Element(collectionName...
writeExternalCollection
77,593
void () { REPLACE_INSTANCEOF_AND_CAST |= REPLACE_CAST || REPLACE_INSTANCEOF; REPLACE_CAST = REPLACE_INSTANCEOF = false; }
afterLoaded
77,594
List<String> () { return Arrays.asList(getTagName(), REPEAT_ANNOTATIONS, DO_NOT_IMPORT_INNER); }
getKnownTagNames
77,595
boolean (Object obj) { if (!super.equals(obj)) return false; JavaCodeStyleSettings otherSettings = (JavaCodeStyleSettings)obj; if (!myRepeatAnnotations.equals(otherSettings.getRepeatAnnotations())) return false; return myDoNotImportInner.equals(otherSettings.getDoNotImportInner()); }
equals
77,596
PackageEntryTable (@NotNull List<String> strList) { PackageEntryTable entryTable = new PackageEntryTable(); for (String strValue : strList) { String parseStr = strValue.trim(); if (parseStr.length() > 0 && parseStr.charAt(0) == BLANK_LINE_CHAR) { for (int i = 0; i < parseStr.length(); i ++) { if (parseStr.charAt(i) == ...
fromExternal
77,597
List<String> (@NotNull PackageEntryTable value) { List<String> externalList = new ArrayList<>(); for (PackageEntry entry : value.getEntries()) { if (entry == PackageEntry.BLANK_LINE_ENTRY) { externalList.add(String.valueOf(BLANK_LINE_CHAR)); } else { StringBuilder entryBuilder = new StringBuilder(); if (entry.isStatic(...
toExternal
77,598
String (@NotNull List<String> value) { return toCommaSeparatedString(value); }
valueToString
77,599
boolean () { return false; }
isEmptyListAllowed