Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
43,100
void (@NotNull Project project, @NotNull GitRepository repository, @NotNull ProgressIndicator indicator) { GitRebaseUtils.abort(project, repository, indicator); }
performActionForRepository
43,101
String () { return GitBundle.message("pull.action.name"); }
getActionName
43,102
DialogState (@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) { final GitPullDialog dialog = new GitPullDialog(project, gitRoots, defaultRoot); if (!dialog.showAndGet()) { return null; } GitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project); GitRe...
displayDialog
43,103
String () { return PULL_FAILED; }
getNotificationErrorDisplayId
43,104
void (@NotNull DialogState dialogState, @NotNull Project project) { if (!dialogState.selectedOptions.contains(GitPullOption.REBASE.getOption())) { super.perform(dialogState, project); } else { performRebase(project, dialogState); } }
perform
43,105
void (@NotNull Project project, DialogState dialogState) { VirtualFile selectedRoot = dialogState.selectedRoot; GitRemoteBranch selectedBranch = ((GitRemoteBranch)dialogState.selectedBranch); GitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project); GitRepository repository = repositoryManager.get...
performRebase
43,106
boolean (@NotNull Project project, VirtualFile selectedRoot) { String value = null; try { value = GitConfigUtil.getValue(project, selectedRoot, "pull.rebase"); } catch (VcsException e) { LOG.warn(e); } return INTERACTIVE.equals(value); }
shouldSetupRebaseEditor
43,107
Supplier<GitLineHandler> (Project project, GitPullDialog dialog) { GitRemote remote = dialog.getSelectedRemote(); String remoteName = remote.getName(); VirtualFile root = dialog.gitRoot(); Set<GitPullOption> selectedOptions = dialog.getSelectedOptions(); GitRemoteBranch selectedBranch = dialog.getSelectedBranch(); retu...
getHandlerProvider
43,108
void (@NotNull AnActionEvent event) { Project project = Objects.requireNonNull(event.getProject()); GitVcs vcs = GitVcs.getInstance(project); Set<VirtualFile> conflictedFiles = new TreeSet<>(Comparator.comparing(VirtualFile::getPresentableUrl)); for (Change change : ChangeListManager.getInstance(project).getAllChanges(...
actionPerformed
43,109
boolean (@NotNull Project project) { Collection<Change> changes = ChangeListManager.getInstance(project).getAllChanges(); if (changes.size() > 1000) { return true; } return changes.stream().anyMatch(it -> it.getFileStatus() == FileStatus.MERGED_WITH_CONFLICTS); }
isEnabled
43,110
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); Project project = e.getData(CommonDataKeys.PROJECT); if (project == null || project.isDisposed()) { presentation.setEnabledAndVisible(false); return; } presentation.setEnabledAndVisible(isEnabled(project)); }
update
43,111
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,112
String () { return GitBundle.message("tag.action.name"); }
getActionName
43,113
void (final @NotNull Project project, final @NotNull List<VirtualFile> gitRoots, final @NotNull VirtualFile defaultRoot) { GitTagDialog d = new GitTagDialog(project, gitRoots, defaultRoot); if (d.showAndGet()) { new Task.Modal(project, GitBundle.message("tag.progress.title"), true) { @Override public void run(@NotNull ...
perform
43,114
void (@NotNull ProgressIndicator indicator) { d.runAction(); }
run
43,115
AbstractRepositoryManager<GitRepository> (@NotNull Project project) { return GitRepositoryManager.getInstance(project); }
getRepositoryManager
43,116
void () { FileDocumentManager.getInstance().saveAllDocuments(); }
saveAll
43,117
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,118
void (@NotNull AnActionEvent e) { var project = e.getProject(); Presentation presentation = e.getPresentation(); if (project == null || project.isDisposed() || !project.isOpen()) { presentation.setEnabledAndVisible(false); return; } GitRepository repo = GitBranchUtil.guessWidgetRepository(project, e.getDataContext()); ...
update
43,119
JBPopup (@NotNull DataContext context, @NotNull JComponent component, @Nullable Runnable disposeCallback) { Project project = Objects.requireNonNull(context.getData(CommonDataKeys.PROJECT)); GitRepository repo = Objects.requireNonNull(GitBranchUtil.guessWidgetRepository(project, context)); JBPopup popup = GitBranchesTr...
createActionPopup
43,120
void (@NotNull LightweightWindowEvent event) { if (disposeCallback != null) { disposeCallback.run(); } }
onClosed
43,121
void (@NotNull Project project, @NotNull ProgressIndicator indicator) { GitRebaseUtils.continueRebase(project); }
performActionForProject
43,122
void (@NotNull Project project, @NotNull GitRepository repository, @NotNull ProgressIndicator indicator) { GitRebaseUtils.continueRebase(project, repository, indicator); }
performActionForRepository
43,123
boolean (@NotNull GitRepository repository) { int locals = repository.getBranches().getLocalBranches().size(); boolean haveRemotes = !repository.getBranches().getRemoteBranches().isEmpty(); if (repository.isOnBranch()) { // there are other branches to compare return locals < 2 && !haveRemotes; } return locals == 0 && !...
nothingToCompare
43,124
List<String> (@NotNull GitRepository repository) { List<GitBranch> localBranches = new ArrayList<>(repository.getBranches().getLocalBranches()); Collections.sort(localBranches); List<GitBranch> remoteBranches = new ArrayList<>(repository.getBranches().getRemoteBranches()); Collections.sort(remoteBranches); if (reposito...
getBranchNamesExceptCurrent
43,125
GitRepositoryManager (@NotNull Project project) { return GitUtil.getRepositoryManager(project); }
getRepositoryManager
43,126
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(e.getProject() != null); }
update
43,127
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,128
void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); CheckoutProvider.Listener checkoutListener = ProjectLevelVcsManager.getInstance(project).getCompositeCheckoutListener(); VcsCloneDialog dialog = new VcsCloneDialog.Builder(project).forVcs(GitCheckoutProvider.class); if (dialo...
actionPerformed
43,129
String () { return GitVcs.NAME; }
getVcsName
43,130
List<AnAction> (@NotNull ActionManager manager) { List<AnAction> actions = new ArrayList<>(); add("Git.Branches", manager, actions); add("Vcs.Push", manager, actions); add("Git.Stash", manager, actions); add("Git.Unstash", manager, actions); add("ChangesView.AddUnversioned", manager, actions); add("Git.ResolveConflicts...
collectVcsSpecificActions
43,131
void (@NotNull ActionManager manager, @NotNull List<? super AnAction> actions) { String commitStageActionName = "Git.Commit.Stage"; String stageAllActionName = "Git.Stage.Add.Tracked"; addAfter(commitStageActionName, IdeActions.ACTION_CHECKIN_PROJECT, manager, actions); addAfter(stageAllActionName, commitStageActionNam...
customizeActions
43,132
void (String actionName, String anchorActionName, ActionManager manager, List<? super AnAction> actions) { AnAction action = manager.getAction(actionName); assert action != null : "Can not find action " + actionName; AnAction anchorAction = manager.getAction(anchorActionName); assert anchorAction != null : "Can not fin...
addAfter
43,133
boolean (@NotNull GitRepository repository) { return false; }
nothingToCompare
43,134
GitRepositoryManager (@NotNull Project project) { return GitUtil.getRepositoryManager(project); }
getRepositoryManager
43,135
void (@NotNull Project project, @NotNull GitRepository repository, @NotNull VirtualFile file, @NotNull @NlsSafe String tagName) { String presentableRevisionName = getPresentableCurrentBranchName(repository); String revNumTitle1 = VcsDiffUtil.getRevisionTitle(tagName, false); String revNumTitle2 = VcsDiffUtil.getRevisio...
showDiffWithTag
43,136
void (@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) { if (ChangeListManager.getInstance(project).isFreezedWithNotification(GitBundle.message("stash.error.can.not.stash.changes.now"))) { return; } GitStashDialog d = new GitStashDialog(project, gitRoots, defaultRoot); if...
perform
43,137
String () { return GitBundle.message("stash.action.name"); }
getActionName
43,138
String () { return GitBundle.message("merge.action.name"); }
getActionName
43,139
String () { return MERGE_FAILED; }
getNotificationErrorDisplayId
43,140
Supplier<GitLineHandler> (Project project, GitMergeDialog dialog) { VirtualFile root = dialog.getSelectedRoot(); Set<GitMergeOption> selectedOptions = dialog.getSelectedOptions(); String commitMsg = dialog.getCommitMessage().trim(); GitBranch selectedBranch = dialog.getSelectedBranch(); return () -> { GitLineHandler h ...
getHandlerProvider
43,141
void (@NotNull AnActionEvent e) { super.update(e); Project project = e.getProject(); Presentation presentation = e.getPresentation(); if (project != null && !GitUtil.getRepositoriesInState(project, Repository.State.MERGING).isEmpty()) { presentation.setEnabledAndVisible(false); } else if (project != null && GitUtil.get...
update
43,142
void (@NotNull AnActionEvent e) { final Project project = e.getRequiredData(CommonDataKeys.PROJECT); if (getRepositoryManager(project).hasOngoingRebase()) { ProgressManager.getInstance().run(new Task.Backgroundable(project, getProgressTitle()) { @Override public void run(@NotNull ProgressIndicator indicator) { performA...
actionPerformed
43,143
void (@NotNull ProgressIndicator indicator) { performActionForProject(project, indicator); }
run
43,144
boolean (@NotNull GitRepository repositoryToOperate) { ProgressManager.getInstance().run(new Task.Backgroundable(repositoryToOperate.getProject(), getProgressTitle()) { @Override public void run(@NotNull ProgressIndicator indicator) { performActionForRepository(repositoryToOperate.getProject(), repositoryToOperate, ind...
performInBackground
43,145
void (@NotNull ProgressIndicator indicator) { performActionForRepository(repositoryToOperate.getProject(), repositoryToOperate, indicator); }
run
43,146
String () { return GitBundle.message("action.Git.Rebase.operation.name"); }
getOperationName
43,147
void (final @NotNull AnActionEvent e) { FileDocumentManager.getInstance().saveAllDocuments(); final Project project = e.getRequiredData(CommonDataKeys.PROJECT); GitVcs vcs = GitVcs.getInstance(project); final List<VirtualFile> roots = getGitRoots(project, vcs); if (roots == null || roots.isEmpty()) return; GitRepositor...
actionPerformed
43,148
void (final @NotNull AnActionEvent e) { boolean enabled = isEnabled(e); e.getPresentation().setEnabled(enabled); if (ActionPlaces.isPopupPlace(e.getPlace())) { e.getPresentation().setVisible(enabled); } else { e.getPresentation().setVisible(true); } }
update
43,149
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,150
boolean (AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) { return false; } GitVcs vcs = GitVcs.getInstance(project); final VirtualFile[] roots = ProjectLevelVcsManager.getInstance(project).getRootsUnderVcs(vcs); if (roots == null || roots.length == 0) { return false; } retur...
isEnabled
43,151
void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) { e.getPresentation().setEnabledAndVisible(false); return; } if (!hasRemotes(project)) { e.getPresentation().setEnabled(false); return; } if (fetchSupport(project).isFetchRunning()) { e.getPresentation().setEnabled(false); e.getPre...
update
43,152
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,153
void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); GitVcs.runInBackground(new Task.Backgroundable(project, GitBundle.message("fetching"), true) { GitFetchResult result; @Override public void run(@NotNull ProgressIndicator indicator) { result = fetchSupport(project).fetchAllRe...
actionPerformed
43,154
void (@NotNull ProgressIndicator indicator) { result = fetchSupport(project).fetchAllRemotes(getRepositories(project)); }
run
43,155
void () { if (result != null) { onFetchFinished(project, result); } }
onFinished
43,156
void (@NotNull Project project, @NotNull GitFetchResult result) { result.showNotification(); }
onFetchFinished
43,157
VcsRevisionNumber (@NotNull GitRepository repository) { // we force update the GitRepository, because update is asynchronous, and thus the GitChangeProvider may be asked for changes // before the GitRepositoryUpdater has captures the current revision change and has updated the GitRepository. repository.update(); final ...
getHead
43,158
void (FilePath filepath) { ContentRevision before = GitContentRevision.createRevision(filepath, myHead, myProject); ContentRevision after = GitContentRevision.createRevision(filepath, null, myProject); reportChange(FileStatus.MODIFIED, before, after); }
reportModified
43,159
void (FilePath filepath) { ContentRevision before = GitContentRevision.createRevision(filepath, myHead, myProject); ContentRevision after = GitContentRevision.createRevisionForTypeChange(filepath, null, myProject); reportChange(FileStatus.MODIFIED, before, after); }
reportTypeChanged
43,160
void (FilePath filepath) { ContentRevision before = null; ContentRevision after = GitContentRevision.createRevision(filepath, null, myProject); reportChange(FileStatus.ADDED, before, after); }
reportAdded
43,161
void (FilePath filepath) { ContentRevision before = GitContentRevision.createRevision(filepath, myHead, myProject); ContentRevision after = null; reportChange(FileStatus.DELETED, before, after); }
reportDeleted
43,162
void (FilePath filepath, FilePath oldFilepath) { ContentRevision before = GitContentRevision.createRevision(oldFilepath, myHead, myProject); ContentRevision after = GitContentRevision.createRevision(filepath, null, myProject); reportChange(FileStatus.MODIFIED, before, after); }
reportRename
43,163
void (FilePath filepath) { ContentRevision before = GitContentRevision.createRevision(filepath, myHead, myProject); ContentRevision after = GitContentRevision.createRevision(filepath, null, myProject); reportChange(FileStatus.MERGED_WITH_CONFLICTS, before, after); }
reportConflict
43,164
void (FileStatus status, ContentRevision before, ContentRevision after) { myChanges.add(new Change(before, after, status)); }
reportChange
43,165
void (@NotNull FilePath path) { myProcessedPaths.add(path); }
markPathProcessed
43,166
void (@NotNull VirtualFile root, @NotNull VcsRevisionNumber revision) { myHeadRevisions.put(root, revision); }
markHeadRevision
43,167
boolean () { return true; }
isModifiedDocumentTrackingRequired
43,168
boolean () { return isRefreshInProgress; }
isRefreshInProgress
43,169
List<GitFileStatus> () { synchronized (LOCK) { return new ArrayList<>(myRecords); } }
getAllRecords
43,170
boolean () { synchronized (LOCK) { return ContainerUtil.exists(myRecords, record -> GitIndexStatusUtilKt.isConflicted(record.getIndex(), record.getWorkTree())); } }
hasConflicts
43,171
List<GitConflict> () { synchronized (LOCK) { return ContainerUtil.mapNotNull(myRecords, this::createConflict); } }
getAllConflicts
43,172
boolean (@NotNull GitFileStatus record, @NotNull RootDirtySet dirtySet) { return dirtySet.belongsTo(record.getPath()) || record.getOrigPath() != null && dirtySet.belongsTo(record.getOrigPath()); }
isUnder
43,173
boolean (@NotNull GitFileStatus record, @Nullable VirtualFile candidateRoot) { if (candidateRoot == null) return false; String recordPath = record.getPath().getPath(); String rootPath = candidateRoot.getPath(); return recordPath.equals(rootPath); }
isSubmoduleStatus
43,174
boolean (char statusCode) { return GitIndexStatusUtilKt.isRenamed(statusCode) || GitIndexStatusUtilKt.isDeleted(statusCode) || GitIndexStatusUtilKt.isAdded(statusCode); }
isStatusCodeForPotentialRename
43,175
GitRefNameValidator () { return INSTANCE; }
getInstance
43,176
boolean (String inputString) { return !StringUtil.isEmptyOrSpaces(inputString) && !VALIDATEPATTERNS.matcher(inputString).find(); }
checkInput
43,177
boolean (String inputString) { return checkInput(inputString); }
canClose
43,178
String (@NotNull String branchName) { return cleanUpBranchNameOnTyping(branchName).replaceAll(ENDPATTERNS.pattern(), ""); }
cleanUpBranchName
43,179
String (@NotNull String branchName) { return branchName.replaceAll(DROP.pattern(), "").replaceAll(REPLACE.pattern(), AdvancedSettings.getString("git.branch.cleanup.symbol")); }
cleanUpBranchNameOnTyping
43,180
GitNewBranchNameValidator (@NotNull Collection<? extends GitRepository> repositories) { return new GitNewBranchNameValidator(repositories); }
newInstance
43,181
boolean (@NotNull String inputString) { ValidationInfo info = GitBranchValidatorKt.validateName(myRepositories, inputString); myErrorText = info != null ? info.message : null; return info == null; }
checkInput
43,182
boolean (String inputString) { return checkInput(inputString); }
canClose
43,183
String (String inputString) { return myErrorText; }
getErrorText
43,184
void (@NotNull AnActionEvent event) { final Project project = event.getRequiredData(CommonDataKeys.PROJECT); final VcsRevisionNumber revision = getRevisionNumber(event); if (revision == null) { return; } jumpToRevision(project, HashImpl.build(revision.asString())); }
actionPerformed
43,185
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,186
void (@NotNull AnActionEvent e) { Project project = e.getProject(); e.getPresentation().setEnabled(project != null && getRevisionNumber(e) != null && Comparing.equal(getVcsKey(e), GitVcs.getKey())); }
update
43,187
void (@NotNull Project project, @NotNull Hash hash) { VcsLogContentUtil.runInMainLog(project, logUi -> jumpToRevisionUnderProgress(project, logUi, hash)); }
jumpToRevision
43,188
void (@NotNull Project project, @NotNull VcsLogUiEx logUi, @NotNull Hash hash) { Future<Boolean> future = VcsLogNavigationUtil.jumpToHash(logUi, hash.asString(), false, true); if (!future.isDone()) { ProgressManager.getInstance().run(new Task.Backgroundable(project, GitBundle.message("git.log.show.commit.in.log.process...
jumpToRevisionUnderProgress
43,189
void (@NotNull ProgressIndicator indicator) { try { future.get(); } catch (CancellationException | InterruptedException ignored) { } catch (ExecutionException e) { LOG.error(e); } }
run
43,190
boolean (@NotNull String refSuffix, @NotNull Editor editor) { Project project = editor.getProject(); if (project == null) return false; Hash hash = tryCreateHash(refSuffix); if (hash == null) { LOG.warn("Bad revision: " + refSuffix); return false; } GitShowCommitInLogAction.jumpToRevision(project, hash); return true; }
handleLink
43,191
void (@NotNull VirtualFile root, @Nullable FilePath leftPath, @NotNull Hash leftHash, @Nullable FilePath rightPath, @NotNull Hash rightHash) { if (leftPath == null && rightPath == null) return; FilePath filePath = chooseNotNull(leftPath, rightPath); if (filePath.isDirectory()) { showDiffForPaths(root, Collections.singl...
showDiff
43,192
void (@NotNull VirtualFile root, @Nullable FilePath revisionPath, @NotNull Hash revisionHash, @NotNull FilePath localPath) { if (localPath.isDirectory()) { showDiffForPaths(root, Collections.singleton(localPath), revisionHash, null); } else { DiffRequestProducer requestProducer = SimpleDiffRequestProducer.create(localP...
showDiffWithLocal
43,193
void (@NotNull VirtualFile root, @Nullable Collection<FilePath> affectedPaths, @NotNull Hash leftRevision, @Nullable Hash rightRevision) { UIUtil.invokeLaterIfNeeded(() -> { boolean isWithLocal = rightRevision == null; Collection<FilePath> filePaths = affectedPaths != null ? affectedPaths : Collections.singleton(VcsUti...
showDiffForPaths
43,194
String (@NotNull VirtualFile root, @NotNull Collection<? extends FilePath> filePaths) { String joinedPaths = StringUtil.join(filePaths, path -> VcsFileUtil.relativePath(root, path), ", "); return StringUtil.shortenTextWithEllipsis(joinedPaths, 100, 0); }
getTitleForPaths
43,195
ContentRevision (@NotNull FilePath filePath, @NotNull Hash hash) { GitRevisionNumber revisionNumber = new GitRevisionNumber(hash.asString()); return GitContentRevision.createRevision(filePath, revisionNumber, myProject); }
createContentRevision
43,196
int (@Nullable VcsRef ref) { if (ref == null) { return 0; } return 31 * ref.getName().hashCode() + ref.getType().hashCode(); }
hashCode
43,197
boolean (@Nullable VcsRef ref1, @Nullable VcsRef ref2) { if (ref1 == ref2) return true; return ref1 != null && ref2 != null && ref1.getName().equals(ref2.getName()) && ref1.getType().equals(ref2.getType()); }
equals
43,198
void (@NotNull VirtualFile root, @NotNull Set<? extends VcsRef> allRefs, @NotNull List<? extends VcsCommitMetadata> sortedCommits, @NotNull DetailedLogData firstBlockSyncData, @NotNull Set<? extends VcsRef> manuallyReadBranches, @Nullable Set<String> currentTagNames, @Nullable DetailedLogData commitsFromTags) { runWith...
validateDataAndReportError
43,199
String (@NotNull VirtualFile root, @NotNull Set<? extends VcsRef> allRefs, @NotNull List<? extends VcsCommitMetadata> sortedCommits, @NotNull DetailedLogData firstBlockSyncData, @NotNull Set<? extends VcsRef> manuallyReadBranches, @Nullable Set<String> currentTagNames, @Nullable DetailedLogData commitsFromTags) { Strin...
printErrorDetails