svn: Removed "QuickMergeInteraction.showRecentListsForSelection()"
authorKonstantin Kolosovsky <konstantin.kolosovsky@jetbrains.com>
Thu, 13 Oct 2016 13:16:23 +0000 (16:16 +0300)
committerKonstantin Kolosovsky <konstantin.kolosovsky@jetbrains.com>
Wed, 9 Nov 2016 20:53:59 +0000 (23:53 +0300)
Used "QuickMergeInteraction.selectMergeItems()" instead

plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/QuickMergeInteraction.java
plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/QuickMergeInteractionImpl.java
plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/ShowRecentInDialogTask.java
plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/ShowRevisionSelector.java
plugins/svn4idea/testSource/org/jetbrains/idea/svn/QuickMergeTestInteraction.java

index 821629f6b5670d2edde2ade11768ee50e4c691a1..10466365900acb67bb632e8cfac5288ae3ba16f1 100644 (file)
@@ -34,8 +34,9 @@ public interface QuickMergeInteraction {
 
   @NotNull
   SelectMergeItemsResult selectMergeItems(@NotNull List<CommittedChangeList> lists,
-                                          @NotNull String mergeTitle,
-                                          @NotNull MergeChecker mergeChecker);
+                                          @NotNull MergeChecker mergeChecker,
+                                          boolean allStatusesCalculated,
+                                          boolean allListsLoaded);
 
   @NotNull
   LocalChangesAction selectLocalChangesAction(boolean mergeAll);
@@ -45,9 +46,4 @@ public interface QuickMergeInteraction {
   void showErrors(@NotNull String message, @NotNull List<VcsException> exceptions);
 
   void showErrors(@NotNull String message, boolean isError);
-
-  @NotNull
-  List<CommittedChangeList> showRecentListsForSelection(@NotNull List<CommittedChangeList> list,
-                                                        @NotNull MergeChecker mergeChecker,
-                                                        boolean allListsLoaded);
 }
index 06a49bcec76945ad650a8288b9c69ca9e60894ca..4a55657054ed338f9f7055cb8408465071e75f69 100644 (file)
@@ -79,9 +79,11 @@ public class QuickMergeInteractionImpl implements QuickMergeInteraction {
   @NotNull
   @Override
   public SelectMergeItemsResult selectMergeItems(@NotNull List<CommittedChangeList> lists,
-                                                 @NotNull String mergeTitle,
-                                                 @NotNull MergeChecker mergeChecker) {
-    ToBeMergedDialog dialog = new ToBeMergedDialog(myMergeContext, lists, mergeTitle, mergeChecker, true, true);
+                                                 @NotNull MergeChecker mergeChecker,
+                                                 boolean allStatusesCalculated,
+                                                 boolean allListsLoaded) {
+    ToBeMergedDialog dialog =
+      new ToBeMergedDialog(myMergeContext, lists, myMergeContext.getTitle(), mergeChecker, allStatusesCalculated, allListsLoaded);
     dialog.show();
 
     QuickMergeContentsVariants resultCode = toMergeVariant(dialog.getExitCode());
@@ -124,16 +126,6 @@ public class QuickMergeInteractionImpl implements QuickMergeInteraction {
     VcsBalloonProblemNotifier.showOverChangesView(myProject, message, isError ? MessageType.ERROR : MessageType.WARNING);
   }
 
-  @NotNull
-  @Override
-  public List<CommittedChangeList> showRecentListsForSelection(@NotNull List<CommittedChangeList> list,
-                                                               @NotNull MergeChecker mergeChecker,
-                                                               boolean allListsLoaded) {
-    ToBeMergedDialog dialog = new ToBeMergedDialog(myMergeContext, list, myMergeContext.getTitle(), mergeChecker, false, allListsLoaded);
-
-    return dialog.showAndGet() ? dialog.getSelected() : emptyList();
-  }
-
   private boolean prompt(@NotNull String question) {
     return showOkCancelDialog(myProject, question, myTitle, getQuestionIcon()) == OK;
   }
index 3659356c1158dec5cd0b154e4342d80b93b46e40..9aa22df9930bfcd9b5103897cbfa79803a3004d9 100644 (file)
@@ -33,9 +33,10 @@ public class ShowRecentInDialogTask extends BaseMergeTask {
 
   @Override
   public void run() {
-    List<CommittedChangeList> lists = myInteraction
-      .showRecentListsForSelection(myInitialChangeListsLoader.getCommittedChangeLists(), myInitialChangeListsLoader.getHelper(),
-                                   myInitialChangeListsLoader.isLastLoaded());
+    SelectMergeItemsResult result = myInteraction
+      .selectMergeItems(myInitialChangeListsLoader.getCommittedChangeLists(), myInitialChangeListsLoader.getHelper(), false,
+                        myInitialChangeListsLoader.isLastLoaded());
+    List<CommittedChangeList> lists = result.getSelectedLists();
 
     if (!lists.isEmpty()) {
       runChangeListsMerge(lists, myMergeContext.getTitle());
index 46fa7b3f399715a11d8a2b6847669e6faf1ab1c7..134acc72c1d489b6dc3b3f22101365b46c731557 100644 (file)
@@ -38,7 +38,7 @@ public class ShowRevisionSelector extends BaseMergeTask {
 
   @Override
   public void run() {
-    SelectMergeItemsResult result = myInteraction.selectMergeItems(myChangeLists, myMergeContext.getTitle(), myMergeChecker);
+    SelectMergeItemsResult result = myInteraction.selectMergeItems(myChangeLists, myMergeChecker, true, true);
 
     switch (result.getResultCode()) {
       case cancel:
index 9be5cdffd1cf937b456858599cbbfd0daa1d7152..70f72508301abbffb6a0672c1e3434a937cd3835 100644 (file)
@@ -69,22 +69,15 @@ public class QuickMergeTestInteraction implements QuickMergeInteraction {
   @NotNull
   @Override
   public SelectMergeItemsResult selectMergeItems(@NotNull List<CommittedChangeList> lists,
-                                                 @NotNull String mergeTitle,
-                                                 @NotNull MergeChecker mergeChecker) {
+                                                 @NotNull MergeChecker mergeChecker,
+                                                 boolean allStatusesCalculated,
+                                                 boolean allListsLoaded) {
     return new SelectMergeItemsResult(
       mySelectedListsProvider != null ? QuickMergeContentsVariants.select : QuickMergeContentsVariants.all,
       mySelectedListsProvider != null ? mySelectedListsProvider.fun(lists) : emptyList()
     );
   }
 
-  @NotNull
-  @Override
-  public List<CommittedChangeList> showRecentListsForSelection(@NotNull List<CommittedChangeList> list,
-                                                               @NotNull MergeChecker mergeChecker,
-                                                               boolean allListsLoaded) {
-    return mySelectedListsProvider != null ? mySelectedListsProvider.fun(list) : emptyList();
-  }
-
   @NotNull
   @Override
   public LocalChangesAction selectLocalChangesAction(boolean mergeAll) {