Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
286,400
Builder (@Nls @NotNull String fragmentText, @NotNull SimpleTextAttributes attributes) { if (!fragmentText.isEmpty()) { if (myLastFragmentAttributes == null && !myFragments.isEmpty()) { int size = myFragments.size(); Fragment lastFragment = myFragments.get(size - 1); if (attributes.equals(lastFragment.fragmentAttributes...
append
286,401
void () { if (myLastFragmentAttributes != null) { myFragments.add(new ColoredTextFragmentImpl(myLastFragmentTextBuilder.toString(), myLastFragmentAttributes)); myLastFragmentTextBuilder.setLength(0); myLastFragmentAttributes = null; } }
flushLastFragment
286,402
ColoredText () { flushLastFragment(); int size = myFragments.size(); if (size == 0) { return ColoredTextImpl.EMPTY; } else if (size == 1) { return new ColoredTextImpl(myFragments.get(0)); } else { return new ColoredTextImpl(myFragments); } }
build
286,403
Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { myCellState.collectState(table, isSelected, hasFocus, row, column); if (value == null) { myCellState.updateRenderer(myPanel); return myPanel; } myCellState.updateRenderer(this); if (value instanceof String) { setSelected...
getTableCellRendererComponent
286,404
Icon () { return getScaled(0); }
getMainIcon
286,405
Icon () { return getScaled(1); }
getOverlayIcon
286,406
Icon (int layer) { Icon icon = getIcon(layer); assert icon != null; float scale = getScale(); return scale == 1f ? icon : IconUtil.scale(icon, null, scale); }
getScaled
286,407
void (Component c, Graphics g, int x, int y) { Shape dontPaintHere = getOverlayShape(0, 0); if (dontPaintHere == null) { super.paintIcon(c, g, x, y); return; } BufferedImage img = UIUtil.createImage(((Graphics2D)g).getDeviceConfiguration(), getIconWidth(), getIconHeight(), BufferedImage.TYPE_INT_ARGB, PaintUtil.Roundin...
paintIcon
286,408
IconWrapperWithToolTipComposite (@NotNull IconReplacer replacer) { return new IconWrapperWithToolTipComposite(replacer.replaceIcon(myIcon)); }
replaceBy
286,409
void (Component c, Graphics g, int x, int y) { myIcon.paintIcon(c, g, x, y); }
paintIcon
286,410
int () { return myIcon.getIconWidth(); }
getIconWidth
286,411
int () { return myIcon.getIconHeight(); }
getIconHeight
286,412
Icon () { return new IconWrapperWithToolTipComposite(myIcon); }
copy
286,413
Icon () { return myIcon; }
retrieveIcon
286,414
int () { return myIcon.hashCode(); }
hashCode
286,415
boolean (Object object) { return object == this || object instanceof IconWrapperWithToolTipComposite && Objects.equals(((IconWrapperWithToolTipComposite)object).myIcon, this.myIcon); }
equals
286,416
String () { return "IconWrapperWithTooltipComposite:" + myIcon.toString(); }
toString
286,417
String (@Nullable PsiElement element) { if (element == null) return null; return DumbService.getInstance(element.getProject()).computeWithAlternativeResolveEnabled(() -> QualifiedNameProviderUtil.getQualifiedName(element)); }
getQualifiedNameFromProviders
286,418
String (@Nullable final PsiElement element, @Nullable Editor editor) { String result = getQualifiedNameFromProviders(element); if (result != null) return result; if (editor != null) { //IDEA-70346 PsiReference reference = TargetElementUtilBase.findReference(editor, editor.getCaretModel().getOffset()); if (reference != ...
elementToFqn
286,419
String (@NotNull VirtualFile virtualFile, @NotNull Project project) { for (VirtualFileQualifiedNameProvider provider : VirtualFileQualifiedNameProvider.EP_NAME.getExtensionList()) { String qualifiedName = provider.getQualifiedName(project, virtualFile); if (qualifiedName != null) { return qualifiedName; } } VirtualFile...
getVirtualFileFqn
286,420
PsiElement (@NotNull PsiElement element) { for (QualifiedNameProvider provider : QualifiedNameProvider.EP_NAME.getExtensionList()) { PsiElement adjustedElement = provider.adjustElementToCopy(element); if (adjustedElement != null) return adjustedElement; } return null; }
adjustElementToCopy
286,421
String (@NotNull PsiElement element) { for (QualifiedNameProvider provider : QualifiedNameProvider.EP_NAME.getExtensionList()) { String qualifiedName = provider.getQualifiedName(element); if (qualifiedName != null) return qualifiedName; } return null; }
getQualifiedName
286,422
PsiElement (@NotNull String qualifiedName, @NotNull Project project) { for (QualifiedNameProvider provider : QualifiedNameProvider.EP_NAME.getExtensionList()) { PsiElement element = provider.qualifiedNameToElement(qualifiedName, project); if (element != null) return element; } return null; }
qualifiedNameToElement
286,423
RefactoringSupportProvider (@NotNull PsiElement element) { List<RefactoringSupportProvider> providers = INSTANCE.allForLanguage(element.getLanguage()); for (RefactoringSupportProvider provider : providers) { if (provider.isAvailable(element)) { return provider; } } return null; }
forContext
286,424
boolean (@NotNull PsiElement context) { return true; }
isAvailable
286,425
boolean (@NotNull PsiElement element) { return false; }
isSafeDeleteAvailable
286,426
RefactoringActionHandler () { return null; }
getIntroduceVariableHandler
286,427
RefactoringActionHandler (PsiElement element) { return getIntroduceVariableHandler(); }
getIntroduceVariableHandler
286,428
RefactoringActionHandler () { return null; }
getExtractMethodHandler
286,429
RefactoringActionHandler () { return null; }
getIntroduceConstantHandler
286,430
RefactoringActionHandler () { return null; }
getIntroduceFieldHandler
286,431
RefactoringActionHandler () { return null; }
getIntroduceParameterHandler
286,432
RefactoringActionHandler () { return null; }
getIntroduceFunctionalParameterHandler
286,433
RefactoringActionHandler () { return null; }
getIntroduceFunctionalVariableHandler
286,434
RefactoringActionHandler () { return null; }
getPullUpHandler
286,435
RefactoringActionHandler () { return null; }
getPushDownHandler
286,436
RefactoringActionHandler () { return null; }
getExtractInterfaceHandler
286,437
RefactoringActionHandler () { return null; }
getExtractModuleHandler
286,438
RefactoringActionHandler () { return null; }
getExtractSuperClassHandler
286,439
ChangeSignatureHandler () { return null; }
getChangeSignatureHandler
286,440
boolean (@NotNull PsiElement element, PsiElement context) { return false; }
isInplaceRenameAvailable
286,441
boolean (@NotNull PsiElement element, PsiElement context) { return false; }
isInplaceIntroduceAvailable
286,442
RefactoringActionHandler () { return null; }
getExtractClassHandler
286,443
boolean (@NotNull PsiElement element, @Nullable PsiElement context) { return false; }
isMemberInplaceRenameAvailable
286,444
boolean () { return false; }
isOnlyOneReferenceToInline
286,445
boolean (PsiElement element) { return canInlineElement(element); }
isEnabledOnElement
286,446
boolean (PsiElement element, @Nullable Editor editor) { return isEnabledOnElement(element); }
isEnabledOnElement
286,447
boolean (PsiElement element, Editor editor) { return canInlineElement(element); }
canInlineElementInEditor
286,448
String (PsiElement element) { return null; }
getActionName
286,449
List<InlineHandler> (Language language) { return INSTANCE.allForLanguage(language); }
getInlineHandlers
286,450
HighlightManager (@NotNull Project project) { return project.getService(HighlightManager.class); }
getInstance
286,451
RenameRefactoringDialog (Project project, PsiElement element, PsiElement context, Editor editor) { return null; }
createRenameRefactoringDialog
286,452
int (boolean isMultipleFiles, @DialogTitle String title, Project project) { return FindManager.PromptResult.SKIP; }
showReplacePromptDialog
286,453
void (@NotNull Project project, @NotNull @StatusBarText String message) { }
setStatusBarInfo
286,454
ConflictsDialogBase (@NotNull Project project, @NotNull MultiMap<PsiElement, @DialogMessage String> conflicts, @Nullable Runnable doRefactoringRunnable, boolean alwaysShowOkButton, boolean canShowConflictsInView) { return null; }
createConflictsDialog
286,455
void (PsiElement element, FindUsagesOptions options) { }
startFindUsages
286,456
void (PsiElement file, PsiElement target, @NotNull Editor editor, boolean clearHighlights) { }
highlightUsageReferences
286,457
boolean (@DialogTitle String title, @DialogMessage String message, @NonNls String helpTopic, @NonNls String iconId, boolean showCancelButton, Project project) { return false; }
showRefactoringMessageDialog
286,458
RefactoringUiService () { return ApplicationManager.getApplication().getService(RefactoringUiService.class); }
getInstance
286,459
void (PsiElement @NotNull [] elements) {}
refreshElements
286,460
boolean (@NotNull Ref<UsageInfo[]> refUsages) { prepareSuccessful(); return true; }
preprocessUsages
286,461
boolean (UsageInfo @NotNull [] usages) { return myIsPreviewUsages; }
isPreviewUsages
286,462
boolean () { return myIsPreviewUsages; }
isPreviewUsages
286,463
Set<UnloadedModuleDescription> (UsageViewDescriptor descriptor) { if (ModuleManager.getInstance(myProject).getUnloadedModuleDescriptions().isEmpty()) { //optimization return Collections.emptySet(); } Set<UnloadedModuleDescription> unloadedModulesInUseScope = new LinkedHashSet<>(); for (PsiElement element : descriptor.g...
computeUnloadedModulesFromUseScope
286,464
void (boolean isPreviewUsages) { myIsPreviewUsages = isPreviewUsages; }
setPreviewUsages
286,465
void (Runnable prepareSuccessfulSwingThreadCallback) { myPrepareSuccessfulSwingThreadCallback = prepareSuccessfulSwingThreadCallback; }
setPrepareSuccessfulSwingThreadCallback
286,466
RefactoringTransaction () { return myTransaction; }
getTransaction
286,467
void () { if (!PsiDocumentManager.getInstance(myProject).commitAllDocumentsUnderProgress()) { return; } final Ref<UsageInfo[]> refUsages = new Ref<>(); final Ref<Language> refErrorLanguage = new Ref<>(); final Ref<Boolean> refProcessCanceled = new Ref<>(); final Ref<Boolean> anyException = new Ref<>(); final Ref<Boolea...
doRun
286,468
void (UsageInfo @NotNull [] usages) { if (ApplicationManager.getApplication().isUnitTestMode()) { if (!PREVIEW_IN_TESTS) throw new RuntimeException("Unexpected preview in tests: " + StringUtil.join(usages, UsageInfo::toString, ", ")); ensureElementsWritable(usages, createUsageViewDescriptor(usages)); execute(usages); r...
previewRefactoring
286,469
void (@NotNull final Processor<? super Usage> processor) { ApplicationManager.getApplication().runReadAction(() -> { for (int i = 0; i < elements.length; i++) { elements[i] = targets[i].getElement(); } refreshElements(elements); }); processUsages(processor, myProject); }
generate
286,470
boolean () { return false; }
skipNonCodeUsages
286,471
boolean (UsageInfo @NotNull [] usages, @NotNull UsageViewDescriptor descriptor) { // protect against poorly implemented equality Set<PsiElement> elements = new ReferenceOpenHashSet<>(); for (UsageInfo usage : usages) { assert usage != null: "Found null element in usages array"; if (skipNonCodeUsages() && usage.isNonCod...
ensureElementsWritable
286,472
boolean (@NotNull Project project, @NotNull Collection<? extends PsiElement> elements) { PsiElement[] psiElements = PsiUtilCore.toPsiElementArray(elements); return CommonRefactoringUtil.checkReadOnlyStatus(project, psiElements); }
ensureFilesWritable
286,473
void (final UsageInfo @NotNull [] usages) { execute(usages); }
executeEx
286,474
void (final UsageInfo @NotNull [] usages) { CommandProcessor.getInstance().executeCommand(myProject, () -> { Collection<UsageInfo> usageInfos = new LinkedHashSet<>(Arrays.asList(usages)); doRefactoring(usageInfos); if (isGlobalUndoAction()) CommandProcessor.getInstance().markCurrentCommandAsGlobal(myProject); Suggested...
execute
286,475
boolean () { return CommonDataKeys.EDITOR.getData(DataManager.getInstance().getDataContext()) == null; }
isGlobalUndoAction
286,476
UndoConfirmationPolicy () { return UndoConfirmationPolicy.DEFAULT; }
getUndoConfirmationPolicy
286,477
UsageViewPresentation (@NotNull UsageViewDescriptor descriptor, Usage @NotNull [] usages) { UsageViewPresentation presentation = new UsageViewPresentation(); presentation.setTabText(RefactoringBundle.message("usageView.tabText")); presentation.setTargetsNodeText(descriptor.getProcessedElementsHeader()); presentation.se...
createPresentation
286,478
boolean (@NotNull Project project, @NotNull MultiMap<PsiElement, @DialogMessage String> conflicts) { if (conflicts.isEmpty()) return true; if (ApplicationManager.getApplication().isUnitTestMode()) { if (BaseRefactoringProcessor.ConflictsInTestsException.isTestIgnore()) return true; throw new BaseRefactoringProcessor.Co...
processConflicts
286,479
void (@NotNull UsageViewDescriptor viewDescriptor, @NotNull Factory<? extends UsageSearcher> factory, UsageInfo @NotNull [] usageInfos) { UsageViewManager viewManager = UsageViewManager.getInstance(myProject); final PsiElement[] initialElements = viewDescriptor.getElements(); final UsageTarget[] targets = PsiElement2Us...
showUsageView
286,480
void (@NotNull final UsageViewDescriptor viewDescriptor, @NotNull final UsageView usageView) { Runnable refactoringRunnable = () -> { Set<UsageInfo> usagesToRefactor = UsageViewUtil.getNotExcludedUsageInfos(usageView); final UsageInfo[] infos = usagesToRefactor.toArray(UsageInfo.EMPTY_ARRAY); if (ensureElementsWritable...
customizeUsagesView
286,481
void (ActionEvent e) { run(); }
actionPerformed
286,482
void (@NotNull UsageView usageView, @NotNull Runnable refactoringRunnable, @NotNull String canNotMakeString) { usageView.addPerformOperationAction(refactoringRunnable, getCommandName(), canNotMakeString, RefactoringBundle.message("usageView.doAction"), false); }
addDoRefactoringAction
286,483
void (@NotNull final Collection<UsageInfo> usageInfoSet) { for (Iterator<UsageInfo> iterator = usageInfoSet.iterator(); iterator.hasNext();) { UsageInfo usageInfo = iterator.next(); final PsiElement element = usageInfo.getElement(); if (element == null || !isToBeChanged(usageInfo)) { iterator.remove(); } } String comma...
doRefactoring
286,484
boolean (@NotNull UsageInfo usageInfo) { return usageInfo.isWritable(); }
isToBeChanged
286,485
void () { }
performPsiSpoilingRefactoring
286,486
void () { if (myPrepareSuccessfulSwingThreadCallback != null) { // make sure that dialog is closed in swing thread try { ApplicationManager.getApplication().invokeAndWait(myPrepareSuccessfulSwingThreadCallback); } catch (RuntimeException e) { LOG.error(e); } } }
prepareSuccessful
286,487
void () { Runnable baseRunnable = () -> { try (var ignored = SlowOperations.startSection(SlowOperations.ACTION_PERFORM)) { doRun(); } }; Runnable runnable = shouldDisableAccessChecks() ? () -> NonProjectFileWritingAccessProvider.disableChecksDuring(baseRunnable) : baseRunnable; if (ApplicationManager.getApplication().i...
run
286,488
boolean () { return false; }
shouldDisableAccessChecks
286,489
boolean () { return myTestIgnore; }
isTestIgnore
286,490
Collection<String> () { List<String> result = new ArrayList<>(messages); for (int i = 0; i < messages.size(); i++) { result.set(i, result.get(i).replaceAll("<[^>]+>", "")); } return result; }
getMessages
286,491
String () { List<String> result = ContainerUtil.sorted(messages); return StringUtil.join(result, "\n"); }
getMessage
286,492
boolean (@NotNull MultiMap<PsiElement, @DialogMessage String> conflicts, UsageInfo @Nullable [] usages) { if (!conflicts.isEmpty() && ApplicationManager.getApplication().isUnitTestMode()) { if (!ConflictsInTestsException.isTestIgnore()) throw new ConflictsInTestsException(conflicts.values()); return true; } if (myPrepa...
showConflicts
286,493
ConflictsDialogBase (@NotNull MultiMap<PsiElement, @DialogMessage String> conflicts, UsageInfo @Nullable [] usages) { final ConflictsDialogBase conflictsDialog = createConflictsDialog(conflicts, usages); conflictsDialog.setCommandName(getCommandName()); return conflictsDialog; }
prepareConflictsDialog
286,494
RefactoringEventData () { return null; }
getBeforeData
286,495
RefactoringEventData (UsageInfo @NotNull [] usages) { return null; }
getAfterData
286,496
String () { return null; }
getRefactoringId
286,497
ConflictsDialogBase (@NotNull MultiMap<PsiElement, @DialogMessage String> conflicts, UsageInfo @Nullable [] usages) { return RefactoringUiService.getInstance().createConflictsDialog(myProject, conflicts, usages == null ? null : () -> execute(usages), false, true); }
createConflictsDialog
286,498
void () { myProject.getMessageBus().syncPublisher(RefactoringEventListener.REFACTORING_EVENT_TOPIC).undoRefactoring(myRefactoringId); }
undo
286,499
void () { myProject.getMessageBus().syncPublisher(RefactoringEventListener.REFACTORING_EVENT_TOPIC).redoRefactoring(myRefactoringId); }
redo