Skip to content

Commit de880f8

Browse files
committed
Improve Compare With Clipboard Editor title
This commit improves compare with clipboard's editor title similar to other editor compare titles.
1 parent 61d50fa commit de880f8

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ClipboardCompare.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2025 IBM Corporation and others.
2+
* Copyright (c) 2025, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -32,6 +32,7 @@
3232
import org.eclipse.jface.dialogs.MessageDialog;
3333
import org.eclipse.jface.text.ITextSelection;
3434
import org.eclipse.jface.viewers.ISelection;
35+
import org.eclipse.osgi.util.NLS;
3536
import org.eclipse.swt.dnd.Clipboard;
3637
import org.eclipse.swt.dnd.TextTransfer;
3738
import org.eclipse.swt.graphics.Image;
@@ -178,6 +179,7 @@ protected Object prepareInput(IProgressMonitor monitor)
178179

179180
}
180181
};
182+
compareInput.setTitle(NLS.bind(CompareMessages.CompareWithClipboardTitle, fileName));
181183
CompareUI.openCompareEditor(compareInput);
182184
}
183185

team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2015 IBM Corporation and others.
2+
* Copyright (c) 2000, 2026 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -132,6 +132,7 @@ private CompareMessages() {
132132
public static String CompareStructureViewerSwitchingPane_discoveredLabel;
133133

134134
public static String ReaderCreator_fileIsNotAccessible;
135+
public static String CompareWithClipboardTitle;
135136

136137
static {
137138
NLS.initializeMessages(BUNDLE_NAME, CompareMessages.class);

team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###############################################################################
2-
# Copyright (c) 2000, 2019 IBM Corporation and others.
2+
# Copyright (c) 2000, 2026 IBM Corporation and others.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the Eclipse Public License 2.0
@@ -146,3 +146,5 @@ CompareStructureViewerSwitchingPane_switchButtonTooltip=Switch Structure Compare
146146
CompareStructureViewerSwitchingPane_discoveredLabel={0} Structure Compare
147147

148148
ReaderCreator_fileIsNotAccessible=Cannot create a reader because the file is inaccessible.
149+
150+
CompareWithClipboardTitle=Compare {0} and Clipboard

0 commit comments

Comments
 (0)