Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/src/main/java/git4idea/commands/GitTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public final void runAlone() {

@RequiredUIAccess
private void justRun() {
LocalizeValue oldTitle = myProgressIndicator.getTextValue();
LocalizeValue oldTitle = myProgressIndicator.getText();
myProgressIndicator.setText(myTitle);
myDelegate.run(myProgressIndicator);
myProgressIndicator.setText(oldTitle);
Expand Down
15 changes: 6 additions & 9 deletions plugin/src/main/java/git4idea/rebase/GitRebaser.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public GitRebaser(@Nonnull Project project, @Nonnull Git git, @Nonnull ProgressI
mySkippedCommits = new ArrayList<>();
}

@RequiredUIAccess
public GitUpdateResult rebase(
@Nonnull VirtualFile root,
@Nonnull List<String> parameters,
Expand All @@ -95,17 +96,13 @@ public GitUpdateResult rebase(
rebaseHandler.addLineListener(GitStandardProgressAnalyzer.createListener(myProgressIndicator));

try (AccessToken ignored = DvcsUtil.workingTreeChangeStarted(myProject, "Rebase")) {
String oldText = myProgressIndicator.getText();
myProgressIndicator.setText("Rebasing...");
LocalizeValue oldText = myProgressIndicator.getText();
myProgressIndicator.setText(LocalizeValue.localizeTODO("Rebasing..."));
GitCommandResult result = myGit.runCommand(rebaseHandler);
myProgressIndicator.setText(oldText);
return result.success() ? GitUpdateResult.SUCCESS : handleRebaseFailure(
rebaseHandler,
root,
rebaseConflictDetector,
untrackedFilesDetector,
localChangesDetector
);
return result.success()
? GitUpdateResult.SUCCESS
: handleRebaseFailure(rebaseHandler, root, rebaseConflictDetector, untrackedFilesDetector, localChangesDetector);
}
catch (ProcessCanceledException pce) {
if (onCancel != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected void save(@Nonnull Collection<VirtualFile> rootsToSave) throws VcsExce
Map<String, Map<VirtualFile, Collection<Change>>> lists =
new LocalChangesUnderRoots(myChangeManager, myVcsManager).getChangesByLists(rootsToSave);

LocalizeValue oldProgressTitle = myProgressIndicator.getTextValue();
LocalizeValue oldProgressTitle = myProgressIndicator.getText();
myProgressIndicator.setText(GitLocalize.updateShelvingChanges());
List<VcsException> exceptions = new ArrayList<>(1);
myShelvedLists = new HashMap<>();
Expand Down Expand Up @@ -99,7 +99,7 @@ protected void save(@Nonnull Collection<VirtualFile> rootsToSave) throws VcsExce
public void load() {
if (myShelvedLists != null) {
LOG.info("load ");
LocalizeValue oldProgressTitle = myProgressIndicator.getTextValue();
LocalizeValue oldProgressTitle = myProgressIndicator.getText();
myProgressIndicator.setText(GitLocalize.updateUnshelvingChanges());
for (ShelvedChangeList list : myShelvedLists.values()) {
GitShelveUtils.doSystemUnshelve(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected void save(@Nonnull Collection<VirtualFile> rootsToSave) throws VcsExce
for (VirtualFile root : rootsToSave) {
String message = GitHandlerUtil.formatOperationName("Stashing changes from", root);
LOG.info(message);
LocalizeValue oldProgressTitle = myProgressIndicator.getTextValue();
LocalizeValue oldProgressTitle = myProgressIndicator.getText();
myProgressIndicator.setText(message);
GitRepository repository = myRepositoryManager.getRepositoryForRoot(root);
if (repository == null) {
Expand Down
5 changes: 2 additions & 3 deletions plugin/src/main/java/git4idea/update/GitMergeUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import java.io.File;
import java.util.*;

import static consulo.util.lang.ObjectUtil.assertNotNull;
import static java.util.Arrays.asList;

/**
Expand Down Expand Up @@ -86,12 +85,12 @@ protected GitUpdateResult doUpdate() {
GitUntrackedFilesOverwrittenByOperationDetector untrackedFilesDetector =
new GitUntrackedFilesOverwrittenByOperationDetector(myRoot);

LocalizeValue originalText = myProgressIndicator.getTextValue();
LocalizeValue originalText = myProgressIndicator.getText();
myProgressIndicator.setText(LocalizeValue.localizeTODO("Merging" + GitUtil.mention(myRepository) + "..."));
try {
GitCommandResult result = myGit.merge(
myRepository,
assertNotNull(myBranchPair.getDest()).getName(),
Objects.requireNonNull(myBranchPair.getDest()).getName(),
asList("--no-stat", "-v"),
mergeLineListener,
untrackedFilesDetector,
Expand Down
4 changes: 2 additions & 2 deletions plugin/src/main/java/git4idea/update/GitUpdateProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public GitUpdateProcess(
@RequiredUIAccess
public GitUpdateResult update(UpdateMethod updateMethod) {
LOG.info("update started|" + updateMethod);
LocalizeValue oldText = myProgressIndicator.getTextValue();
LocalizeValue oldText = myProgressIndicator.getText();
myProgressIndicator.setText(LocalizeValue.localizeTODO("Updating..."));

for (GitRepository repository : myRepositories) {
Expand Down Expand Up @@ -272,7 +272,7 @@ private Collection<GitRepository> findRootsRebasingOverMerge(@Nonnull Map<GitRep
GitUpdater updater = updaters.get(repo);
if (updater instanceof GitRebaseUpdater) {
String currentRef = updater.getSourceAndTarget().getBranch().getFullName();
String baseRef = ObjectUtil.assertNotNull(updater.getSourceAndTarget().getDest()).getFullName();
String baseRef = Objects.requireNonNull(updater.getSourceAndTarget().getDest()).getFullName();
return GitRebaseOverMergeProblem.hasProblem(myProject, repo.getRoot(), baseRef, currentRef) ? repo : null;
}
return null;
Expand Down
Loading