Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-01-25 06:44:12 -0500
committerAndre Weinand2002-01-25 06:44:12 -0500
commit05864ccf18ec80a817b279606d9085c8c0091d0f (patch)
tree5f97736378e81053f4add6245d4715a3b643ae1f /bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer
parent339c579161e8541c1f4f117a3f92698c463ccdbc (diff)
downloadeclipse.platform.team-05864ccf18ec80a817b279606d9085c8c0091d0f.tar.gz
eclipse.platform.team-05864ccf18ec80a817b279606d9085c8c0091d0f.tar.xz
eclipse.platform.team-05864ccf18ec80a817b279606d9085c8c0091d0f.zip
#6271, #2519, #8363, #2501
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java11
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties6
2 files changed, 12 insertions, 5 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
index 6b0405b15..1d715916a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
@@ -144,6 +144,7 @@ public class DiffTreeViewer extends TreeViewer {
private Action fCopyRightToLeftAction;
private Action fNextAction;
private Action fPreviousAction;
+ private Action fEmptyMenuAction;
/**
* Creates a new viewer for the given SWT tree control with the specified configuration.
@@ -246,6 +247,14 @@ public class DiffTreeViewer extends TreeViewer {
new IMenuListener() {
public void menuAboutToShow(IMenuManager mm) {
fillContextMenu(mm);
+ if (mm.isEmpty()) {
+ if (fEmptyMenuAction == null) {
+ fEmptyMenuAction=
+ new Action(Utilities.getString(fBundle, "emptyMenuItem")) {}; //$NON-NLS-1$
+ fEmptyMenuAction.setEnabled(false);
+ }
+ mm.add(fEmptyMenuAction);
+ }
}
}
);
@@ -361,7 +370,7 @@ public class DiffTreeViewer extends TreeViewer {
// };
// Utilities.initAction(fCopyLeftToRightAction, fBundle, "action.TakeLeft.");
// toolbarManager.appendToGroup("merge", fCopyLeftToRightAction);
-//
+
// fCopyRightToLeftAction= new Action() {
// public void run() {
// copySelected(false);
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
index 5c6c17952..9a91be426 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
@@ -11,12 +11,10 @@ title= Structure Compare
defaultLabel= <no name>
#####################################################
-# Status messages
+# Dummy menu item for empty context menu
#####################################################
-#####################################################
-# Dialogs
-#####################################################
+emptyMenuItem= <Empty Menu>
#####################################################
# Actions

Back to the top