Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
259,600
void (@NotNull AnActionEvent e) { myShowMerged = !myShowMerged; final AnnotationSource newSource = AnnotationSource.getInstance(myShowMerged); mySwitcher.switchTo(newSource); for (Consumer<AnnotationSource> listener : myListeners) { listener.accept(newSource); } AnnotateActionGroup.revalidateMarkupInAllEditors(); }
actionPerformed
259,601
String () { return VcsBundle.message("annotation.switch.to.merged.text"); }
getShowMerged
259,602
String () { return VcsBundle.message("annotation.switch.to.original.text"); }
getHideMerged
259,603
void (@NotNull AnActionEvent e) { List<AnAction> actions = getActions(e.getDataContext()); e.getPresentation().setEnabled(actions != null); }
update
259,604
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
259,605
void (@NotNull AnActionEvent e) { List<AnAction> actions = getActions(e.getDataContext()); if (actions == null) return; String title = getTemplatePresentation().getText(); DefaultActionGroup group = new DefaultActionGroup(actions); ListPopup popup = JBPopupFactory.getInstance(). createActionGroupPopup(title, group, e.g...
actionPerformed
259,606
List<AnAction> (@NotNull DataContext context) { Editor editor = context.getData(CommonDataKeys.EDITOR); if (editor == null) return null; TextAnnotationPresentation presentation = AnnotateToggleAction.getAnnotationPresentation(editor); if (presentation == null) return null; int line = editor.getCaretModel().getLogicalPo...
getActions
259,607
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
259,608
void (@NotNull AnActionEvent e) { boolean visible = myChangesProvider != null && myFile != null; e.getPresentation().setVisible(visible); e.getPresentation().setEnabled(visible && myRevisionNumber != null); }
update
259,609
void (@NotNull AnActionEvent e) { FilePath filePath = VcsUtil.getFilePath(myFile); AbstractVcsHelperImpl.loadAndShowCommittedChangesDetails(myFileAnnotation.getProject(), myRevisionNumber, filePath, () -> myChangesProvider.getChangesIn(myLine)); }
actionPerformed
259,610
int (@NonNls DataContext dataContext) { return getAnnotationLineNumber(dataContext, false); }
getAnnotationLineNumber
259,611
int (@NonNls DataContext dataContext, boolean approximate) { Editor editor = dataContext.getData(CommonDataKeys.EDITOR); if (editor == null) return LineNumberConstants.ABSENT_LINE_NUMBER; TextAnnotationPresentation annotationPresentation = AnnotateToggleAction.getAnnotationPresentation(editor); if (annotationPresentati...
getAnnotationLineNumber
259,612
void () { EditorFactory.getInstance().releaseEditor(myEditor); }
disposeUIResources
259,613
JComponent () { return myEditor.getComponent(); }
getPanel
259,614
void (Object selected) { }
blinkSelectedHighlightType
259,615
void () { EditorColorsScheme colorsScheme = myEditor.getColorsScheme(); StringBuilder sb = new StringBuilder(); String nn = "\n\n"; String n = "\n"; sb.append(VcsBundle.message("vcs.preview.panel.deleted.line.below")).append(nn) .append(VcsBundle.message("vcs.preview.panel.modified.line")).append(nn) .append(VcsBundle....
updateView
259,616
Range (int currentLine, byte... inner) { List<InnerRange> innerRanges = new ArrayList<>(); int currentInnerLine = 0; for (byte type : inner) { switch (type) { case Range.EQUAL, Range.INSERTED, Range.MODIFIED -> { innerRanges.add(new InnerRange(currentInnerLine, currentInnerLine + 1, type)); currentInnerLine++; } case R...
createModifiedRange
259,617
void (@NotNull Range range, boolean isIgnored, @NotNull ColorKey colorKey) { TextRange textRange = DiffUtil.getLinesRange(myEditor.getDocument(), range.getLine1(), range.getLine2(), false); TextAttributes textAttributes = new LineStatusMarkerDrawUtil.DiffStripeTextAttributes(range.getType()); RangeHighlighter highlight...
addHighlighter
259,618
void (@NotNull Editor editor, @NotNull Graphics g, @NotNull Rectangle r) { LineStatusMarkerDrawUtil.paintRange(g, myEditor, range, 0, isIgnored); }
paint
259,619
boolean (@NotNull MouseEvent e) { return LineStatusMarkerDrawUtil.isInsideMarkerArea(e); }
canDoAction
259,620
void (@NotNull Editor editor, @NotNull MouseEvent e) { myDispatcher.getMulticaster().selectionInPreviewChanged(colorKey.getExternalName()); }
doAction
259,621
String () { return DiffBundle.message("vcs.marker.changed.line"); }
getAccessibleName
259,622
void (@NotNull ColorAndFontSettingsListener listener) { myDispatcher.addListener(listener); }
addListener
259,623
void (final EditorColorsScheme highlighterSettings) { myEditor.setColorsScheme(highlighterSettings); }
setColorScheme
259,624
String (int line, Editor editor) { if (line < myBackgroundColors.size()) { int anchorIndex = myAnchorIndexes.indexOf(line); String text = VcsBundle.message("annotation.background"); if (anchorIndex != -1) text += " #" + (anchorIndex + 1); return text; } return null; }
getLineText
259,625
String (int line, Editor editor) { return null; }
getToolTip
259,626
EditorFontType (int line, Editor editor) { return null; }
getStyle
259,627
ColorKey (int line, Editor editor) { return myLastCommitLine == line ? EditorColors.ANNOTATIONS_LAST_COMMIT_COLOR : EditorColors.ANNOTATIONS_COLOR; }
getColor
259,628
Color (int line, Editor editor) { if (line < myBackgroundColors.size()) { return myBackgroundColors.get(line); } return null; }
getBgColor
259,629
List<AnAction> (int line, Editor editor) { return Collections.emptyList(); }
getPopupActions
259,630
void () { }
gutterClosed
259,631
NewColorAndFontPanel (@NotNull ColorAndFontOptions options) { final SchemesPanel schemesPanel = new SchemesPanel(options); final OptionsPanelImpl optionsPanel = new OptionsPanelImpl(options, schemesPanel, getVcsGroup()); final VcsPreviewPanel previewPanel = new VcsPreviewPanel(); schemesPanel.addListener(new ColorAndFo...
createPanel
259,632
void (@NotNull final Object source) { previewPanel.setColorScheme(options.getSelectedScheme()); optionsPanel.updateOptionsList(); }
schemeChanged
259,633
String () { return getVcsGroup(); }
getPanelDisplayName
259,634
String () { return getVcsGroup(); }
getDisplayName
259,635
DisplayPriority () { return DisplayPriority.COMMON_SETTINGS; }
getPriority
259,636
String () { return ApplicationBundle.message("title.vcs"); }
getVcsGroup
259,637
FileAnnotation () { return myAnnotation; }
getFileAnnotation
259,638
TextAnnotationPresentation () { return myPresentation; }
getPresentation
259,639
boolean () { return false; }
isGutterAction
259,640
String (final int line, final Editor editor) { return null; }
getToolTip
259,641
void (int line) { }
doAction
259,642
Cursor (final int line) { return Cursor.getDefaultCursor(); }
getCursor
259,643
EditorFontType (final int line, final Editor editor) { return myPresentation.getFontType(line); }
getStyle
259,644
ColorKey (final int line, final Editor editor) { return myPresentation.getColor(line); }
getColor
259,645
List<AnAction> (int line, final Editor editor) { return myPresentation.getActions(line); }
getPopupActions
259,646
void () { myPresentation.gutterClosed(); }
gutterClosed
259,647
Color (int line, Editor editor) { if (myColorScheme == null) return null; ColorMode type = ShowAnnotationColorsAction.getType(); Map<VcsRevisionNumber, Color> colorMap = type == ColorMode.AUTHOR ? myColorScheme.second : myColorScheme.first; if (colorMap == null || type == ColorMode.NONE) return null; final VcsRevisionN...
getBgColor
259,648
boolean () { return true; }
isShowByDefault
259,649
boolean () { return VcsUtil.isAspectAvailableByDefault(getID(), isShowByDefault()); }
isAvailable
259,650
int () { return ExperimentalUI.isNewUI() ? 0 : ActiveAnnotationGutter.super.getLeftMargin(); }
getLeftMargin
259,651
void (@NotNull AnActionEvent e) { if (myProvider == null) { e.getPresentation().setEnabledAndVisible(false); return; } super.update(e); }
update
259,652
int (@NotNull AnActionEvent e) { return ShowAnnotateOperationsPopup.getAnnotationLineNumber(e.getDataContext(), true); }
getAnnotatedLine
259,653
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
259,654
boolean (@Nullable Project project, @Nullable VcsSelection selection) { if (project == null || selection == null) return false; VirtualFile file = FileDocumentManager.getInstance().getFile(selection.getDocument()); if (file == null) return false; FilePath filePath = VcsUtil.getFilePath(file); AbstractVcs activeVcs = Pr...
isEnabled
259,655
void (@NotNull AnActionEvent event) { final Project project = event.getProject(); assert project != null; final VcsSelection selection = VcsSelectionUtil.getSelection(this, event); assert selection != null; final VirtualFile file = FileDocumentManager.getInstance().getFile(selection.getDocument()); assert file != null;...
actionPerformed
259,656
void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); Editor editor = event.getData(CommonDataKeys.EDITOR); if (editor == null) { presentation.setEnabledAndVisible(false); return; } Project project = event.getData(CommonDataKeys.PROJECT); VcsSelection selection = VcsSelectionUtil.ge...
update
259,657
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
259,658
void (@NotNull AnActionEvent e) { super.update(e); Provider provider = getProvider(e); Presentation presentation = e.getPresentation(); presentation.setEnabled(provider != null); if (provider != null) { presentation.setText(provider.getActionName(e)); } }
update
259,659
boolean (@NotNull AnActionEvent e) { Provider provider = getProvider(e); return provider != null && (provider.isAnnotated(e) || provider.isSuspended(e)); }
isSelected
259,660
void (@NotNull AnActionEvent e, boolean selected) { Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor != null) { MyEditorNotificationPanel notificationPanel = ObjectUtils.tryCast(editor.getHeaderComponent(), MyEditorNotificationPanel.class); if (notificationPanel != null) { notificationPanel.showAnnotations(...
setSelected
259,661
void (@NotNull final Editor editor, @NotNull final Project project, @NotNull final FileAnnotation fileAnnotation, @NotNull final AbstractVcs vcs) { if (project.isDisposed() || editor.isDisposed()) return; UpToDateLineNumberProvider upToDateLineNumberProvider = new UpToDateLineNumberProviderImpl(editor.getDocument(), pr...
doAnnotate
259,662
void (@NotNull final Editor editor, @NotNull final Project project, @NotNull final FileAnnotation fileAnnotation, @NotNull final AbstractVcs vcs, @NotNull final UpToDateLineNumberProvider upToDateLineNumbers) { doAnnotate(editor, project, fileAnnotation, vcs, upToDateLineNumbers, true); }
doAnnotate
259,663
void (@NotNull final Editor editor, @NotNull final Project project, @NotNull final FileAnnotation fileAnnotation, @NotNull final AbstractVcs vcs, @NotNull final UpToDateLineNumberProvider upToDateLineNumbers, final boolean warnAboutSuspiciousAnnotations) { ThreadingAssertions.assertEventDispatchThread(); if (project.is...
doAnnotate
259,664
void () { fileAnnotation.dispose(); }
dispose
259,665
void () { changesListener.unregisterAnnotation(fileAnnotation); }
dispose
259,666
List<ActiveAnnotationGutter> (@NotNull Editor editor) { List<TextAnnotationGutterProvider> annotations = editor.getGutter().getTextAnnotations(); return ContainerUtil.filterIsInstance(annotations, ActiveAnnotationGutter.class); }
getVcsAnnotations
259,667
boolean (@NotNull Editor editor) { return !getVcsAnnotations(editor).isEmpty(); }
hasVcsAnnotations
259,668
void (@NotNull Editor editor) { List<ActiveAnnotationGutter> vcsAnnotations = getVcsAnnotations(editor); editor.getGutter().closeTextAnnotations(vcsAnnotations); }
closeVcsAnnotations
259,669
TextAnnotationPresentation (@NotNull Editor editor) { List<ActiveAnnotationGutter> annotations = getVcsAnnotations(editor); for (TextAnnotationGutterProvider annotation : annotations) { if (annotation instanceof AnnotationGutterLineConvertorProxy) { annotation = ((AnnotationGutterLineConvertorProxy)annotation).getDeleg...
getAnnotationPresentation
259,670
FileAnnotation (@NotNull Editor editor) { TextAnnotationPresentation presentation = getAnnotationPresentation(editor); if (presentation instanceof AnnotationPresentation) return ((AnnotationPresentation)presentation).getFileAnnotation(); return null; }
getFileAnnotation
259,671
void (@NotNull AnnotationPresentation presentation, @NotNull FileAnnotation fileAnnotation) { AnnotationGutterActionProvider[] extensions = AnnotationGutterActionProvider.EP_NAME.getExtensions(); if (extensions.length > 0) { presentation.addAction(new Separator()); } for (AnnotationGutterActionProvider provider : exten...
addActionsFromExtensions
259,672
Provider (AnActionEvent e) { return EP_NAME.findFirstSafe(provider -> provider.isEnabled(e)); }
getProvider
259,673
void () { hideNotification(); myShowAnnotations.run(); }
showAnnotations
259,674
void () { setVisible(false); if (myEditor.getHeaderComponent() == this) myEditor.setHeaderComponent(null); }
hideNotification
259,675
Integer (@NotNull Project project, @NotNull VirtualFile file, @Nullable Editor contextEditor) { Editor editor = null; if (contextEditor != null) { VirtualFile contextFile = FileDocumentManager.getInstance().getFile(contextEditor.getDocument()); if (Comparing.equal(contextFile, file)) editor = contextEditor; } if (edito...
getSelectedLine
259,676
void () { SimpleDiffRequestChain chain = SimpleDiffRequestChain.fromProducer(new MyDiffProducer()); DiffManager.getInstance().showDiff(myProject, chain, DiffDialogHints.DEFAULT); }
showDiff
259,677
String () { return myFilePath.getPresentableUrl(); }
getName
259,678
void (final DiffProvider diffProvider, final VcsRevisionNumber revisionNumber, final VirtualFile selectedFile, final Project project) { final DiffActionExecutor executor = new CompareToFixedExecutor(diffProvider, selectedFile, project, null, revisionNumber); executor.showDiff(); }
showDiff
259,679
ContentRevision () { return myDiffProvider.createFileContent(myNumber, mySelectedFile); }
getContentRevision
259,680
ContentRevision () { return myDiffProvider.createCurrentFileContent(mySelectedFile); }
getContentRevision
259,681
ContentRevision () { final ItemLatestState itemState = myDiffProvider.getLastRevision(mySelectedFile); if (itemState == null) return null; myFileStillExists = itemState.isItemExists(); return myDiffProvider.createFileContent(itemState.getNumber(), mySelectedFile); }
getContentRevision
259,682
List<AnAction> (@NotNull List<? extends AnAction> actions, @NotNull DataContext context) { ActionManager am = ActionManager.getInstance(); List<AnAction> reorderedActions = new ArrayList<>(actions); List<String> reorderedIds = ContainerUtil.map(reorderedActions, it -> am.getId(it)); reorderActionPair(reorderedActions, ...
promote
259,683
boolean (@NotNull DataContext context) { return context.getData(VcsDataKeys.COMMIT_MESSAGE_CONTROL) != null; }
isCommitMessageEditor
259,684
void (List<AnAction> reorderedActions, List<String> reorderedIds, String highPriority, String lowPriority) { int highPriorityIndex = reorderedIds.indexOf(highPriority); int lowPriorityIndex = reorderedIds.indexOf(lowPriority); if (highPriorityIndex == -1 || lowPriorityIndex == -1) return; if (highPriorityIndex < lowPri...
reorderActionPair
259,685
boolean () { return myIsGutterAction; }
isGutterAction
259,686
String (int line, Editor editor) { final String value = isAvailable() ? myAspect.getValue(line) : ""; if (LineAnnotationAspect.AUTHOR.equals(myAspect.getId())) { return ShortNameType.shorten(value, ShowShortenNames.getType()); } return value; }
getLineText
259,687
String (final int line, final Editor editor) { String text = myAspect.getTooltipText(line); if (text != null) return text; return isAvailable() ? myAnnotation.getHtmlToolTip(line) : null; }
getToolTip
259,688
void (int line) { if (myIsGutterAction) { ((EditorGutterAction)myAspect).doAction(line); } }
doAction
259,689
Cursor (final int line) { if (myIsGutterAction) { return ((EditorGutterAction)myAspect).getCursor(line); } return super.getCursor(line); }
getCursor
259,690
EditorFontType (int line, Editor editor) { EditorFontType style = myAspect.getStyle(line); if (style != null) return style; return super.getStyle(line, editor); }
getStyle
259,691
ColorKey (int line, Editor editor) { ColorKey color = myAspect.getColor(line); if (color != null) return color; return super.getColor(line, editor); }
getColor
259,692
Color (int line, Editor editor) { Color color = myAspect.getBgColor(line); if (color != null) return color; return super.getBgColor(line, editor); }
getBgColor
259,693
boolean () { return myAspect.isShowByDefault(); }
isShowByDefault
259,694
String () { return myAspect.getId(); }
getID
259,695
void () { for (Editor editor : EditorFactory.getInstance().getAllEditors()) { if (editor.getGutter() instanceof EditorGutterComponentEx) { ((EditorGutterComponentEx)editor.getGutter()).revalidateMarkup(); } } }
revalidateMarkupInAllEditors
259,696
void (@NotNull AnActionEvent e) { updateDiffAction(e.getPresentation(), e.getDataContext()); }
update
259,697
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
259,698
void (@NotNull Presentation presentation, @NotNull DataContext context) { presentation.setEnabled(isEnabled(context, true)); presentation.setVisible(isVisible(context)); }
updateDiffAction
259,699
boolean (@NotNull DataContext context) { Project project = context.getData(CommonDataKeys.PROJECT); return project != null && hasDiffProviders(project); }
isVisible