Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2005-04-14 13:54:17 +0000
committerAndre Weinand2005-04-14 13:54:17 +0000
commit956132aae4be44174e1940a21835846f7da05ffe (patch)
tree7fc063bf9f32263ec3ff786736744fcbf57bffff /bundles/org.eclipse.compare/plugins
parent5b3202cb6de595fbaa6aa637bc9bb8626569b690 (diff)
downloadeclipse.platform.team-956132aae4be44174e1940a21835846f7da05ffe.tar.gz
eclipse.platform.team-956132aae4be44174e1940a21835846f7da05ffe.tar.xz
eclipse.platform.team-956132aae4be44174e1940a21835846f7da05ffe.zip
converted to new NLS schemev20050419
Diffstat (limited to 'bundles/org.eclipse.compare/plugins')
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html9
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java2
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java8
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java38
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java50
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties56
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java2
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java2
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Messages.java33
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java28
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties8
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java8
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java12
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java50
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java74
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties100
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java8
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java4
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java36
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java4
20 files changed, 318 insertions, 214 deletions
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index 0eea060b5..30ad35401 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -12,6 +12,15 @@
Eclipse Platform Build Notes<br>
Compare</h1>
+Eclipse Build Input April 19th 2005
+
+<h2>Problem reports fixed</h2>
+Converted Compare plug-in folder to jar<br>
+Converted to new NLS scheme<br>
+
+
+<h1><hr WIDTH="100%"></h1>
+
Eclipse Build Input April 12th 2005
<h2>Problem reports fixed</h2>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
index 67e8d1716..8b35834c8 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
@@ -334,7 +334,7 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
private void updateTitle() {
if (fTitle != null) {
if (fTitleArgument != null) {
- String format= CompareMessages.getString("CompareViewerSwitchingPane.Titleformat"); //$NON-NLS-1$
+ String format= CompareMessages.CompareViewerSwitchingPane_Titleformat;
String t= MessageFormat.format(format, new String[] { fTitle, fTitleArgument } );
setText(t);
} else
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
index 99da07fd7..6bf001b65 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
@@ -71,11 +71,11 @@ public class NavigationAction extends Action {
String title;
String message;
if (fNext) {
- title= CompareMessages.getString("CompareNavigator.atEnd.title"); //$NON-NLS-1$
- message= CompareMessages.getString("CompareNavigator.atEnd.message"); //$NON-NLS-1$
+ title= CompareMessages.CompareNavigator_atEnd_title;
+ message= CompareMessages.CompareNavigator_atEnd_message;
} else {
- title= CompareMessages.getString("CompareNavigator.atBeginning.title"); //$NON-NLS-1$
- message= CompareMessages.getString("CompareNavigator.atBeginning.message"); //$NON-NLS-1$
+ title= CompareMessages.CompareNavigator_atBeginning_title;
+ message= CompareMessages.CompareNavigator_atBeginning_message;
}
MessageDialog.openInformation(shell, title, message);
}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index 590981777..84c121b95 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -446,16 +446,16 @@ public class TextMergeViewer extends ContentMergeViewer {
if (fDirection == RangeDifference.LEFT) {
if (!leftEmpty && rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.addition"); //$NON-NLS-1$
+ return CompareMessages.TextMergeViewer_changeType_addition;
if (leftEmpty && !rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.deletion"); //$NON-NLS-1$
+ return CompareMessages.TextMergeViewer_changeType_deletion;
} else {
if (leftEmpty && !rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.addition"); //$NON-NLS-1$
+ return CompareMessages.TextMergeViewer_changeType_addition;
if (!leftEmpty && rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.deletion"); //$NON-NLS-1$
+ return CompareMessages.TextMergeViewer_changeType_deletion;
}
- return CompareMessages.getString("TextMergeViewer.changeType.change"); //$NON-NLS-1$
+ return CompareMessages.TextMergeViewer_changeType_change;
}
Image getImage() {
@@ -2853,13 +2853,13 @@ public class TextMergeViewer extends ContentMergeViewer {
String diffDescription;
if (diff == null) {
- diffDescription= CompareMessages.getString("TextMergeViewer.diffDescription.noDiff.format"); //$NON-NLS-1$
+ diffDescription= CompareMessages.TextMergeViewer_diffDescription_noDiff_format;
} else {
if (diff.fIsToken) // we don't show special info for token diffs
diff= diff.fParent;
- String format= CompareMessages.getString("TextMergeViewer.diffDescription.diff.format"); //$NON-NLS-1$
+ String format= CompareMessages.TextMergeViewer_diffDescription_diff_format;
diffDescription= MessageFormat.format(format,
new String[] {
getDiffType(diff), // 0: diff type
@@ -2870,7 +2870,7 @@ public class TextMergeViewer extends ContentMergeViewer {
);
}
- String format= CompareMessages.getString("TextMergeViewer.statusLine.format"); //$NON-NLS-1$
+ String format= CompareMessages.TextMergeViewer_statusLine_format;
String s= MessageFormat.format(format,
new String[] {
getCursorPosition(fLeft), // 0: left column
@@ -2898,16 +2898,16 @@ public class TextMergeViewer extends ContentMergeViewer {
String s= ""; //$NON-NLS-1$
switch(diff.fDirection) {
case RangeDifference.LEFT:
- s= CompareMessages.getString("TextMergeViewer.direction.outgoing"); //$NON-NLS-1$
+ s= CompareMessages.TextMergeViewer_direction_outgoing;
break;
case RangeDifference.RIGHT:
- s= CompareMessages.getString("TextMergeViewer.direction.incoming"); //$NON-NLS-1$
+ s= CompareMessages.TextMergeViewer_direction_incoming;
break;
case RangeDifference.CONFLICT:
- s= CompareMessages.getString("TextMergeViewer.direction.conflicting"); //$NON-NLS-1$
+ s= CompareMessages.TextMergeViewer_direction_conflicting;
break;
}
- String format= CompareMessages.getString("TextMergeViewer.diffType.format"); //$NON-NLS-1$
+ String format= CompareMessages.TextMergeViewer_diffType_format;
return MessageFormat.format(format, new String[] { s, diff.changeType() } );
}
@@ -2933,9 +2933,9 @@ public class TextMergeViewer extends ContentMergeViewer {
String format;
if (endLine < startLine)
- format= CompareMessages.getString("TextMergeViewer.beforeLine.format"); //$NON-NLS-1$
+ format= CompareMessages.TextMergeViewer_beforeLine_format;
else
- format= CompareMessages.getString("TextMergeViewer.range.format"); //$NON-NLS-1$
+ format= CompareMessages.TextMergeViewer_range_format;
return MessageFormat.format(format,
new String[] { Integer.toString(startLine),
Integer.toString(endLine) } );
@@ -2968,7 +2968,7 @@ public class TextMergeViewer extends ContentMergeViewer {
int tabWidth= styledText.getTabs();
int column= caret - lineOffset + (tabWidth -1) * occurrences;
- String format= CompareMessages.getString("TextMergeViewer.cursorPosition.format"); //$NON-NLS-1$
+ String format= CompareMessages.TextMergeViewer_cursorPosition_format;
return MessageFormat.format(format,
new String[] { Integer.toString(line + 1), Integer.toString(column + 1) } );
@@ -3680,11 +3680,11 @@ public class TextMergeViewer extends ContentMergeViewer {
if (down)
return MessageDialog.openQuestion(c.getShell(),
- CompareMessages.getString("TextMergeViewer.atEnd.title"), //$NON-NLS-1$
- CompareMessages.getString("TextMergeViewer.atEnd.message")); //$NON-NLS-1$
+ CompareMessages.TextMergeViewer_atEnd_title,
+ CompareMessages.TextMergeViewer_atEnd_message);
return MessageDialog.openQuestion(c.getShell(),
- CompareMessages.getString("TextMergeViewer.atBeginning.title"), //$NON-NLS-1$
- CompareMessages.getString("TextMergeViewer.atBeginning.message")); //$NON-NLS-1$
+ CompareMessages.TextMergeViewer_atBeginning_title,
+ CompareMessages.TextMergeViewer_atBeginning_message);
}
return false;
}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
index 3711b4d0f..c1be51c61 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,24 +10,44 @@
*******************************************************************************/
package org.eclipse.compare.internal;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-public class CompareMessages {
+public final class CompareMessages extends NLS {
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.CompareMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ private static final String BUNDLE_NAME = "org.eclipse.compare.internal.CompareMessages";//$NON-NLS-1$
private CompareMessages() {
- // nothing to do
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
+ public static String ComparePlugin_internal_error;
+ public static String ExceptionDialog_seeErrorLogMessage;
+ public static String CompareViewerSwitchingPane_Titleformat;
+ public static String StructureDiffViewer_NoStructuralDifferences;
+ public static String StructureDiffViewer_StructureError;
+ public static String TextMergeViewer_cursorPosition_format;
+ public static String TextMergeViewer_beforeLine_format;
+ public static String TextMergeViewer_range_format;
+ public static String TextMergeViewer_changeType_addition;
+ public static String TextMergeViewer_changeType_deletion;
+ public static String TextMergeViewer_changeType_change;
+ public static String TextMergeViewer_direction_outgoing;
+ public static String TextMergeViewer_direction_incoming;
+ public static String TextMergeViewer_direction_conflicting;
+ public static String TextMergeViewer_diffType_format;
+ public static String TextMergeViewer_diffDescription_noDiff_format;
+ public static String TextMergeViewer_diffDescription_diff_format;
+ public static String TextMergeViewer_statusLine_format;
+ public static String TextMergeViewer_atEnd_title;
+ public static String TextMergeViewer_atEnd_message;
+ public static String TextMergeViewer_atBeginning_title;
+ public static String TextMergeViewer_atBeginning_message;
+ public static String CompareNavigator_atEnd_title;
+ public static String CompareNavigator_atEnd_message;
+ public static String CompareNavigator_atBeginning_title;
+ public static String CompareNavigator_atBeginning_message;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, CompareMessages.class);
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
index bf308bfd6..6aeefccd9 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
@@ -9,50 +9,50 @@
# IBM Corporation - initial API and implementation
###############################################################################
-ComparePlugin.internal_error= Internal Error
-ExceptionDialog.seeErrorLogMessage= See error log for details.
+ComparePlugin_internal_error= Internal Error
+ExceptionDialog_seeErrorLogMessage= See error log for details.
#
# Title format for CompareViewerSwitchingPane
#
-CompareViewerSwitchingPane.Titleformat= {0} ({1})
+CompareViewerSwitchingPane_Titleformat= {0} ({1})
#
# Title message for StructureDiffViewer if no structural differences could be found
#
-StructureDiffViewer.NoStructuralDifferences= No Structural Differences
-StructureDiffViewer.StructureError= Cannot Compare Structures
+StructureDiffViewer_NoStructuralDifferences= No Structural Differences
+StructureDiffViewer_StructureError= Cannot Compare Structures
#
# TextMergeViewer
#
-TextMergeViewer.cursorPosition.format= {0} : {1}
+TextMergeViewer_cursorPosition_format= {0} : {1}
-TextMergeViewer.beforeLine.format= before line {0}
-TextMergeViewer.range.format= {0} : {1}
+TextMergeViewer_beforeLine_format= before line {0}
+TextMergeViewer_range_format= {0} : {1}
-TextMergeViewer.changeType.addition= addition
-TextMergeViewer.changeType.deletion= deletion
-TextMergeViewer.changeType.change= change
+TextMergeViewer_changeType_addition= addition
+TextMergeViewer_changeType_deletion= deletion
+TextMergeViewer_changeType_change= change
-TextMergeViewer.direction.outgoing= outgoing
-TextMergeViewer.direction.incoming= incoming
-TextMergeViewer.direction.conflicting= conflicting
+TextMergeViewer_direction_outgoing= outgoing
+TextMergeViewer_direction_incoming= incoming
+TextMergeViewer_direction_conflicting= conflicting
-TextMergeViewer.diffType.format= {0} {1}
+TextMergeViewer_diffType_format= {0} {1}
-TextMergeViewer.diffDescription.noDiff.format= no diff
-TextMergeViewer.diffDescription.diff.format= {0} #{1} (Left: {2}, Right: {3})
-TextMergeViewer.statusLine.format= Left: {0}, Right: {1}, {2}
+TextMergeViewer_diffDescription_noDiff_format= no diff
+TextMergeViewer_diffDescription_diff_format= {0} #{1} (Left: {2}, Right: {3})
+TextMergeViewer_statusLine_format= Left: {0}, Right: {1}, {2}
-TextMergeViewer.atEnd.title= Go to Next Difference
-TextMergeViewer.atEnd.message= End of document reached. Continue from beginning?
-
-TextMergeViewer.atBeginning.title= Go to Previous Difference
-TextMergeViewer.atBeginning.message= Beginning of document reached. Continue from end?
+TextMergeViewer_atEnd_title= Go to Next Difference
+TextMergeViewer_atEnd_message= End of document reached. Continue from beginning?
-CompareNavigator.atEnd.title= Go to Next Difference
-CompareNavigator.atEnd.message= Last difference reached.
-
-CompareNavigator.atBeginning.title= Go to Previous Difference
-CompareNavigator.atBeginning.message= First difference reached.
+TextMergeViewer_atBeginning_title= Go to Previous Difference
+TextMergeViewer_atBeginning_message= Beginning of document reached. Continue from end?
+
+CompareNavigator_atEnd_title= Go to Next Difference
+CompareNavigator_atEnd_message= Last difference reached.
+
+CompareNavigator_atBeginning_title= Go to Previous Difference
+CompareNavigator_atBeginning_message= First difference reached.
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
index 4f2bbdd0f..22dec06f3 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
@@ -1146,7 +1146,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
}
public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, getPluginId(), INTERNAL_ERROR, CompareMessages.getString("ComparePlugin.internal_error"), e)); //$NON-NLS-1$
+ log(new Status(IStatus.ERROR, getPluginId(), INTERNAL_ERROR, CompareMessages.ComparePlugin_internal_error, e));
}
public static void log(IStatus status) {
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
index 1ac8746dc..8e12c2275 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
@@ -125,7 +125,7 @@ public class ExceptionHandler {
msg.write("\n\n"); //$NON-NLS-1$
}
if (exceptionMessage == null || exceptionMessage.length() == 0)
- msg.write(CompareMessages.getString("ExceptionDialog.seeErrorLogMessage")); //$NON-NLS-1$
+ msg.write(CompareMessages.ExceptionDialog_seeErrorLogMessage);
else
msg.write(exceptionMessage);
MessageDialog.openError(shell, title, msg.toString());
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Messages.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Messages.java
new file mode 100644
index 000000000..96403a7d0
--- /dev/null
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Messages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.compare.internal;
+
+import java.text.MessageFormat;
+
+/**
+ * Helper class to format message strings.
+ *
+ * @since 3.1
+ */
+public class Messages {
+
+ public static String format(String message, Object object) {
+ return MessageFormat.format(message, new Object[] { object});
+ }
+
+ public static String format(String message, Object[] objects) {
+ return MessageFormat.format(message, objects);
+ }
+
+ private Messages() {
+ // Not for instantiation
+ }
+}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java
index 408cbf950..f3fa54dea 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,24 +10,22 @@
*******************************************************************************/
package org.eclipse.compare.internal.merge;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-class MergeMessages {
+public final class MergeMessages extends NLS {
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.merge.MergeMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ private static final String BUNDLE_NAME = "org.eclipse.compare.internal.merge.MergeMessages";//$NON-NLS-1$
private MergeMessages() {
- // nothing to do
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
+ public static String TextAutoMerge_inputEncodingError;
+ public static String TextAutoMerge_outputEncodingError;
+ public static String TextAutoMerge_outputIOError;
+ public static String TextAutoMerge_conflict;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, MergeMessages.class);
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties
index a5113cc8a..256e1fb0e 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties
@@ -9,7 +9,7 @@
# IBM Corporation - initial API and implementation
###############################################################################
-TextAutoMerge.inputEncodingError= Unsupported encoding for input streams
-TextAutoMerge.outputEncodingError= Unsupported encoding for output streams
-TextAutoMerge.outputIOError= IO error on writing
-TextAutoMerge.conflict= Conflict: cannot auto merge
+TextAutoMerge_inputEncodingError= Unsupported encoding for input streams
+TextAutoMerge_outputEncodingError= Unsupported encoding for output streams
+TextAutoMerge_outputIOError= IO error on writing
+TextAutoMerge_conflict= Conflict: cannot auto merge
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java
index 96c505c05..adacc6889 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java
@@ -49,7 +49,7 @@ public class TextStreamMerger implements IStreamMerger {
t= new LineComparator(target, targetEncoding);
o= new LineComparator(other, otherEncoding);
} catch (UnsupportedEncodingException e) {
- return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 1, MergeMessages.getString("TextAutoMerge.inputEncodingError"), e); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 1, MergeMessages.TextAutoMerge_inputEncodingError, e);
}
try {
@@ -79,7 +79,7 @@ public class TextStreamMerger implements IStreamMerger {
break;
case RangeDifference.CONFLICT:
- return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, CONFLICT, MergeMessages.getString("TextAutoMerge.conflict"), null); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, CONFLICT, MergeMessages.TextAutoMerge_conflict, null);
default:
break;
@@ -87,9 +87,9 @@ public class TextStreamMerger implements IStreamMerger {
}
} catch (UnsupportedEncodingException e) {
- return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 1, MergeMessages.getString("TextAutoMerge.outputEncodingError"), e); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 1, MergeMessages.TextAutoMerge_outputEncodingError, e);
} catch (IOException e) {
- return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 1, MergeMessages.getString("TextAutoMerge.outputIOError"), e); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, 1, MergeMessages.TextAutoMerge_outputIOError, e);
}
return Status.OK_STATUS;
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
index 7ecc122da..d48c6dcd7 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
@@ -87,10 +87,10 @@ public class CompareWithPatchAction extends BaseCompareAction {
}
return true;
} catch (InvocationTargetException e) {
- ExceptionHandler.handle(e, shell, PatchMessages.getString("PatchAction.ExceptionTitle"), PatchMessages.getString("PatchAction.Exception")); //$NON-NLS-1$ //$NON-NLS-2$
+ ExceptionHandler.handle(e, shell, PatchMessages.PatchAction_ExceptionTitle, PatchMessages.PatchAction_Exception);
return false;
} catch (CoreException e) {
- ExceptionHandler.handle(e, shell, PatchMessages.getString("PatchAction.ExceptionTitle"), PatchMessages.getString("PatchAction.Exception")); //$NON-NLS-1$ //$NON-NLS-2$
+ ExceptionHandler.handle(e, shell, PatchMessages.PatchAction_ExceptionTitle, PatchMessages.PatchAction_Exception);
return false;
} catch (InterruptedException e) {
Assert.isTrue(false); // Can't happen. Operation isn't cancelable.
@@ -102,7 +102,7 @@ public class CompareWithPatchAction extends BaseCompareAction {
return new IRunnableWithProgress() {
public void run(IProgressMonitor pm) {
IEditorPart[] editorsToSave= CompareUIPlugin.getDirtyEditors();
- pm.beginTask(PatchMessages.getString("PatchAction.SavingDirtyEditorsTask"), editorsToSave.length); //$NON-NLS-1$
+ pm.beginTask(PatchMessages.PatchAction_SavingDirtyEditorsTask, editorsToSave.length);
for (int i= 0; i < editorsToSave.length; i++) {
editorsToSave[i].doSave(new SubProgressMonitor(pm, 1));
pm.worked(1);
@@ -119,7 +119,7 @@ public class CompareWithPatchAction extends BaseCompareAction {
protected Control createDialogArea(Composite parent) {
Composite result= (Composite) super.createDialogArea(parent);
final Button check= new Button(result, SWT.CHECK);
- check.setText(PatchMessages.getString("PatchAction.AlwaysSaveQuestion")); //$NON-NLS-1$
+ check.setText(PatchMessages.PatchAction_AlwaysSaveQuestion);
check.setSelection(ComparePreferencePage.getSaveAllEditors());
check.addSelectionListener(
new SelectionAdapter() {
@@ -132,10 +132,10 @@ public class CompareWithPatchAction extends BaseCompareAction {
return result;
}
};
- dialog.setTitle(PatchMessages.getString("PatchAction.SaveAllQuestion")); //$NON-NLS-1$
+ dialog.setTitle(PatchMessages.PatchAction_SaveAllQuestion);
dialog.setAddCancelButton(true);
dialog.setLabelProvider(createDialogLabelProvider());
- dialog.setMessage(PatchMessages.getString("PatchAction.SaveAllDescription")); //$NON-NLS-1$
+ dialog.setMessage(PatchMessages.PatchAction_SaveAllDescription);
dialog.setContentProvider(new ListContentProvider());
dialog.setInput(Arrays.asList(CompareUIPlugin.getDirtyEditors()));
return dialog.open() == Window.OK;
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
index 581f3ead3..9737291f8 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
@@ -59,9 +59,9 @@ import org.eclipse.core.runtime.*;
InputPatchPage(PatchWizard pw) {
- super("InputPatchPage", PatchMessages.getString("InputPatchPage.title"), null); //$NON-NLS-1$ //$NON-NLS-2$
+ super("InputPatchPage", PatchMessages.InputPatchPage_title, null);
fPatchWizard= pw;
- setMessage(PatchMessages.getString("InputPatchPage.message")); //$NON-NLS-1$
+ setMessage(PatchMessages.InputPatchPage_message);
}
/*
@@ -74,7 +74,7 @@ import org.eclipse.core.runtime.*;
/* package */ String getPatchName() {
if (getUseClipboard())
- return PatchMessages.getString("InputPatchPage.Clipboard"); //$NON-NLS-1$
+ return PatchMessages.InputPatchPage_Clipboard;
return getPatchFilePath();
}
@@ -86,7 +86,7 @@ import org.eclipse.core.runtime.*;
setControl(composite);
Label l= new Label(composite, SWT.NONE);
- l.setText(PatchMessages.getString("InputPatchPage.SelectInput")); //$NON-NLS-1$
+ l.setText(PatchMessages.InputPatchPage_SelectInput);
buildInputGroup(composite);
new Label(composite, SWT.NONE); // a spacer
@@ -120,7 +120,7 @@ import org.eclipse.core.runtime.*;
if (o instanceof String)
reader= new StringReader((String)o);
}
- source= PatchMessages.getString("InputPatchPage.Clipboard.title"); //$NON-NLS-1$
+ source= PatchMessages.InputPatchPage_Clipboard_title;
} else {
String patchFilePath= getPatchFilePath();
if (patchFilePath != null) {
@@ -128,11 +128,11 @@ import org.eclipse.core.runtime.*;
reader= new FileReader(patchFilePath);
} catch (FileNotFoundException ex) {
MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.PatchFileNotFound.message")); //$NON-NLS-1$
+ PatchMessages.InputPatchPage_PatchErrorDialog_title,
+ PatchMessages.InputPatchPage_PatchFileNotFound_message);
}
}
- source= PatchMessages.getString("InputPatchPage.PatchFile.title"); //$NON-NLS-1$
+ source= PatchMessages.InputPatchPage_PatchFile_title;
}
// parse the input
@@ -141,8 +141,8 @@ import org.eclipse.core.runtime.*;
patcher.parse(new BufferedReader(reader));
} catch (IOException ex) {
MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.ParseError.message")); //$NON-NLS-1$
+ PatchMessages.InputPatchPage_PatchErrorDialog_title,
+ PatchMessages.InputPatchPage_ParseError_message);
}
try {
@@ -154,10 +154,10 @@ import org.eclipse.core.runtime.*;
Diff[] diffs= patcher.getDiffs();
if (diffs == null || diffs.length == 0) {
- String format= PatchMessages.getString("InputPatchPage.NoDiffsFound.format"); //$NON-NLS-1$
+ String format= PatchMessages.InputPatchPage_NoDiffsFound_format;
String message= MessageFormat.format(format, new String[] { source });
MessageDialog.openInformation(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), message); //$NON-NLS-1$
+ PatchMessages.InputPatchPage_PatchErrorDialog_title, message);
return this;
}
@@ -165,10 +165,10 @@ import org.eclipse.core.runtime.*;
// contains only a patch for a single file
IResource target= fPatchWizard.getTarget();
if (target instanceof IFile && diffs.length > 1) {
- String format= PatchMessages.getString("InputPatchPage.SingleFileError.format"); //$NON-NLS-1$
+ String format= PatchMessages.InputPatchPage_SingleFileError_format;
String message= MessageFormat.format(format, new String[] { source });
MessageDialog.openInformation(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), message); //$NON-NLS-1$
+ PatchMessages.InputPatchPage_PatchErrorDialog_title, message);
return this;
}
@@ -199,7 +199,7 @@ import org.eclipse.core.runtime.*;
private void buildPatchFileGroup(Composite parent) {
fPatchFileGroup= new Group(parent, SWT.NONE);
- fPatchFileGroup.setText(PatchMessages.getString("InputPatchPage.SelectPatch.title")); //$NON-NLS-1$
+ fPatchFileGroup.setText(PatchMessages.InputPatchPage_SelectPatch_title);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
fPatchFileGroup.setLayout(layout);
@@ -207,7 +207,7 @@ import org.eclipse.core.runtime.*;
// 1st row
fUsePatchFileButton= new Button(fPatchFileGroup, SWT.RADIO);
- fUsePatchFileButton.setText(PatchMessages.getString("InputPatchPage.FileButton.text")); //$NON-NLS-1$
+ fUsePatchFileButton.setText(PatchMessages.InputPatchPage_FileButton_text);
fPatchFileNameField= new Combo(fPatchFileGroup, SWT.BORDER);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
@@ -216,12 +216,12 @@ import org.eclipse.core.runtime.*;
fPatchFileNameField.setLayoutData(gd);
fPatchFileBrowseButton= new Button(fPatchFileGroup, SWT.PUSH);
- fPatchFileBrowseButton.setText(PatchMessages.getString("InputPatchPage.ChooseFileButton.text")); //$NON-NLS-1$
+ fPatchFileBrowseButton.setText(PatchMessages.InputPatchPage_ChooseFileButton_text);
fPatchFileBrowseButton.setLayoutData(new GridData());
// 2nd row
fUseClipboardButton= new Button(fPatchFileGroup, SWT.RADIO);
- fUseClipboardButton.setText(PatchMessages.getString("InputPatchPage.UseClipboardButton.text")); //$NON-NLS-1$
+ fUseClipboardButton.setText(PatchMessages.InputPatchPage_UseClipboardButton_text);
gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd.horizontalSpan= 2;
fUseClipboardButton.setLayoutData(gd);
@@ -308,7 +308,7 @@ import org.eclipse.core.runtime.*;
ISelection selection= fPatchTargets.getSelection();
boolean anySelected= selection != null && !selection.isEmpty();
if (!anySelected)
- error= PatchMessages.getString("InputPatchPage.NothingSelected.message"); //$NON-NLS-1$
+ error= PatchMessages.InputPatchPage_NothingSelected_message;
boolean gotPatch= false;
if (getUseClipboard()) {
@@ -322,20 +322,20 @@ import org.eclipse.core.runtime.*;
if (s.length() > 0)
gotPatch= true;
else
- error= PatchMessages.getString("InputPatchPage.ClipboardIsEmpty.message"); //$NON-NLS-1$
+ error= PatchMessages.InputPatchPage_ClipboardIsEmpty_message;
} else
- error= PatchMessages.getString("InputPatchPage.NoTextInClipboard.message"); //$NON-NLS-1$
+ error= PatchMessages.InputPatchPage_NoTextInClipboard_message;
} else
- error= PatchMessages.getString("InputPatchPage.CouldNotReadClipboard.message"); //$NON-NLS-1$
+ error= PatchMessages.InputPatchPage_CouldNotReadClipboard_message;
} else {
String path= fPatchFileNameField.getText();
if (path != null && path.length() > 0) {
File file= new File(path);
gotPatch= file.exists() && file.isFile() && file.length() > 0;
if (!gotPatch)
- error= PatchMessages.getString("InputPatchPage.CannotLocatePatch.message") + path; //$NON-NLS-1$
+ error= PatchMessages.InputPatchPage_CannotLocatePatch_message + path;
} else {
- error= PatchMessages.getString("InputPatchPage.NoFileName.message"); //$NON-NLS-1$
+ error= PatchMessages.InputPatchPage_NoFileName_message;
}
}
@@ -346,7 +346,7 @@ import org.eclipse.core.runtime.*;
protected void handlePatchFileBrowseButtonPressed() {
FileDialog dialog= new FileDialog(getShell(), SWT.NONE);
- dialog.setText(PatchMessages.getString("InputPatchPage.SelectPatchFileDialog.title")); //$NON-NLS-1$
+ dialog.setText(PatchMessages.InputPatchPage_SelectPatchFileDialog_title);
String patchFilePath= getPatchFilePath();
if (patchFilePath != null) {
int lastSegment= patchFilePath.lastIndexOf(SEPARATOR);
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
index 747805a40..773dda80b 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,24 +10,68 @@
*******************************************************************************/
package org.eclipse.compare.internal.patch;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-public class PatchMessages {
+public final class PatchMessages extends NLS {
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.patch.PatchMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ private static final String BUNDLE_NAME = "org.eclipse.compare.internal.patch.PatchMessages";//$NON-NLS-1$
private PatchMessages() {
- // nothing to do
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
+ public static String PatchAction_ExceptionTitle;
+ public static String PatchAction_Exception;
+ public static String PatchAction_SavingDirtyEditorsTask;
+ public static String PatchAction_AlwaysSaveQuestion;
+ public static String PatchAction_SaveAllQuestion;
+ public static String PatchAction_SaveAllDescription;
+ public static String PatchWizard_title;
+ public static String PatchWizard_unexpectedException_message;
+ public static String InputPatchPage_title;
+ public static String InputPatchPage_message;
+ public static String InputPatchPage_Clipboard;
+ public static String InputPatchPage_SelectInput;
+ public static String InputPatchPage_PatchErrorDialog_title;
+ public static String InputPatchPage_SelectPatch_title;
+ public static String InputPatchPage_FileButton_text;
+ public static String InputPatchPage_ChooseFileButton_text;
+ public static String InputPatchPage_UseClipboardButton_text;
+ public static String InputPatchPage_NothingSelected_message;
+ public static String InputPatchPage_ClipboardIsEmpty_message;
+ public static String InputPatchPage_NoTextInClipboard_message;
+ public static String InputPatchPage_CouldNotReadClipboard_message;
+ public static String InputPatchPage_CannotLocatePatch_message;
+ public static String InputPatchPage_NoFileName_message;
+ public static String InputPatchPage_SelectPatchFileDialog_title;
+ public static String InputPatchPage_PatchFileNotFound_message;
+ public static String InputPatchPage_ParseError_message;
+ public static String InputPatchPage_Clipboard_title;
+ public static String InputPatchPage_PatchFile_title;
+ public static String InputPatchPage_NoDiffsFound_format;
+ public static String InputPatchPage_SingleFileError_format;
+ public static String PreviewPatchPage_title;
+ public static String PreviewPatchPage_message;
+ public static String PreviewPatchPage_Left_title;
+ public static String PreviewPatchPage_Right_title;
+ public static String PreviewPatchPage_PatchOptions_title;
+ public static String PreviewPatchPage_IgnoreSegments_text;
+ public static String PreviewPatchPage_ReversePatch_text;
+ public static String PreviewPatchPage_FuzzFactor_text;
+ public static String PreviewPatchPage_FuzzFactor_tooltip;
+ public static String PreviewPatchPage_IgnoreWhitespace_text;
+ public static String PreviewPatchPage_NoName_text;
+ public static String PreviewPatchPage_FileExists_error;
+ public static String PreviewPatchPage_FileDoesNotExist_error;
+ public static String PreviewPatchPage_NoMatch_error;
+ public static String PreviewPatchPage_FileIsReadOnly_error;
+ public static String PreviewPatchPage_GuessFuzz_text;
+ public static String PreviewPatchPage_GuessFuzzProgress_text;
+ public static String PreviewPatchPage_GuessFuzzProgress_format;
+ public static String Patcher_Marker_message;
+ public static String Patcher_Task_message;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, PatchMessages.class);
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
index 141682925..cd2d74205 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
@@ -12,70 +12,70 @@
#
# 'Compare with Patch' Action
#
-PatchAction.ExceptionTitle=Saving Resources
-PatchAction.Exception=Unexpected exception. See log for details
-PatchAction.SavingDirtyEditorsTask=Saving dirty editors
-PatchAction.AlwaysSaveQuestion=&Always save all modified resources automatically prior to patching
-PatchAction.SaveAllQuestion=Save all modified resources
-PatchAction.SaveAllDescription=All modified resources have to be saved before this operation.\nClick 'OK' to confirm or click 'Cancel'.
+PatchAction_ExceptionTitle=Saving Resources
+PatchAction_Exception=Unexpected exception. See log for details
+PatchAction_SavingDirtyEditorsTask=Saving dirty editors
+PatchAction_AlwaysSaveQuestion=&Always save all modified resources automatically prior to patching
+PatchAction_SaveAllQuestion=Save all modified resources
+PatchAction_SaveAllDescription=All modified resources have to be saved before this operation.\nClick 'OK' to confirm or click 'Cancel'.
#
# PatchWizard
#
-PatchWizard.title=Apply Patch
-PatchWizard.unexpectedException.message= Unexpected exception while applying the patch. See log for a detailed error description.
+PatchWizard_title=Apply Patch
+PatchWizard_unexpectedException_message= Unexpected exception while applying the patch. See log for a detailed error description.
#
# InputPatchPage
#
-InputPatchPage.title= Patch Input Specification
-InputPatchPage.message= Define the resource to patch and the patch to apply
-InputPatchPage.Clipboard=Clipboard
-InputPatchPage.SelectInput=Select a single file or folder to patch:
-InputPatchPage.PatchErrorDialog.title=Patch Error
-InputPatchPage.SelectPatch.title=Select Patch
-InputPatchPage.FileButton.text=Fil&e
-InputPatchPage.ChooseFileButton.text=&Browse...
-InputPatchPage.UseClipboardButton.text=&Clipboard
-InputPatchPage.NothingSelected.message=Select a file or folder to be patched
-InputPatchPage.ClipboardIsEmpty.message=Clipboard is empty
-InputPatchPage.NoTextInClipboard.message=Clipboard does not contain text
-InputPatchPage.CouldNotReadClipboard.message=Cannot retrieve clipboard contents
-InputPatchPage.CannotLocatePatch.message=Cannot locate patch file:
-InputPatchPage.NoFileName.message=No file name
+InputPatchPage_title= Patch Input Specification
+InputPatchPage_message= Define the resource to patch and the patch to apply
+InputPatchPage_Clipboard=Clipboard
+InputPatchPage_SelectInput=Select a single file or folder to patch:
+InputPatchPage_PatchErrorDialog_title=Patch Error
+InputPatchPage_SelectPatch_title=Select Patch
+InputPatchPage_FileButton_text=Fil&e
+InputPatchPage_ChooseFileButton_text=&Browse...
+InputPatchPage_UseClipboardButton_text=&Clipboard
+InputPatchPage_NothingSelected_message=Select a file or folder to be patched
+InputPatchPage_ClipboardIsEmpty_message=Clipboard is empty
+InputPatchPage_NoTextInClipboard_message=Clipboard does not contain text
+InputPatchPage_CouldNotReadClipboard_message=Cannot retrieve clipboard contents
+InputPatchPage_CannotLocatePatch_message=Cannot locate patch file:
+InputPatchPage_NoFileName_message=No file name
#SI - Select file name ?
-InputPatchPage.SelectPatchFileDialog.title=Select Patch File
-InputPatchPage.PatchFileNotFound.message=Patch file not found.
-InputPatchPage.ParseError.message=Error while parsing patch
-InputPatchPage.Clipboard.title=Clipboard
-InputPatchPage.PatchFile.title=Patch file
-InputPatchPage.NoDiffsFound.format={0} does not contain valid patch.
-InputPatchPage.SingleFileError.format={0} contains multiple patches. You cannot apply them to a single file.
+InputPatchPage_SelectPatchFileDialog_title=Select Patch File
+InputPatchPage_PatchFileNotFound_message=Patch file not found.
+InputPatchPage_ParseError_message=Error while parsing patch
+InputPatchPage_Clipboard_title=Clipboard
+InputPatchPage_PatchFile_title=Patch file
+InputPatchPage_NoDiffsFound_format={0} does not contain valid patch.
+InputPatchPage_SingleFileError_format={0} contains multiple patches. You cannot apply them to a single file.
#
# PreviewPatchPage
#
-PreviewPatchPage.title= Verify Patch
-PreviewPatchPage.message= The tree shows the contents of the patch.\nA checked item indicates that a patch can be applied successfully. To remove an item, clear its checkbox.
-PreviewPatchPage.Left.title= Original
-PreviewPatchPage.Right.title= Result
-PreviewPatchPage.PatchOptions.title=Patch Options
-PreviewPatchPage.IgnoreSegments.text=&Ignore leading path name segments:
-PreviewPatchPage.ReversePatch.text=&Reverse patch
-PreviewPatchPage.FuzzFactor.text=&Maximum fuzz factor:
-PreviewPatchPage.FuzzFactor.tooltip=Allow Context to Shift This Number of Lines from the Original Location
-PreviewPatchPage.IgnoreWhitespace.text=Ignore &white space
-PreviewPatchPage.NoName.text=no name
-PreviewPatchPage.FileExists.error=(file already exists)
-PreviewPatchPage.FileDoesNotExist.error=(file does not exist)
-PreviewPatchPage.NoMatch.error=(no match)
-PreviewPatchPage.FileIsReadOnly.error=(file is read-only)
-PreviewPatchPage.GuessFuzz.text= &Guess
-PreviewPatchPage.GuessFuzzProgress.text= Guessing Fuzz Factor...
-PreviewPatchPage.GuessFuzzProgress.format= {0} (hunk #{1})
+PreviewPatchPage_title= Verify Patch
+PreviewPatchPage_message= The tree shows the contents of the patch.\nA checked item indicates that a patch can be applied successfully. To remove an item, clear its checkbox.
+PreviewPatchPage_Left_title= Original
+PreviewPatchPage_Right_title= Result
+PreviewPatchPage_PatchOptions_title=Patch Options
+PreviewPatchPage_IgnoreSegments_text=&Ignore leading path name segments:
+PreviewPatchPage_ReversePatch_text=&Reverse patch
+PreviewPatchPage_FuzzFactor_text=&Maximum fuzz factor:
+PreviewPatchPage_FuzzFactor_tooltip=Allow Context to Shift This Number of Lines from the Original Location
+PreviewPatchPage_IgnoreWhitespace_text=Ignore &white space
+PreviewPatchPage_NoName_text=no name
+PreviewPatchPage_FileExists_error=(file already exists)
+PreviewPatchPage_FileDoesNotExist_error=(file does not exist)
+PreviewPatchPage_NoMatch_error=(no match)
+PreviewPatchPage_FileIsReadOnly_error=(file is read-only)
+PreviewPatchPage_GuessFuzz_text= &Guess
+PreviewPatchPage_GuessFuzzProgress_text= Guessing Fuzz Factor...
+PreviewPatchPage_GuessFuzzProgress_format= {0} (hunk #{1})
#
# Patcher
#
-Patcher.Marker.message=Rejected patch
-Patcher.Task.message=Patching
+Patcher_Marker_message=Rejected patch
+Patcher_Task_message=Patching
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
index 063a981aa..8d0640a8b 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
@@ -44,7 +44,7 @@ import org.eclipse.compare.internal.*;
/* package */ PatchWizard(ISelection selection) {
setDefaultPageImageDescriptor(CompareUIPlugin.getImageDescriptor("wizban/applypatch_wizban.gif")); //$NON-NLS-1$
- setWindowTitle(PatchMessages.getString("PatchWizard.title")); //$NON-NLS-1$
+ setWindowTitle(PatchMessages.PatchWizard_title);
setTargets(Utilities.getResources(selection));
@@ -101,7 +101,7 @@ import org.eclipse.compare.internal.*;
WorkspaceModifyOperation op= new WorkspaceModifyOperation(fTarget.getProject()) {
protected void execute(IProgressMonitor monitor) throws InvocationTargetException {
try {
- fPatcher.applyAll(getTarget(), monitor, getShell(), PatchMessages.getString("PatchWizard.title")); //$NON-NLS-1$
+ fPatcher.applyAll(getTarget(), monitor, getShell(), PatchMessages.PatchWizard_title);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
@@ -111,8 +111,8 @@ import org.eclipse.compare.internal.*;
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e,
- PatchMessages.getString("PatchWizard.title"), //$NON-NLS-1$
- PatchMessages.getString("PatchWizard.unexpectedException.message")); //$NON-NLS-1$
+ PatchMessages.PatchWizard_title,
+ PatchMessages.PatchWizard_unexpectedException_message);
} catch (InterruptedException e) {
// cannot happen
// NeedWork: use assert!
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index 048d2e3e8..b82803418 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -775,7 +775,7 @@ public class Patcher {
return;
if (pm != null) {
- String message= PatchMessages.getString("Patcher.Task.message"); //$NON-NLS-1$
+ String message= PatchMessages.Patcher_Task_message;
pm.beginTask(message, fDiffs.length*WORK_UNIT);
}
@@ -829,7 +829,7 @@ public class Patcher {
store(getRejected(failed), file, pm);
try {
IMarker marker= file.createMarker(MARKER_TYPE);
- marker.setAttribute(IMarker.MESSAGE, PatchMessages.getString("Patcher.Marker.message")); //$NON-NLS-1$
+ marker.setAttribute(IMarker.MESSAGE, PatchMessages.Patcher_Marker_message);
marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
} catch (CoreException ex) {
// NeedWork
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
index 515d5b274..222184700 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
@@ -65,7 +65,7 @@ import org.eclipse.compare.structuremergeviewer.*;
return null;
}
public String getName() {
- return PatchMessages.getString("PreviewPatchPage.NoName.text"); //$NON-NLS-1$
+ return PatchMessages.PreviewPatchPage_NoName_text;
}
public String getType() {
return fType;
@@ -93,9 +93,9 @@ import org.eclipse.compare.structuremergeviewer.*;
/* package */ PreviewPatchPage(PatchWizard pw) {
super("PreviewPatchPage", //$NON-NLS-1$
- PatchMessages.getString("PreviewPatchPage.title"), null); //$NON-NLS-1$
+ PatchMessages.PreviewPatchPage_title, null);
- setMessage(PatchMessages.getString("PreviewPatchPage.message")); //$NON-NLS-1$
+ setMessage(PatchMessages.PreviewPatchPage_message);
fPatchWizard= pw;
//setPageComplete(false);
@@ -119,10 +119,10 @@ import org.eclipse.compare.structuremergeviewer.*;
fCompareConfiguration= new CompareConfiguration();
fCompareConfiguration.setLeftEditable(false);
- fCompareConfiguration.setLeftLabel(PatchMessages.getString("PreviewPatchPage.Left.title")); //$NON-NLS-1$
+ fCompareConfiguration.setLeftLabel(PatchMessages.PreviewPatchPage_Left_title);
fCompareConfiguration.setRightEditable(false);
- fCompareConfiguration.setRightLabel(PatchMessages.getString("PreviewPatchPage.Right.title")); //$NON-NLS-1$
+ fCompareConfiguration.setRightLabel(PatchMessages.PreviewPatchPage_Right_title);
}
/* (non-Javadoc)
@@ -253,7 +253,7 @@ import org.eclipse.compare.structuremergeviewer.*;
final Patcher patcher= fPatchWizard.getPatcher();
Group group= new Group(parent, SWT.NONE);
- group.setText(PatchMessages.getString("PreviewPatchPage.PatchOptions.title")); //$NON-NLS-1$
+ group.setText(PatchMessages.PreviewPatchPage_PatchOptions_title);
gl= new GridLayout(); gl.numColumns= 4; gl.marginHeight= 0;
group.setLayout(gl);
group.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
@@ -267,7 +267,7 @@ import org.eclipse.compare.structuremergeviewer.*;
pair.setLayoutData(gd);
l= new Label(pair, SWT.NONE);
- l.setText(PatchMessages.getString("PreviewPatchPage.IgnoreSegments.text")); //$NON-NLS-1$
+ l.setText(PatchMessages.PreviewPatchPage_IgnoreSegments_text);
gd= new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.GRAB_HORIZONTAL);
l.setLayoutData(gd);
@@ -282,7 +282,7 @@ import org.eclipse.compare.structuremergeviewer.*;
addSpacer(group);
fReversePatchButton= new Button(group, SWT.CHECK);
- fReversePatchButton.setText(PatchMessages.getString("PreviewPatchPage.ReversePatch.text")); //$NON-NLS-1$
+ fReversePatchButton.setText(PatchMessages.PreviewPatchPage_ReversePatch_text);
addSpacer(group);
@@ -294,8 +294,8 @@ import org.eclipse.compare.structuremergeviewer.*;
pair.setLayoutData(gd);
l= new Label(pair, SWT.NONE);
- l.setText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.text")); //$NON-NLS-1$
- l.setToolTipText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.tooltip")); //$NON-NLS-1$
+ l.setText(PatchMessages.PreviewPatchPage_FuzzFactor_text);
+ l.setToolTipText(PatchMessages.PreviewPatchPage_FuzzFactor_tooltip);
gd= new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.GRAB_HORIZONTAL);
l.setLayoutData(gd);
@@ -305,7 +305,7 @@ import org.eclipse.compare.structuremergeviewer.*;
fFuzzField.setLayoutData(gd);
Button b= new Button(pair, SWT.PUSH);
- b.setText(PatchMessages.getString("PreviewPatchPage.GuessFuzz.text")); //$NON-NLS-1$
+ b.setText(PatchMessages.PreviewPatchPage_GuessFuzz_text);
b.addSelectionListener(
new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -321,7 +321,7 @@ import org.eclipse.compare.structuremergeviewer.*;
addSpacer(group);
fIgnoreWhitespaceButton= new Button(group, SWT.CHECK);
- fIgnoreWhitespaceButton.setText(PatchMessages.getString("PreviewPatchPage.IgnoreWhitespace.text")); //$NON-NLS-1$
+ fIgnoreWhitespaceButton.setText(PatchMessages.PreviewPatchPage_IgnoreWhitespace_text);
addSpacer(group);
@@ -411,8 +411,8 @@ import org.eclipse.compare.structuremergeviewer.*;
// do the "work"
int[] fuzzRef= new int[1];
- String format= PatchMessages.getString("PreviewPatchPage.GuessFuzzProgress.format"); //$NON-NLS-1$
- pm.beginTask(PatchMessages.getString("PreviewPatchPage.GuessFuzzProgress.text"), work); //$NON-NLS-1$
+ String format= PatchMessages.PreviewPatchPage_GuessFuzzProgress_format;
+ pm.beginTask(PatchMessages.PreviewPatchPage_GuessFuzzProgress_text, work);
try {
int fuzz= 0;
for (int i= 0; i < diffs.length; i++) {
@@ -567,7 +567,7 @@ import org.eclipse.compare.structuremergeviewer.*;
diff.fMatches= true;
} else {
// file already exists
- error= PatchMessages.getString("PreviewPatchPage.FileExists.error"); //$NON-NLS-1$
+ error= PatchMessages.PreviewPatchPage_FileExists_error;
}
create= true;
} else {
@@ -579,14 +579,14 @@ import org.eclipse.compare.structuremergeviewer.*;
if (file != null) {
if (file.isReadOnly()) {
// file is readonly
- error= PatchMessages.getString("PreviewPatchPage.FileIsReadOnly.error"); //$NON-NLS-1$
+ error= PatchMessages.PreviewPatchPage_FileIsReadOnly_error;
file= null;
} else {
diff.fMatches= true;
}
} else {
// file doesn't exist
- error= PatchMessages.getString("PreviewPatchPage.FileDoesNotExist.error"); //$NON-NLS-1$
+ error= PatchMessages.PreviewPatchPage_FileDoesNotExist_error;
}
}
@@ -605,7 +605,7 @@ import org.eclipse.compare.structuremergeviewer.*;
boolean failed= failedHunks.contains(hunk);
String hunkError= null;
if (failed)
- hunkError= PatchMessages.getString("PreviewPatchPage.NoMatch.error"); //$NON-NLS-1$
+ hunkError= PatchMessages.PreviewPatchPage_NoMatch_error;
boolean check= !failed;
hunkItems[h].setChecked(check);
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
index 77bc6172f..35449ef9a 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
@@ -280,7 +280,7 @@ public class StructureDiffViewer extends DiffTreeViewer {
if ((fThreeWay && fAncestorStructure == null) || fLeftStructure == null || fRightStructure == null) {
// could not get structure of one (or more) of the legs
fRoot= null;
- message= CompareMessages.getString("StructureDiffViewer.StructureError"); //$NON-NLS-1$
+ message= CompareMessages.StructureDiffViewer_StructureError;
} else { // calculate difference of the two (or three) structures
@@ -301,7 +301,7 @@ public class StructureDiffViewer extends DiffTreeViewer {
fAncestorStructure, fLeftStructure, fRightStructure);
if (fRoot == null || fRoot.getChildren().length == 0) {
- message= CompareMessages.getString("StructureDiffViewer.NoStructuralDifferences"); //$NON-NLS-1$
+ message= CompareMessages.StructureDiffViewer_NoStructuralDifferences;
} else {
postDiffHook(fDifferencer, fRoot);
}

Back to the top