Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
259,300
boolean () { return myIsLoading; }
isLoading
259,301
VcsException () { return myException; }
getException
259,302
VcsFileRevision () { return myCurrentLoadingRevision; }
getCurrentLoadingRevision
259,303
Block (int index) { if (myBlocks.size() <= index) return null; return myBlocks.get(index); }
getBlock
259,304
VcsHistorySession () { return mySession; }
getSession
259,305
List<VcsFileRevision> () { return myRevisions; }
getRevisions
259,306
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
259,307
boolean (@NotNull AnActionEvent e) { return e.getData(SELECTION_HISTORY_DIALOG_KEY) != null; }
isActive
259,308
void (@NotNull final AnActionEvent e) { VcsSelectionHistoryDialog dialog = e.getRequiredData(SELECTION_HISTORY_DIALOG_KEY); e.getPresentation().setText(VcsBundle.message("action.name.compare")); e.getPresentation().setDescription(VcsBundle.message("action.description.compare")); e.getPresentation().setEnabled(dialog.my...
update
259,309
void (@NotNull AnActionEvent e) { VcsSelectionHistoryDialog dialog = e.getRequiredData(SELECTION_HISTORY_DIALOG_KEY); BlockData blockData = dialog.myBlockLoader.getLoadedData(); if (blockData.getRevisions().isEmpty()) return; IntPair range = dialog.getSelectedRevisionsRange(blockData); List<VcsFileRevision> revisions =...
actionPerformed
259,310
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
259,311
boolean (@NotNull AnActionEvent e) { return e.getData(SELECTION_HISTORY_DIALOG_KEY) != null; }
isActive
259,312
void (@NotNull final AnActionEvent e) { VcsSelectionHistoryDialog dialog = e.getRequiredData(SELECTION_HISTORY_DIALOG_KEY); e.getPresentation().setEnabled(dialog.myList.getSelectedRowCount() == 1 && dialog.myList.getSelectedObject() != dialog.myBlockLoader.getLocalRevision()); }
update
259,313
void (@NotNull AnActionEvent e) { VcsSelectionHistoryDialog dialog = e.getRequiredData(SELECTION_HISTORY_DIALOG_KEY); VcsFileRevision revision = dialog.myList.getSelectedObject(); if (revision == null) return; FilePath filePath = VcsUtil.getFilePath(dialog.myFile); dialog.getDiffHandler().showDiffForTwo(dialog.myProjec...
actionPerformed
259,314
ShortNameType () { for (ShortNameType type : ShortNameType.values()) { if (type.isSet()) { return type; } } return ShortNameType.LASTNAME; }
getType
259,315
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
259,316
boolean (@NotNull AnActionEvent e) { return myType == getType(); }
isSelected
259,317
void (@NotNull AnActionEvent e, boolean enabled) { if (enabled) { myType.set(); } AnnotateActionGroup.revalidateMarkupInAllEditors(); }
setSelected
259,318
DiffActionExecutor (@NotNull DiffProvider diffProvider, @NotNull VirtualFile selectedFile, @NotNull Project project, @Nullable Editor editor) { return new DiffActionExecutor.DeletionAwareExecutor(diffProvider, selectedFile, project, editor); }
getExecutor
259,319
String () { return VcsBundle.message(myDescriptionKey); }
getDescription
259,320
ColorKey (int line, Editor editor) { return AnnotationSource.LOCAL.getColor(); }
getColor
259,321
String (int line, Editor editor) { if (myTurnedOn) return ""; final AnnotationSourceSwitcher switcher = myAnnotation.getAnnotationSourceSwitcher(); if (switcher == null) return ""; return switcher.mergeSourceAvailable(line) ? "M" : ""; //NON-NLS }
getLineText
259,322
void (final AnnotationSource annotationSource) { myTurnedOn = annotationSource.showMerged(); }
accept
259,323
boolean (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project == null || project.isDisposed()) return false; VirtualFile[] selectedFiles = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); if (selectedFiles == null || selectedFiles.length != 1) return false; VirtualFile file = select...
isEnabled
259,324
boolean (@NotNull AnActionEvent e) { VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE_ARRAY)[0]; return VcsAnnotateUtil.getBackgroundableLock(e.getRequiredData(CommonDataKeys.PROJECT), file).isLocked(); }
isSuspended
259,325
boolean (@NotNull AnActionEvent e) { final VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE_ARRAY)[0]; Editor editor = VcsAnnotateUtil.getEditorFor(file, e.getDataContext()); return editor != null && AnnotateToggleAction.hasVcsAnnotations(editor); }
isAnnotated
259,326
void (AnActionEvent e, boolean selected) { final Project project = e.getRequiredData(CommonDataKeys.PROJECT); final VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE_ARRAY)[0]; Editor editor = Objects.requireNonNull(VcsAnnotateUtil.getEditorFor(file, e.getDataContext())); if (!selected) { AnnotateToggleA...
perform
259,327
void (@NotNull final Project project, @NotNull final Editor editor, @NotNull final VirtualFile file) { final AnnotationData data = extractData(project, file); assert data != null; final AnnotationProviderEx provider = (AnnotationProviderEx)data.vcs.getAnnotationProvider(); assert provider != null; final Ref<FileAnnotat...
doAnnotate
259,328
void (final @NotNull ProgressIndicator indicator) { try { fileAnnotationRef.set(provider.annotate(data.filePath, data.revisionNumber)); } catch (VcsException e) { exceptionRef.set(e); } catch (ProcessCanceledException pce) { throw pce; } catch (Throwable t) { exceptionRef.set(new VcsException(t)); } }
run
259,329
void () { onSuccess(); }
onCancel
259,330
void () { if (!exceptionRef.isNull()) { LOG.warn(exceptionRef.get()); AbstractVcsHelper.getInstance(project) .showErrors(Collections.singletonList(exceptionRef.get()), VcsBundle.message("message.title.annotate")); } if (!fileAnnotationRef.isNull()) { AnnotateToggleAction.doAnnotate(editor, project, fileAnnotationRef.ge...
onSuccess
259,331
void () { actionLock.unlock(); }
onFinished
259,332
AnnotationData (@NotNull Project project, @NotNull VirtualFile file) { FilePath filePath = null; VcsRevisionNumber revisionNumber = null; if (file instanceof VcsVirtualFile) { VcsFileRevision revision = ((VcsVirtualFile)file).getFileRevision(); if (revision instanceof VcsFileRevisionEx) { filePath = ((VcsFileRevisionEx...
extractData
259,333
boolean (AnActionEvent e) { return AnnotateVcsVirtualFileAction.isEnabled(e); }
isEnabled
259,334
boolean (@NotNull AnActionEvent e) { return AnnotateVcsVirtualFileAction.isSuspended(e); }
isSuspended
259,335
boolean (AnActionEvent e) { return AnnotateVcsVirtualFileAction.isAnnotated(e); }
isAnnotated
259,336
void (@NotNull AnActionEvent e, boolean selected) { AnnotateVcsVirtualFileAction.perform(e, selected); }
perform
259,337
List<ColorKey> (int count) { List<ColorKey> keys = new ArrayList<>(); for (int i = 0; i < count; i++) { keys.add(ColorKey.createColorKey("VCS_ANNOTATIONS_COLOR_" + (i + 1))); } return keys; }
createColorKeys
259,338
AnnotationsSettings () { return ApplicationManager.getApplication().getService(AnnotationsSettings.class); }
getInstance
259,339
List<Color> (@Nullable EditorColorsScheme scheme) { if (scheme == null) scheme = EditorColorsManager.getInstance().getGlobalScheme(); List<Color> colors = getOrderedColors(scheme); List<Color> authorColors = new ArrayList<>(); for (int i = 0; i < SHUFFLE_STEP; i++) { for (int k = 0; k <= colors.size() / SHUFFLE_STEP; k...
getAuthorsColors
259,340
List<Color> (@Nullable EditorColorsScheme scheme) { if (scheme == null) scheme = EditorColorsManager.getInstance().getGlobalScheme(); List<Color> anchorColors = new ArrayList<>(); for (ColorKey key : ANCHOR_COLOR_KEYS) { ContainerUtil.addIfNotNull(anchorColors, scheme.getColor(key)); } return ColorGenerator.generateLin...
getOrderedColors
259,341
String () { return myPlace; }
getPlace
259,342
String () { return myActionName; }
getActionName
259,343
VcsContext (@NotNull AnActionEvent event) { return new CachedVcsContext(createInstanceOn(event)); }
createCachedInstanceOn
259,344
VcsContextWrapper (@NotNull AnActionEvent event) { return new VcsContextWrapper(event.getDataContext(), event.getModifiers(), event.getPlace(), event.getPresentation().getText()); }
createInstanceOn
259,345
Project () { return CommonDataKeys.PROJECT.getData(myContext); }
getProject
259,346
VirtualFile () { return VcsContextUtil.selectedFilesIterable(myContext).first(); }
getSelectedFile
259,347
Stream<VirtualFile> () { return StreamEx.of(VcsContextUtil.selectedFilesIterable(myContext).iterator()); }
getSelectedFilesStream
259,348
List<FilePath> () { Iterable<FilePath> result = ChangesListView.UNVERSIONED_FILE_PATHS_DATA_KEY.getData(myContext); return JBIterable.from(result).toList(); }
getSelectedUnversionedFilePaths
259,349
Editor () { return CommonDataKeys.EDITOR.getData(myContext); }
getEditor
259,350
Collection<VirtualFile> () { return Arrays.asList(getSelectedFiles()); }
getSelectedFilesCollection
259,351
File () { FilePath filePath = getSelectedFilePath(); return filePath != null ? filePath.getIOFile() : null; }
getSelectedIOFile
259,352
int () { return myModifiers; }
getModifiers
259,353
FilePath () { return VcsContextUtil.selectedFilePathsIterable(myContext).first(); }
getSelectedFilePath
259,354
Stream<FilePath> () { return StreamEx.of(VcsContextUtil.selectedFilePathsIterable(myContext).iterator()); }
getSelectedFilePathsStream
259,355
String (int line, Editor editor) { return isAvailable() ? " " : ""; }
getLineText
259,356
boolean () { for (AnAction action : myActionGroup.getChildren(null)) { if (action instanceof ShowHideAspectAction && ((ShowHideAspectAction)action).isSelected()) { return false; } } return true; }
isAvailable
259,357
ColorKey (int line, Editor editor) { return AnnotationSource.LOCAL.getColor(); }
getColor
259,358
String (int line, Editor editor) { final String value = myAspect.getValue(line); if (String.valueOf(myAnnotation.getLineRevisionNumber(line)).equals(value)) { return ""; } // shown in merge sources mode return myTurnedOn ? value : ""; }
getLineText
259,359
String (int line, Editor editor) { final String aspectTooltip = myAspect.getTooltipText(line); if (aspectTooltip != null) { return aspectTooltip; } final String text = getLineText(line, editor); return ((text == null) || (text.length() == 0)) ? "" : VcsBundle.message("annotation.original.revision.text", text); }
getToolTip
259,360
void (AnnotationSource annotationSource) { myTurnedOn = annotationSource.showMerged(); }
accept
259,361
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
259,362
boolean (@NotNull AnActionEvent e) { return isSelected(); }
isSelected
259,363
void (@NotNull AnActionEvent e, boolean state) { VcsUtil.setAspectAvailability(myGutter.getID(), state); AnnotateActionGroup.revalidateMarkupInAllEditors(); }
setSelected
259,364
void (@NotNull AnActionEvent e) { super.update(e); e.getPresentation().setEnabled(isAvailable); }
update
259,365
void (boolean available) { isAvailable = available; }
setAvailable
259,366
String (int line, Editor editor) { if (!isAvailable()) return ""; final VcsRevisionNumber revisionNumber = myAnnotation.getLineRevisionNumber(line); if (revisionNumber != null) { final Integer num = myHistoryIds.get(revisionNumber); if (num != null) { final String size = String.valueOf(myHistoryIds.size()); String valu...
getLineText
259,367
boolean () { return false; }
isShowByDefault
259,368
String () { return "Commit number"; }
getID
259,369
VirtualFile (@NotNull DataContext context) { return selectedFilesIterable(context).first(); }
selectedFile
259,370
List<VirtualFile> (@NotNull DataContext context) { return selectedFilesIterable(context).toList(); }
selectedFiles
259,371
List<FilePath> (@NotNull DataContext context) { return selectedFilePathsIterable(context).toList(); }
selectedFilePaths
259,372
JBIterable<VirtualFile> (@NotNull DataContext context) { Iterable<VirtualFile> files = VcsDataKeys.VIRTUAL_FILES.getData(context); if (files != null) { return JBIterable.from(files).filter(VirtualFile::isInLocalFileSystem); } return JBIterable.empty(); }
selectedFilesIterable
259,373
JBIterable<FilePath> (@NotNull DataContext context) { Iterable<FilePath> paths = VcsDataKeys.FILE_PATHS.getData(context); if (paths != null) { return JBIterable.from(paths); } FilePath path = VcsDataKeys.FILE_PATH.getData(context); if (path != null) { return JBIterable.of(path); } JBIterable<VirtualFile> virtualFiles =...
selectedFilePathsIterable
259,374
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
259,375
void (@NotNull AnActionEvent e) { if (Boolean.TRUE.equals(e.getData(PlatformCoreDataKeys.IS_MODAL_CONTEXT))) { e.getPresentation().setEnabledAndVisible(false); return; } if (myAnnotation.getFile() == null) { e.getPresentation().setEnabledAndVisible(false); return; } e.getPresentation().setVisible(true); super.update(e)...
update
259,376
AbstractVcs (@NotNull AnActionEvent e) { return myVcs; }
getVcs
259,377
VirtualFile (@NotNull AnActionEvent e) { VcsFileRevision revision = getFileRevision(e); if (revision == null) return null; final FileType currentFileType = myAnnotation.getFile().getFileType(); FilePath filePath = (revision instanceof VcsFileRevisionEx ? ((VcsFileRevisionEx)revision).getPath() : VcsUtil.getFilePath(myA...
getFile
259,378
Editor (@NotNull AnActionEvent e) { return e.getData(CommonDataKeys.EDITOR); }
getEditor
259,379
FileType () { FileType type = super.getFileType(); if (!type.isBinary()) return type; if (!myCurrentFileType.isBinary()) return myCurrentFileType; return PlainTextFileType.INSTANCE; }
getFileType
259,380
void (@NotNull AnActionEvent e) { Data data = getDataFromContext(e); boolean isEnabled = data != null && data.tracker.isValid() && data.tracker.isAvailableAt(data.editor) && getTargetRange(data.tracker, data.editor) != null; e.getPresentation().setEnabled(isEnabled); e.getPresentation().setVisible(data != null || e.isF...
update
259,381
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
259,382
void (@NotNull AnActionEvent e) { Data data = getDataFromContext(e); if (data == null) return; Range targetRange = getTargetRange(data.tracker, data.editor); if (targetRange == null) return; moveToRange(data.tracker, data.editor, targetRange); }
actionPerformed
259,383
Data (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return null; Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor == null) return null; LineStatusTracker<?> tracker = LineStatusTrackerManager.getInstance(project).getLineStatusTracker(editor.getDocument()); if (tracker ==...
getDataFromContext
259,384
void (@NotNull LineStatusTracker<?> tracker, @NotNull Editor editor, @NotNull Range range) { tracker.scrollAndShowHint(range, editor); }
moveToRange
259,385
Range (@NotNull LineStatusTracker<?> tracker, @NotNull Editor editor) { int line = editor.getCaretModel().getLogicalPosition().line; return getTargetRange(tracker, line); }
getTargetRange
259,386
Range (@NotNull LineStatusTracker<?> tracker, int line) { return tracker.getNextRange(line); }
getTargetRange
259,387
Range (@NotNull LineStatusTracker<?> tracker, int line) { return tracker.getPrevRange(line); }
getTargetRange
259,388
Range (@NotNull LineStatusTracker<?> tracker, int line) { return tracker.getRangeForLine(line); }
getTargetRange
259,389
void (@NotNull LineStatusTracker<?> tracker, @NotNull Editor editor, @NotNull Range range) { tracker.showHint(range, editor); }
moveToRange
259,390
DiffActionExecutor (@NotNull DiffProvider diffProvider, @NotNull VirtualFile selectedFile, @NotNull Project project, @Nullable Editor editor) { return new DiffActionExecutor.CompareToCurrentExecutor(diffProvider, selectedFile, project, editor); }
getExecutor
259,391
void (@NotNull AnActionEvent e) { super.update(e); Presentation presentation = e.getPresentation(); presentation.setText(ActionsBundle.message("action.Compare.SameVersion.text")); Project project = e.getProject(); if (project != null) { AbstractVcs vcs = ProjectLevelVcsManager.getInstance(project).getSingleVCS(); if (v...
update
259,392
boolean (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null || project.isDisposed()) return false; VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); if (file == null || file.isDirectory() || file.getFileType().isBinary()) return false; VirtualFile vcsFile = VcsUtil.resolveSymlink...
isEnabled
259,393
boolean (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE); return VcsAnnotateUtil.getBackgroundableLock(project, file).isLocked(); }
isSuspended
259,394
boolean (@NotNull AnActionEvent e) { VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE); Editor editor = VcsAnnotateUtil.getEditorFor(file, e.getDataContext()); return editor != null && AnnotateToggleAction.hasVcsAnnotations(editor); }
isAnnotated
259,395
void (AnActionEvent e, boolean selected) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); VirtualFile selectedFile = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE); if (!selected) { Editor editor = Objects.requireNonNull(VcsAnnotateUtil.getEditorFor(selectedFile, e.getDataContext())); AnnotateToggleAction...
perform
259,396
void (@NotNull final Editor editor, @NotNull final Project project) { final VirtualFile file = FileDocumentManager.getInstance().getFile(editor.getDocument()); if (file == null) return; VirtualFile vcsFile = VcsUtil.resolveSymlinkIfNeeded(project, file); final AbstractVcs vcs = ProjectLevelVcsManager.getInstance(projec...
doAnnotate
259,397
void (final @NotNull ProgressIndicator indicator) { try { fileAnnotationRef.set(annotationProvider.annotate(vcsFile)); } catch (VcsException e) { exceptionRef.set(e); } catch (ProcessCanceledException pce) { throw pce; } catch (Throwable t) { exceptionRef.set(new VcsException(t)); } }
run
259,398
void () { onSuccess(); }
onCancel
259,399
void () { if (!exceptionRef.isNull()) { LOG.warn(exceptionRef.get()); AbstractVcsHelper.getInstance(project) .showErrors(Collections.singletonList(exceptionRef.get()), VcsBundle.message("message.title.annotate")); } if (!fileAnnotationRef.isNull()) { AnnotateToggleAction.doAnnotate(editor, project, fileAnnotationRef.ge...
onSuccess