IDEA-327951 diff: improve window title for "Compare with Editor"

GitOrigin-RevId: c1133cb657bb5f10b7632bbe10f277d3b3216e43
This commit is contained in:
Aleksey Pivovarov
2023-08-09 16:42:46 +02:00
committed by intellij-monorepo-bot
parent 35a0e99d03
commit b5c5a4c7b3
2 changed files with 5 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ rollback.change.command.name=Rollback Change
diff.content.editor.content.title=Editor
diff.content.clipboard.content.title=From clipboard
diff.clipboard.vs.editor.dialog.title=Clipboard vs Editor
diff.clipboard.vs.editor.dialog.title.with.filename=Clipboard vs {0}
diff.content.selection.from.file.content.title=Selection from {0}
diff.files.count.files.in.text=in {0}

View File

@@ -105,7 +105,10 @@ public class CompareClipboardWithSelectionAction extends BaseShowDiffAction {
}
MutableDiffRequestChain chain = BlankDiffWindowUtil.createBlankDiffRequestChain(content1, content2, null);
chain.setWindowTitle(DiffBundle.message("diff.clipboard.vs.editor.dialog.title"));
String windowTitle = editorFile != null ? DiffBundle.message("diff.clipboard.vs.editor.dialog.title.with.filename",
editorFile.getName())
: DiffBundle.message("diff.clipboard.vs.editor.dialog.title");
chain.setWindowTitle(windowTitle);
chain.setTitle1(DiffBundle.message("diff.content.clipboard.content.title"));
chain.setTitle2(editorContentTitle);