[git] Better dialog title for dir diff
authorKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Thu, 26 Jul 2012 15:58:27 +0000 (19:58 +0400)
committerKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Thu, 26 Jul 2012 16:07:15 +0000 (20:07 +0400)
plugins/git4idea/src/git4idea/history/GitDiffFromHistoryHandler.java

index 25992ef252d8607f7de46adb81fb5583e4fa0e85..41be21de42ea43e803475139a402fe0953fbb38f 100644 (file)
@@ -32,10 +32,7 @@ import com.intellij.openapi.vcs.FilePath;
 import com.intellij.openapi.vcs.VcsException;
 import com.intellij.openapi.vcs.changes.Change;
 import com.intellij.openapi.vcs.changes.ui.ChangesBrowser;
-import com.intellij.openapi.vcs.history.CurrentRevision;
-import com.intellij.openapi.vcs.history.DiffFromHistoryHandler;
-import com.intellij.openapi.vcs.history.VcsFileRevision;
-import com.intellij.openapi.vcs.history.VcsHistoryUtil;
+import com.intellij.openapi.vcs.history.*;
 import com.intellij.openapi.vcs.ui.VcsBalloonProblemNotifier;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.ui.awt.RelativePoint;
@@ -163,10 +160,10 @@ class GitDiffFromHistoryHandler implements DiffFromHistoryHandler {
     DialogBuilder dialogBuilder = new DialogBuilder(myProject);
     String title;
     if (hash2 != null) {
-      title = String.format("%s diff in %s..%s", path.getName(), GitUtil.getShortHash(hash1), GitUtil.getShortHash(hash2));
+      title = String.format("Difference between %s and %s in %s", GitUtil.getShortHash(hash1), GitUtil.getShortHash(hash2), path.getName());
     }
     else {
-      title = String.format("%s diff from %s", path.getName(), GitUtil.getShortHash(hash1));
+      title = String.format("Difference between %s and local version in %s", GitUtil.getShortHash(hash1), path.getName());
     }
     dialogBuilder.setTitle(title);
     dialogBuilder.setActionDescriptors(new DialogBuilder.ActionDescriptor[] { new DialogBuilder.CloseDialogAction()});