Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java5
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties3
3 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index aae59d3e5..ce86a6c82 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -4707,8 +4707,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
title= EditorMessages.Editor_error_activated_outofsync_title;
msg= NLSUtility.format(EditorMessages.Editor_error_activated_outofsync_message, inputName);
- if (MessageDialog.openQuestion(shell, title, msg)) {
-
+ if (MessageDialog.open(MessageDialog.QUESTION, shell, title, msg, SWT.NONE,
+ new String[] { EditorMessages.Editor_error_replace_button_label,
+ EditorMessages.Editor_error_dontreplace_button_label }) == 0) {
try {
if (provider instanceof IDocumentProviderExtension) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
index f838ac1af..d355d95d7 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
@@ -52,6 +52,8 @@ final class EditorMessages extends NLS {
public static String Editor_error_save_outofsync_message;
public static String Editor_error_activated_outofsync_title;
public static String Editor_error_activated_outofsync_message;
+ public static String Editor_error_replace_button_label;
+ public static String Editor_error_dontreplace_button_label;
public static String Editor_error_activated_deleted_save_title;
public static String Editor_error_activated_deleted_save_message;
public static String Editor_error_activated_deleted_save_button_save;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
index 75d358a01..908aed6df 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
@@ -31,6 +31,9 @@ Editor_error_save_outofsync_message=The file ''{0}'' has been changed on the fil
Editor_error_activated_outofsync_title=File Changed
Editor_error_activated_outofsync_message=The file ''{0}'' has been changed on the file system. Do you want to replace the editor contents with these changes?
+Editor_error_replace_button_label=&Replace
+Editor_error_dontreplace_button_label=&Do not replace
+
Editor_error_activated_deleted_save_title=File Not Accessible
Editor_error_activated_deleted_save_message=The file ''{0}'' has been deleted or is not accessible. Do you want to save your changes or close the editor without saving?
Editor_error_activated_deleted_save_button_save=Save

Back to the top