Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
43,400
String () { return getClass().getName(); }
getDimensionServiceKey
43,401
String () { return "reference.VersionControl.Git.Unstash"; }
getHelpId
43,402
JComponent () { return myStashList; }
getPreferredFocusedComponent
43,403
void () { GitStashUsageCollector.logStashPopDialog(!StringUtil.isEmpty(myBranchTextField.getText()), myReinstateIndexCheckBox.isSelected(), myPopStashCheckBox.isSelected()); boolean completed = GitStashOperations.unstash(myProject, getSelectedStash(), myBranchTextField.getText(), myPopStashCheckBox.isSelected(), myRein...
doOKAction
43,404
void (Project project, List<VirtualFile> gitRoots, VirtualFile defaultRoot) { new GitUnstashDialog(project, gitRoots, defaultRoot).show(); // d is not modal=> everything else in doOKAction. }
showUnstashDialog
43,405
GitLineHandler () { return GitStashUtils.createStashHandler(myProject, getGitRoot(), myKeepIndexCheckBox.isSelected(), myMessageTextField.getText()); }
handler
43,406
void () { GitStashUsageCollector.logStashPushDialog(!StringUtil.isEmpty(myMessageTextField.getText()), myKeepIndexCheckBox.isSelected()); }
logUsage
43,407
VirtualFile () { return (VirtualFile)myGitRootComboBox.getSelectedItem(); }
getGitRoot
43,408
JComponent () { return myRootPanel; }
createCenterPanel
43,409
String () { return getClass().getName(); }
getDimensionServiceKey
43,410
String () { return "reference.VersionControl.Git.Stash"; }
getHelpId
43,411
JComponent () { return myMessageTextField; }
getPreferredFocusedComponent
43,412
Collection<String> (@NotNull BranchType type) { ArrayList<String> branches = new ArrayList<>(); if (type == GitBranchType.LOCAL) { branches.add(MASTER); branches.add(MAIN); } if (type == GitBranchType.REMOTE) { branches.add(ORIGIN_MASTER); branches.add(ORIGIN_MAIN); } return branches; }
getDefaultBranchNames
43,413
AnAction (@NotNull Project project, @NotNull VcsRef ref, @NotNull GitRepository repository, @NotNull List<? extends GitRepository> allRepositories, @NotNull Set<String> commonBranches, @NotNull GitVcsSettings settings, boolean showBranchesPopup) { boolean isSyncBranch = settings.getSyncSetting() != DvcsSyncSettings.Val...
createBranchGroup
43,414
AnAction (@NotNull Project project, @NotNull VcsRef ref, @NotNull GitRepository repository, boolean showTagsPopup) { ActionGroup singleRepoActions = createTagActions(project, Collections.singletonList(repository), ref); singleRepoActions.setPopup(false); String text = showTagsPopup ? ref.getName() : GitBundle.message("...
createTagGroup
43,415
ActionGroup (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull VcsRef ref, @NotNull GitRepository selectedRepository, boolean isLocal) { if (isLocal) { return new LocalBranchActions(project, repositories, ref.getName(), selectedRepository); } else { return new RemoteBranchActions(p...
createBranchActions
43,416
ActionGroup (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull VcsRef ref) { return new GitBranchPopupActions.TagActions(project, repositories, ref.getName()); }
createTagActions
43,417
void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); GitRepository repository = GitBranchUtil.guessRepositoryForOperation(project, e.getDataContext()); if (repository == null) return; GitBranchesTreePopup.show(project, repository); }
actionPerformed
43,418
void (@NotNull AnActionEvent e) { Project project = e.getProject(); e.getPresentation().setEnabledAndVisible(project != null && !project.isDisposed() && !GitRepositoryManager.getInstance(project).getRepositories().isEmpty()); }
update
43,419
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,420
TextCompletionProvider (@NotNull Project project, @NotNull List<GitRepository> repositories, @NotNull Disposable disposable) { VcsLogManager logManager = VcsProjectLog.getInstance(project).getLogManager(); if (logManager != null) { List<VirtualFile> roots = ContainerUtil.map(repositories, Repository::getRoot); DataPack...
getCompletionProvider
43,421
Future<Collection<GitTag>> (@NotNull List<GitRepository> repositories, @NotNull Disposable disposable) { return ApplicationManager.getApplication().executeOnPooledThread(() -> BackgroundTaskUtil.runUnderDisposeAwareIndicator(disposable, () -> GitBranchUtil.collectCommon(repositories.stream().map(repository -> { try { L...
scheduleCollectCommonTags
43,422
String () { return StringUtil.trim(myTextField.getText(), CharFilter.NOT_WHITESPACE_FILTER); }
getReference
43,423
Collection<VcsRef> (@NotNull Stream<? extends VcsRef> stream) { MultiMap<VirtualFile, VcsRef> map = MultiMap.create(); stream.forEach(ref -> map.putValue(ref.getRoot(), ref)); Stream<Collection<VcsRef>> groups = map.entrySet().stream().map(Map.Entry::getValue); return GitBranchUtil.collectCommon(groups, new NameAndType...
collectCommonVcsRefs
43,424
Stream<VcsRef> (@NotNull Stream<VcsRef> vcsRefs) { Stream<VcsRef> branches = vcsRefs.filter(ref -> { VcsRefType type = ref.getType(); return type == GitRefManager.LOCAL_BRANCH || type == GitRefManager.REMOTE_BRANCH || type == GitRefManager.TAG; }); return collectCommonVcsRefs(branches).stream(); }
filterRefs
43,425
String (@NotNull VcsRef item) { return item.getName(); }
getLookupString
43,426
int (VcsRef item1, VcsRef item2) { return myReferenceComparator.compare(item1, item2); }
compare
43,427
int (VcsRef object) { return object == null ? 0 : Comparing.hashcode(object.getName(), object.getType()); }
hashCode
43,428
boolean (VcsRef o1, VcsRef o2) { return o1 == o2 || (o1 != null && o2 != null && Objects.equals(o1.getName(), o2.getName()) && Objects.equals(o1.getType(), o2.getType())); }
equals
43,429
String (@NotNull GitReference item) { return item.getName(); }
getLookupString
43,430
int (GitReference item1, GitReference item2) { return item1.compareTo(item2); }
compare
43,431
Project () { return myProject; }
getProject
43,432
RepositoryManager () { return GitUtil.getRepositoryManager(myProject); }
getRepositoryManager
43,433
DvcsCompareSettings () { return GitVcsSettings.getInstance(myProject); }
getDvcsCompareSettings
43,434
String (@NotNull String firstBranch, @NotNull String secondBranch) { return String.format("git log %s..%s", firstBranch, secondBranch); // NON-NLS }
formatLogCommand
43,435
void (Presentation presentation, @NlsContexts.Tooltip String tooltipText) { presentation.putClientProperty(JComponent.TOOL_TIP_TEXT_KEY, tooltipText); }
addTooltipText
43,436
void (@NotNull AnActionEvent e) { createOrCheckoutNewBranch(myProject, myRepositories, HEAD, GitBundle.message("branches.create.new.branch.dialog.title"), MultiRootBranches.getCommonCurrentBranch(myRepositories)); }
actionPerformed
43,437
String () { return myBranchName; }
getBranchName
43,438
void () { super.toggle(); myGitBranchManager.setFavorite(LOCAL, chooseRepo(), myBranchName, isFavorite()); }
toggle
43,439
boolean () { return myIncomingOutgoingManager.hasIncomingFor(chooseRepo(), myBranchName); }
hasIncomingCommits
43,440
boolean () { return myIncomingOutgoingManager.hasOutgoingFor(chooseRepo(), myBranchName); }
hasOutgoingCommits
43,441
void (@NotNull AnActionEvent e) { checkoutBranch(myProject, myRepositories, myBranchName); }
actionPerformed
43,442
void (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull String branchName) { GitBrancher brancher = GitBrancher.getInstance(project); brancher.checkout(branchName, false, repositories, null); }
checkoutBranch
43,443
void (@NotNull AnActionEvent e) { GitBrancher brancher = GitBrancher.getInstance(myProject); brancher.rebaseOnCurrent(myRepositories, myBranchName); }
actionPerformed
43,444
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,445
void (@NotNull AnActionEvent e) { disableActionIfAnyRepositoryIsFresh(e, myRepositories, GitBundle.message("action.not.possible.in.fresh.repo.push")); }
update
43,446
void (@NotNull AnActionEvent e) { GitLocalBranch localBranch = myRepositories.get(0).getBranches().findLocalBranch(myBranchName); assert localBranch != null; new VcsPushDialog(myProject, myRepositories, myRepositories, null, GitPushSource.create(localBranch)).show(); }
actionPerformed
43,447
void (@NotNull AnActionEvent e) { rename(myProject, myRepositories, myCurrentBranchName); }
actionPerformed
43,448
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,449
void (@NotNull AnActionEvent e) { disableActionIfAnyRepositoryIsFresh(e, myRepositories, GitBundle.message("action.not.possible.in.fresh.repo.rename.branch")); }
update
43,450
void (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull String currentBranchName) { GitNewBranchOptions options = new GitNewBranchDialog(project, repositories, GitBundle.message("branches.rename.branch", currentBranchName), currentBranchName, false, false, false, false, GitBranchOp...
rename
43,451
void (@NotNull AnActionEvent e) { GitBrancher.getInstance(myProject) .deleteBranch(myBranchName, filter(myRepositories, repository -> !myBranchName.equals(repository.getCurrentBranchName()))); }
actionPerformed
43,452
void () { super.toggle(); myGitBranchManager.setFavorite(REMOTE, myRepositories.size() > 1 ? null : mySelectedRepository, myBranchName, isFavorite()); }
toggle
43,453
void (@NotNull AnActionEvent e) { checkoutRemoteBranch(myProject, myRepositories, myRemoteBranchName); }
actionPerformed
43,454
void (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull String remoteBranchName) { GitRepository repository = repositories.get(0); GitRemoteBranch remoteBranch = Objects.requireNonNull(repository.getBranches().findRemoteBranch(remoteBranchName)); String suggestedLocalName = remoteB...
checkoutRemoteBranch
43,455
void (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull String remoteBranchName, @NotNull String suggestedLocalName, @Nullable Runnable callInAwtLater) { // can have remote conflict if git-svn is used - suggested local name will be equal to selected remote if (BRANCH_NAME_HASHING_S...
checkoutRemoteBranch
43,456
void (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull String remoteBranchName, @NotNull String suggestedLocalName, @Nullable Runnable callInAwtLater) { //do not allow name conflicts GitNewBranchOptions options = new GitNewBranchDialog(project, repositories, GitBundle.message("bra...
askNewBranchNameAndCheckout
43,457
void (@NotNull AnActionEvent e) { GitRepository repository = myRepositories.get(0); GitRemoteBranch remoteBranch = Objects.requireNonNull(repository.getBranches().findRemoteBranch(myBranchName)); String suggestedLocalName = remoteBranch.getNameForRemoteOperations(); GitNewBranchOptions newBranchOptions = new GitNewBran...
actionPerformed
43,458
void (@NotNull AnActionEvent e) { new GitUpdateExecutionProcess(myProject, myRepositories, configureTarget(myRepositories, myRemoteBranchName), myUpdateMethod, false) .execute(); }
actionPerformed
43,459
void (@NotNull AnActionEvent e) { GitBrancher brancher = GitBrancher.getInstance(myProject); brancher.deleteRemoteBranch(myBranchName, myRepositories); }
actionPerformed
43,460
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,461
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(!GitProtectedBranchesKt.isRemoteBranchProtected(myRepositories, myBranchName)); }
update
43,462
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,463
void (@NotNull AnActionEvent e) { disableActionIfAnyRepositoryIsFresh(e, myRepositories, DvcsBundle.message("action.not.possible.in.fresh.repo.new.branch")); }
update
43,464
void (@NotNull AnActionEvent e) { createOrCheckoutNewBranch(myProject, myRepositories, myBranchName + "^0", GitBundle.message("action.Git.New.Branch.dialog.title", myBranchName), GitBranchActionsUtil.calculateNewBranchInitialName(myBranchName, myIsRemote)); }
actionPerformed
43,465
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,466
void (@NotNull AnActionEvent e) { String description = GitBundle.message("branches.checkout.and.rebase.onto.in.one.step", getSelectedBranchFullPresentation(myBranchName), getCurrentBranchFullPresentation(myProject, myRepositories), myBranchName); Presentation presentation = e.getPresentation(); presentation.setDescript...
update
43,467
void (@NotNull AnActionEvent e) { FileDocumentManager.getInstance().saveAllDocuments(); GitBrancher brancher = GitBrancher.getInstance(myProject); brancher.compare(myBranchName, myRepositories); }
actionPerformed
43,468
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,469
void (@NotNull AnActionEvent e) { String description = GitBundle.message("branches.show.commits.in", getSelectedBranchFullPresentation(myBranchName), getCurrentBranchFullPresentation(myProject, myRepositories)); Presentation presentation = e.getPresentation(); presentation.setDescription(description); addTooltipText(pr...
update
43,470
void (@NotNull AnActionEvent e) { GitBrancher.getInstance(myProject) .showDiffWithLocal(myBranchName, myRepositories); }
actionPerformed
43,471
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,472
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(!new GitMultiRootBranchConfig(myRepositories).diverged()); String description = GitBundle.message("branches.compare.the.current.working.tree.with", getSelectedBranchFullPresentation(myBranchName)); e.getPresentation().setDescription(description)...
update
43,473
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,474
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); String description = GitBundle.message("branches.merge.into", getSelectedBranchFullPresentation(myBranchName), getCurrentBranchFullPresentation(myProject, myRepositories)); presentation.setDescription(description); addTooltipText(present...
update
43,475
void (@NotNull AnActionEvent e) { GitBrancher brancher = GitBrancher.getInstance(myProject); brancher.merge(myBranchName, deleteOnMerge(myProject), myRepositories); }
actionPerformed
43,476
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,477
void (@NotNull AnActionEvent e) { boolean isOnBranch = and(myRepositories, GitRepository::isOnBranch); String description = isOnBranch ? GitBundle.message("branches.rebase.onto", getCurrentBranchFullPresentation(myProject, myRepositories), getSelectedBranchFullPresentation(myBranchName)) : GitBundle.message("branches.r...
update
43,478
void (@NotNull AnActionEvent e) { GitBrancher brancher = GitBrancher.getInstance(myProject); brancher.rebase(myRepositories, myBranchName); }
actionPerformed
43,479
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
43,480
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); if (!hasRemotes(myProject)) { presentation.setEnabledAndVisible(false); return; } String branchPresentation = getSelectedBranchFullPresentation(myBranchName); String description = GitBundle.message("action.Git.Update.Selected.description...
update
43,481
void (@NotNull AnActionEvent e) { updateBranches(myProject, myRepositories, myBranchNameList); }
actionPerformed
43,482
void (@NotNull AnActionEvent e) { GitBrancher brancher = GitBrancher.getInstance(myProject); brancher.deleteTag(myTagName, myRepositories); }
actionPerformed
43,483
Collection<String> () { return GitBranchUtil.getCommonBranches(myRepositories, true); }
getLocalBranchNames
43,484
Collection<String> (@NotNull String remoteBranch) { Collection<String> trackingBranches = null; for (GitRepository repository : myRepositories) { Collection<String> tb = getTrackingBranches(repository, remoteBranch); if (trackingBranches == null) { trackingBranches = tb; } else { trackingBranches = ContainerUtil.inters...
getCommonTrackingBranches
43,485
Collection<String> (@NotNull GitRepository repository, @NotNull String remoteBranch) { Collection<String> trackingBranches = new ArrayList<>(1); for (GitBranchTrackInfo trackInfo : repository.getBranchTrackInfos()) { if (remoteBranch.equals(trackInfo.getRemoteBranch().getNameForLocalOperations())) { trackingBranches.ad...
getTrackingBranches
43,486
String () { StringBuilder sb = new StringBuilder(); for (GitRepository repository : myRepositories) { sb.append(repository.getPresentableUrl()).append(":").append(repository.getCurrentBranch()).append(":").append(repository.getState()); } return sb.toString(); }
toString
43,487
Collection<VirtualFile> () { return getRootsFromRepositories(filter(myRepositoryManager.getRepositories(), repository -> repository.getState() == Repository.State.MERGING)); }
getMergingRoots
43,488
String (@NotNull Collection<VirtualFile> files) { return myMergeDescription; }
getMultipleFileMergeDescription
43,489
String (@NotNull Collection<VirtualFile> files) { if (!StringUtil.isEmpty(myMergeDescription)) { return myMergeDescription; } return super.getMultipleFileMergeDescription(files); }
getMultipleFileMergeDescription
43,490
Params (boolean reverseMerge) { reverse = reverseMerge; return this; }
setReverse
43,491
Params (@NotificationTitle String errorNotificationTitle) { myErrorNotificationTitle = errorNotificationTitle; return this; }
setErrorNotificationTitle
43,492
Params (@NotificationContent String errorNotificationAdditionalDescription) { myErrorNotificationAdditionalDescription = errorNotificationAdditionalDescription; return this; }
setErrorNotificationAdditionalDescription
43,493
Params (@Nls String mergeDescription) { myMergeDescription = mergeDescription; return this; }
setMergeDescription
43,494
Params (MergeDialogCustomizer mergeDialogCustomizer) { myMergeDialogCustomizer = mergeDialogCustomizer; return this; }
setMergeDialogCustomizer
43,495
boolean () { return merge(false); }
merge
43,496
void () { merge(true); }
mergeNoProceed
43,497
void () { new Task.Backgroundable(myProject, GitBundle.message("apply.changes.resolving.conflicts.progress.title")) { @Override public void run(@NotNull ProgressIndicator indicator) { mergeNoProceed(); } }.queue(); }
mergeNoProceedInBackground
43,498
void (@NotNull ProgressIndicator indicator) { mergeNoProceed(); }
run
43,499
void () { notifyWarning(myParams.myErrorNotificationTitle, GitBundle.message("merge.unresolved.conflicts.remaining.notification.body") + myParams.myErrorNotificationAdditionalDescription); }
notifyUnresolvedRemain