Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html9
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java38
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java50
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties56
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Messages.java33
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java28
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java12
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java50
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java74
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties100
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java36
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java4
-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
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java33
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java18
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java12
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java32
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java16
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java98
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java50
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java10
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java16
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties148
52 files changed, 906 insertions, 597 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index 0eea060b5..30ad35401 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/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/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
index 67e8d1716..8b35834c8 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/bundles/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/compare/org/eclipse/compare/NavigationAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
index 99da07fd7..6bf001b65 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
+++ b/bundles/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/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index 590981777..84c121b95 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/CompareMessages.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
index 3711b4d0f..c1be51c61 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/CompareMessages.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
index bf308bfd6..6aeefccd9 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
+++ b/bundles/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/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
index 4f2bbdd0f..22dec06f3 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/ExceptionHandler.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
index 1ac8746dc..8e12c2275 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/Messages.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Messages.java
new file mode 100644
index 000000000..96403a7d0
--- /dev/null
+++ b/bundles/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/compare/org/eclipse/compare/internal/merge/MergeMessages.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java
index 408cbf950..f3fa54dea 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/merge/MergeMessages.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties
index a5113cc8a..256e1fb0e 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties
+++ b/bundles/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/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java
index 96c505c05..adacc6889 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
index 7ecc122da..d48c6dcd7 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
index 581f3ead3..9737291f8 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/PatchMessages.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
index 747805a40..773dda80b 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/PatchMessages.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
index 141682925..cd2d74205 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/PatchWizard.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
index 063a981aa..8d0640a8b 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index 048d2e3e8..b82803418 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/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/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
index 515d5b274..222184700 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
+++ b/bundles/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/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
index 77bc6172f..35449ef9a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ b/bundles/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);
}
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);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
index 875ce2965..cdc0ed0eb 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
@@ -27,9 +27,9 @@ class ChooseMatcherDropDownAction extends Action implements IMenuCreator {
public ChooseMatcherDropDownAction(XMLStructureViewer viewer) {
fViewer = viewer;
- setText(XMLCompareMessages.getString("ChooseMatcherDropDownAction.text")); //$NON-NLS-1$
+ setText(XMLCompareMessages.ChooseMatcherDropDownAction_text);
setImageDescriptor(XMLPlugin.getDefault().getImageDescriptor("obj16/smartmode_co.gif")); //$NON-NLS-1$
- setToolTipText(XMLCompareMessages.getString("ChooseMatcherDropDownAction.tooltip")); //$NON-NLS-1$
+ setToolTipText(XMLCompareMessages.ChooseMatcherDropDownAction_tooltip);
setMenuCreator(this);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
index 591d302b8..464046c19 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
@@ -26,7 +26,7 @@ public class CreateNewIdMapAction extends Action {
public CreateNewIdMapAction(XMLStructureViewer viewer) {
setImageDescriptor(XMLPlugin.getDefault().getImageDescriptor("obj16/addidmap.gif")); //$NON-NLS-1$
- setToolTipText(XMLCompareMessages.getString("XMLStructureViewer.newtask")); //$NON-NLS-1$
+ setToolTipText(XMLCompareMessages.XMLStructureViewer_newtask);
}
public void run() {
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Messages.java
new file mode 100644
index 000000000..1a327aa38
--- /dev/null
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/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.examples.xml;
+
+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/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
index 7e5e01855..41c8a67df 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
@@ -42,9 +42,9 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
fEdit= edit;
if (fEdit)
- setTitle(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.editTitle")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareAddIdMapDialog_editTitle);
else
- setTitle(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.newTitle")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareAddIdMapDialog_newTitle);
fIdMap= idmap;
fIdMaps= idmaps;
@@ -71,7 +71,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
inner.setLayoutData(new GridData(GridData.FILL_BOTH));
Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.label")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareAddIdMapDialog_label);
label.setLayoutData(new GridData());
fIdMapText= new Text(inner, SWT.BORDER);
@@ -86,7 +86,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
});
label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.extlabel")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareAddIdMapDialog_extlabel);
label.setLayoutData(new GridData());
fIdMapExtText= new Text(inner, SWT.BORDER);
@@ -113,19 +113,19 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
StatusInfo status= new StatusInfo();
String newText= fIdMapText.getText();
if (newText.length() == 0)
- status.setError(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.error.noname")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_noname);
else if (XMLComparePreferencePage.containsInvalidCharacters(newText))
- status.setError(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.error.invalidname")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_invalidname);
else if ( (!fEdit && (fIdMaps.containsKey(newText) || fIdMapsInternal.containsKey(newText)) )
|| (fEdit && !newText.equals(fIdMap.getName()) && (fIdMaps.containsKey(newText) || fIdMapsInternal.containsKey(newText)) )
)
- status.setError(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.error.idmapExists")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_idmapExists);
newText= fIdMapExtText.getText().toLowerCase();
if (newText.length() > 0) {
if (newText.indexOf(".") > -1) //$NON-NLS-1$
- status.setError(XMLCompareMessages.getString("XMLCompareAddIdMapDialog.error.extfullstop")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_extfullstop);
else if (fIdExtensionToName.containsKey(newText) && !fIdExtensionToName.get(newText).equals(fIdMap.getName()))
- status.setError(MessageFormat.format("{0} {1}",new String[] {XMLCompareMessages.getString("XMLCompareAddIdMapDialog.error.extExists"),(String)fIdExtensionToName.get(newText)})); //$NON-NLS-2$ //$NON-NLS-1$
+ status.setError(MessageFormat.format("{0} {1}",new String[] {XMLCompareMessages.XMLCompareAddIdMapDialog_error_extExists,(String)fIdExtensionToName.get(newText)}));
}
updateStatus(status);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
index fe4a55621..e4459a767 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
@@ -39,7 +39,7 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
public XMLCompareEditCopyIdMapDialog(Shell parent, IdMap idmap, HashMap idmaps, HashMap idmapsInternal) {
super(parent);
- setTitle(XMLCompareMessages.getString("XMLCompareEditCopyIdMapDialog.title")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_title);
fIdMaps= idmaps;
fIdMapsInternal= idmapsInternal;
@@ -62,7 +62,7 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
Composite composite= (Composite) super.createDialogArea(ancestor);
Label comment= new Label(composite, SWT.NONE);
- comment.setText(XMLCompareMessages.getString("XMLCompareEditCopyIdMapDialog.comment")); //$NON-NLS-1$
+ comment.setText(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_comment);
GridData data= new GridData();
data.horizontalAlignment= GridData.FILL;
data.verticalAlignment= GridData.BEGINNING;
@@ -75,7 +75,7 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
inner.setLayoutData(new GridData(GridData.FILL_BOTH));
Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareEditCopyIdMapDialog.label")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_label);
label.setLayoutData(new GridData());
fIdMapText= new Text(inner, SWT.BORDER);
@@ -98,11 +98,11 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
StatusInfo status= new StatusInfo();
String newText= fIdMapText.getText();
if (newText.length() == 0)
- status.setError(XMLCompareMessages.getString("XMLCompareEditCopyIdMapDialog.error.noname")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_error_noname);
else if (XMLComparePreferencePage.containsInvalidCharacters(newText))
- status.setError(XMLCompareMessages.getString("XMLCompareEditCopyIdMapDialog.error.invalidname")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_error_invalidname);
else if (fIdMaps.containsKey(newText) || fIdMapsInternal.containsKey(newText))
- status.setError(XMLCompareMessages.getString("XMLCompareEditCopyIdMapDialog.error.nameExists")); //$NON-NLS-1$
+ status.setError(XMLCompareMessages.XMLCompareEditCopyIdMapDialog_error_nameExists);
updateStatus(status);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
index b6df9e140..9b1351cdf 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
@@ -49,9 +49,9 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
fEdit= edit;
if (fEdit)
- setTitle(XMLCompareMessages.getString("XMLCompareEditMappingDialog.editTitle")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareEditMappingDialog_editTitle);
else
- setTitle(XMLCompareMessages.getString("XMLCompareEditMappingDialog.newTitle")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareEditMappingDialog_newTitle);
fMapping= mapping;
fIdmapHM= idmapHM;
@@ -77,7 +77,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
//Element
Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.element")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_element);
label.setLayoutData(new GridData());
fElementText= new Text(inner, SWT.BORDER);
@@ -91,7 +91,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
//Signature
label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.signature")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_signature);
label.setLayoutData(new GridData());
fSignatureText= new Text(inner, SWT.BORDER);
@@ -107,7 +107,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
//Id Attribute
label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.idattribute")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_idattribute);
label.setLayoutData(new GridData());
fIdAttributeText= new Text(inner, SWT.BORDER);
@@ -137,25 +137,25 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
String errormsg= ""; //$NON-NLS-1$
boolean isError= false;
if (text.length() == 0) {
- errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.noname"); //$NON-NLS-1$
+ errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_noname;
isError= true;
} else if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.invalidname"); //$NON-NLS-2$ //$NON-NLS-1$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidname;
isError= true;
} else if (!fEdit && fIdmapHM != null && fIdmapHM.containsKey(mappingKey)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.mappingExists"); //$NON-NLS-2$ //$NON-NLS-1$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_mappingExists;
isError= true;
}
text= fSignatureText.getText();
if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.invalidsignature"); //$NON-NLS-2$ //$NON-NLS-1$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidsignature;
isError= true;
}
text= fIdAttributeText.getText();
if (text.length() == 0)
isError= true;
else if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.invalididattribute"); //$NON-NLS-2$ //$NON-NLS-1$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalididattribute;
isError= true;
}
if (isError) status.setError(errormsg);
@@ -178,8 +178,8 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
private void createIdSourceGroup(Composite composite) {
Label titleLabel= new Label(composite, SWT.NONE);
- titleLabel.setText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.idtype")); //$NON-NLS-1$
- titleLabel.setToolTipText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.idtype.tooltip")); //$NON-NLS-1$
+ titleLabel.setText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype);
+ titleLabel.setToolTipText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype_tooltip);
Composite buttonComposite= new Composite(composite, SWT.LEFT);
GridLayout layout= new GridLayout();
@@ -188,12 +188,12 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
composite.setData(new GridData());
//attribute button
- fIdTypeAttributeButton= createRadioButton(buttonComposite, XMLCompareMessages.getString("XMLComparePreference.idtype.attribute")); //$NON-NLS-1$
- fIdTypeAttributeButton.setToolTipText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.idtype.attribute.tooltip")); //$NON-NLS-1$
+ fIdTypeAttributeButton= createRadioButton(buttonComposite, XMLCompareMessages.XMLComparePreference_idtype_attribute);
+ fIdTypeAttributeButton.setToolTipText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype_attribute_tooltip);
//child body button
- fIdTypeChildBodyButton= createRadioButton(buttonComposite, XMLCompareMessages.getString("XMLComparePreference.idtype.child_body")); //$NON-NLS-1$
- fIdTypeChildBodyButton.setToolTipText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.idtype.childbody.tooltip")); //$NON-NLS-1$
+ fIdTypeChildBodyButton= createRadioButton(buttonComposite, XMLCompareMessages.XMLComparePreference_idtype_child_body);
+ fIdTypeChildBodyButton.setToolTipText(XMLCompareMessages.XMLCompareEditMappingDialog_idtype_childbody_tooltip);
String idtext= fMapping.getIdAttribute();
if (fEdit && idtext.charAt(0) == XMLStructureCreator.ID_TYPE_BODY) {
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
index 55c7fa698..66b87b99a 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
@@ -49,9 +49,9 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
fEdit= edit;
if (fEdit)
- setTitle(XMLCompareMessages.getString("XMLCompareEditOrderedDialog.editTitle")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareEditOrderedDialog_editTitle);
else
- setTitle(XMLCompareMessages.getString("XMLCompareEditOrderedDialog.newTitle")); //$NON-NLS-1$
+ setTitle(XMLCompareMessages.XMLCompareEditOrderedDialog_newTitle);
fMapping= mapping;
fIdmapAL= idmapAL;
@@ -77,7 +77,7 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
//Element
Label label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.element")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_element);
label.setLayoutData(new GridData());
fElementText= new Text(inner, SWT.BORDER);
@@ -91,7 +91,7 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
//Signature
label= new Label(inner, SWT.NULL);
- label.setText(XMLCompareMessages.getString("XMLCompareEditMappingDialog.signature")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLCompareEditMappingDialog_signature);
label.setLayoutData(new GridData());
fSignatureText= new Text(inner, SWT.BORDER);
@@ -120,18 +120,18 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
String errormsg= ""; //$NON-NLS-1$
boolean isError= false;
if (text.length() == 0) {
- errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.noname"); //$NON-NLS-1$
+ errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_noname;
isError= true;
} else if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.invalidname"); //$NON-NLS-2$ //$NON-NLS-1$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidname;
isError= true;
} else if (!fEdit && fIdmapAL.contains(mappingKey)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditOrderedDialog.error.orderedExists"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditOrderedDialog_error_orderedExists;
isError= true;
}
text= fSignatureText.getText();
if (XMLComparePreferencePage.containsInvalidCharacters(text)) {
- if (errormsg == "") errormsg= XMLCompareMessages.getString("XMLCompareEditMappingDialog.error.invalidsignature"); //$NON-NLS-2$ //$NON-NLS-1$
+ if (errormsg == "") errormsg= XMLCompareMessages.XMLCompareEditMappingDialog_error_invalidsignature;
isError= true;
}
if (isError) status.setError(errormsg);
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java
index 6e36538a2..aefee5437 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.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,92 @@
*******************************************************************************/
package org.eclipse.compare.examples.xml;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
-public class XMLCompareMessages {
+public final class XMLCompareMessages extends NLS {
- private static final String BUNDLE_NAME= "org.eclipse.compare.examples.xml.xmlcompare"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME);
+ private static final String BUNDLE_NAME = "org.eclipse.compare.examples.xml.xmlcompare";//$NON-NLS-1$
private XMLCompareMessages() {
- // nothing to do
+ // Do not instantiate
}
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
+ public static String XMLStructureCreator_pluginname;
+ public static String XMLStructureCreator_unordered;
+ public static String XMLStructureCreator_ordered;
+ public static String XMLStructureCreator_idmap_unordered;
+ public static String XMLStructureCreator_id_map_scheme;
+ public static String XMLStructureCreator_body;
+ public static String ChooseMatcherDropDownAction_text;
+ public static String ChooseMatcherDropDownAction_tooltip;
+ public static String XMLComparePreference_idtype_attribute;
+ public static String XMLComparePreference_idtype_child_body;
+ public static String XMLComparePreference_topTableLabel;
+ public static String XMLComparePreference_topTableColumn1;
+ public static String XMLComparePreference_topTableColumn2;
+ public static String XMLComparePreference_topTableColumn2internal;
+ public static String XMLComparePreference_topTableColumn2user;
+ public static String XMLComparePreference_topTableColumn3;
+ public static String XMLComparePreference_topAdd;
+ public static String XMLComparePreference_topRename;
+ public static String XMLComparePreference_topRemove;
+ public static String XMLComparePreference_topEdit;
+ public static String XMLComparePreference_middleTableColumn1;
+ public static String XMLComparePreference_middleTableColumn2;
+ public static String XMLComparePreference_middleTableColumn3;
+ public static String XMLComparePreference_middleTableColumn4;
+ public static String XMLComparePreference_middleNew;
+ public static String XMLComparePreference_middleEdit;
+ public static String XMLComparePreference_middleRemove;
+ public static String XMLComparePreference_middleTableLabel;
+ public static String XMLComparePreference_bottomTableLabel;
+ public static String XMLComparePreference_bottomTableColumn1;
+ public static String XMLComparePreference_bottomTableColumn2;
+ public static String XMLComparePreference_bottomNew;
+ public static String XMLComparePreference_bottomEdit;
+ public static String XMLComparePreference_bottomRemove;
+ public static String XMLCompareAddIdMapDialog_editTitle;
+ public static String XMLCompareAddIdMapDialog_newTitle;
+ public static String XMLCompareAddIdMapDialog_label;
+ public static String XMLCompareAddIdMapDialog_extlabel;
+ public static String XMLCompareAddIdMapDialog_error_noname;
+ public static String XMLCompareAddIdMapDialog_error_invalidname;
+ public static String XMLCompareAddIdMapDialog_error_idmapExists;
+ public static String XMLCompareAddIdMapDialog_error_extfullstop;
+ public static String XMLCompareAddIdMapDialog_error_extExists;
+ public static String XMLCompareEditCopyIdMapDialog_title;
+ public static String XMLCompareEditCopyIdMapDialog_comment;
+ public static String XMLCompareEditCopyIdMapDialog_label;
+ public static String XMLCompareEditCopyIdMapDialog_error_noname;
+ public static String XMLCompareEditCopyIdMapDialog_error_invalidname;
+ public static String XMLCompareEditCopyIdMapDialog_error_nameExists;
+ public static String XMLCompareEditMappingDialog_editTitle;
+ public static String XMLCompareEditMappingDialog_newTitle;
+ public static String XMLCompareEditMappingDialog_element;
+ public static String XMLCompareEditMappingDialog_signature;
+ public static String XMLCompareEditMappingDialog_idattribute;
+ public static String XMLCompareEditMappingDialog_idtype;
+ public static String XMLCompareEditMappingDialog_idtype_tooltip;
+ public static String XMLCompareEditMappingDialog_idtype_attribute_tooltip;
+ public static String XMLCompareEditMappingDialog_idtype_childbody_tooltip;
+ public static String XMLCompareEditMappingDialog_error_noname;
+ public static String XMLCompareEditMappingDialog_error_invalidname;
+ public static String XMLCompareEditMappingDialog_error_mappingExists;
+ public static String XMLCompareEditMappingDialog_error_invalidsignature;
+ public static String XMLCompareEditMappingDialog_error_invalididattribute;
+ public static String XMLCompareEditOrderedDialog_newTitle;
+ public static String XMLCompareEditOrderedDialog_editTitle;
+ public static String XMLCompareEditOrderedDialog_error_orderedExists;
+ public static String XMLStructureViewer_newtask;
+ public static String XMLStructureViewer_action_notUserIdMap;
+ public static String XMLStructureViewer_action_setId_text1;
+ public static String XMLStructureViewer_action_setId_text2;
+ public static String XMLStructureViewer_action_setId_text3;
+ public static String XMLStructureViewer_action_setOrdered_exists;
+ public static String XMLStructureViewer_action_setOrdered;
+ public static String XMLStructureViewer_matching_beginTask;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, XMLCompareMessages.class);
}
-}
+} \ No newline at end of file
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
index cf66fadfb..a4ee39b3c 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
@@ -56,8 +56,8 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
protected static char[] invalidCharacters;
protected static final char SIGN_SEPARATOR = XMLStructureCreator.SIGN_SEPARATOR;
- public static String IDTYPE_ATTRIBUTE= XMLCompareMessages.getString("XMLComparePreference.idtype.attribute"); //$NON-NLS-1$
- public static String IDTYPE_CHILDBODY= XMLCompareMessages.getString("XMLComparePreference.idtype.child_body"); //$NON-NLS-1$
+ public static String IDTYPE_ATTRIBUTE= XMLCompareMessages.XMLComparePreference_idtype_attribute;
+ public static String IDTYPE_CHILDBODY= XMLCompareMessages.XMLComparePreference_idtype_child_body;
static {
@@ -110,7 +110,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
//layout the top table & its buttons
Label label = new Label(parent, SWT.LEFT);
- label.setText(XMLCompareMessages.getString("XMLComparePreference.topTableLabel")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLComparePreference_topTableLabel);
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = 2;
@@ -127,8 +127,8 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
}
});
- String column2Text= XMLCompareMessages.getString("XMLComparePreference.topTableColumn2"); //$NON-NLS-1$
- String column3Text= XMLCompareMessages.getString("XMLComparePreference.topTableColumn3"); //$NON-NLS-1$
+ String column2Text= XMLCompareMessages.XMLComparePreference_topTableColumn2;
+ String column3Text= XMLCompareMessages.XMLComparePreference_topTableColumn3;
ColumnLayoutData columnLayouts[]= {
new ColumnWeightData(1),
new ColumnPixelData(convertWidthInCharsToPixels(column2Text.length()+2), true),
@@ -138,7 +138,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
for (int i=0; i<3; i++)
tablelayout.addColumnData(columnLayouts[i]);
TableColumn column = new TableColumn(fIdMapsTable, SWT.NONE);
- column.setText(XMLCompareMessages.getString("XMLComparePreference.topTableColumn1")); //$NON-NLS-1$
+ column.setText(XMLCompareMessages.XMLComparePreference_topTableColumn1);
column = new TableColumn(fIdMapsTable, SWT.NONE);
column.setText(column2Text); //$NON-NLS-1$
column = new TableColumn(fIdMapsTable, SWT.NONE);
@@ -154,7 +154,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
buttons.setLayoutData(data);
fAddIdMapButton = new Button(buttons, SWT.PUSH);
- fAddIdMapButton.setText(XMLCompareMessages.getString("XMLComparePreference.topAdd")); //$NON-NLS-1$
+ fAddIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topAdd);
fAddIdMapButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
addIdMap(fAddIdMapButton.getShell());
@@ -168,7 +168,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fAddIdMapButton.setLayoutData(data);
fRenameIdMapButton = new Button(buttons, SWT.PUSH);
- fRenameIdMapButton.setText(XMLCompareMessages.getString("XMLComparePreference.topRename")); //$NON-NLS-1$
+ fRenameIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topRename);
fRenameIdMapButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
renameIdMap(fRenameIdMapButton.getShell());
@@ -182,7 +182,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRenameIdMapButton.setLayoutData(data);
fRemoveIdMapButton = new Button(buttons, SWT.PUSH);
- fRemoveIdMapButton.setText(XMLCompareMessages.getString("XMLComparePreference.topRemove")); //$NON-NLS-1$
+ fRemoveIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topRemove);
fRemoveIdMapButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
removeIdMap(fRemoveIdMapButton.getShell());
@@ -198,7 +198,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
createSpacer(buttons);
fEditIdMapButton = new Button(buttons, SWT.PUSH);
- fEditIdMapButton.setText(XMLCompareMessages.getString("XMLComparePreference.topEdit")); //$NON-NLS-1$
+ fEditIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topEdit);
fEditIdMapButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
editIdMap(fEditIdMapButton.getShell());
@@ -220,7 +220,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
//layout the middle table & its buttons
label = new Label(parent, SWT.LEFT);
- label.setText(XMLCompareMessages.getString("XMLComparePreference.middleTableLabel")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLComparePreference_middleTableLabel);
data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = 2;
@@ -233,8 +233,8 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
data.widthHint= convertWidthInCharsToPixels(70);
fMappingsTable.setLayoutData(data);
- column3Text= XMLCompareMessages.getString("XMLComparePreference.middleTableColumn3"); //$NON-NLS-1$
- String column4Text= XMLCompareMessages.getString("XMLComparePreference.middleTableColumn4"); //$NON-NLS-1$
+ column3Text= XMLCompareMessages.XMLComparePreference_middleTableColumn3;
+ String column4Text= XMLCompareMessages.XMLComparePreference_middleTableColumn4;
columnLayouts= new ColumnLayoutData[] {
new ColumnWeightData(10),
new ColumnWeightData(18),
@@ -245,9 +245,9 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
for (int i=0; i<4; i++)
tablelayout.addColumnData(columnLayouts[i]);
column = new TableColumn(fMappingsTable, SWT.NONE);
- column.setText(XMLCompareMessages.getString("XMLComparePreference.middleTableColumn1")); //$NON-NLS-1$
+ column.setText(XMLCompareMessages.XMLComparePreference_middleTableColumn1);
column = new TableColumn(fMappingsTable, SWT.NONE);
- column.setText(XMLCompareMessages.getString("XMLComparePreference.middleTableColumn2")); //$NON-NLS-1$
+ column.setText(XMLCompareMessages.XMLComparePreference_middleTableColumn2);
column = new TableColumn(fMappingsTable, SWT.NONE);
column.setText(column3Text); //$NON-NLS-1$
column = new TableColumn(fMappingsTable, SWT.NONE);
@@ -262,7 +262,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fNewMappingsButton= new Button(buttons, SWT.PUSH);
fNewMappingsButton.setLayoutData(getButtonGridData(fNewMappingsButton));
- fNewMappingsButton.setText(XMLCompareMessages.getString("XMLComparePreference.middleNew")); //$NON-NLS-1$
+ fNewMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleNew);
fNewMappingsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
addMapping(fAddIdMapButton.getShell());
@@ -271,7 +271,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fEditMappingsButton= new Button(buttons, SWT.PUSH);
fEditMappingsButton.setLayoutData(getButtonGridData(fEditMappingsButton));
- fEditMappingsButton.setText(XMLCompareMessages.getString("XMLComparePreference.middleEdit")); //$NON-NLS-1$
+ fEditMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleEdit);
fEditMappingsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
editMapping(fEditMappingsButton.getShell());
@@ -280,7 +280,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRemoveMappingsButton= new Button(buttons, SWT.PUSH);
fRemoveMappingsButton.setLayoutData(getButtonGridData(fRemoveMappingsButton));
- fRemoveMappingsButton.setText(XMLCompareMessages.getString("XMLComparePreference.middleRemove")); //$NON-NLS-1$
+ fRemoveMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleRemove);
fRemoveMappingsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
removeMapping(fRemoveMappingsButton.getShell());
@@ -291,7 +291,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
//layout the botton table & its buttons
label = new Label(parent, SWT.LEFT);
- label.setText(XMLCompareMessages.getString("XMLComparePreference.bottomTableLabel")); //$NON-NLS-1$
+ label.setText(XMLCompareMessages.XMLComparePreference_bottomTableLabel);
data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = 2;
@@ -312,9 +312,9 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
for (int i=0; i<2; i++)
tablelayout.addColumnData(columnLayouts[i]);
column = new TableColumn(fOrderedTable, SWT.NONE);
- column.setText(XMLCompareMessages.getString("XMLComparePreference.bottomTableColumn1")); //$NON-NLS-1$
+ column.setText(XMLCompareMessages.XMLComparePreference_bottomTableColumn1);
column = new TableColumn(fOrderedTable, SWT.NONE);
- column.setText(XMLCompareMessages.getString("XMLComparePreference.bottomTableColumn2")); //$NON-NLS-1$
+ column.setText(XMLCompareMessages.XMLComparePreference_bottomTableColumn2);
buttons= new Composite(parent, SWT.NULL);
buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
@@ -325,7 +325,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fNewOrderedButton= new Button(buttons, SWT.PUSH);
fNewOrderedButton.setLayoutData(getButtonGridData(fNewOrderedButton));
- fNewOrderedButton.setText(XMLCompareMessages.getString("XMLComparePreference.bottomNew")); //$NON-NLS-1$
+ fNewOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomNew);
fNewOrderedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
addOrdered(fNewOrderedButton.getShell());
@@ -334,7 +334,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fEditOrderedButton= new Button(buttons, SWT.PUSH);
fEditOrderedButton.setLayoutData(getButtonGridData(fEditOrderedButton));
- fEditOrderedButton.setText(XMLCompareMessages.getString("XMLComparePreference.bottomEdit")); //$NON-NLS-1$
+ fEditOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomEdit);
fEditOrderedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
editOrdered(fEditOrderedButton.getShell());
@@ -343,7 +343,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRemoveOrderedButton= new Button(buttons, SWT.PUSH);
fRemoveOrderedButton.setLayoutData(getButtonGridData(fRemoveOrderedButton));
- fRemoveOrderedButton.setText(XMLCompareMessages.getString("XMLComparePreference.bottomRemove")); //$NON-NLS-1$
+ fRemoveOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomRemove);
fRemoveOrderedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
removeOrdered(fRemoveOrderedButton.getShell());
@@ -622,7 +622,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
while (i<items.length && idmap.getName().compareToIgnoreCase(items[i].getText(0)) > 0)
i++;
TableItem item = new TableItem(fIdMapsTable, SWT.NULL, i);
- String[] values = new String[] {idmap.getName(), (idmap.isInternal())?XMLCompareMessages.getString("XMLComparePreference.topTableColumn2internal"):XMLCompareMessages.getString("XMLComparePreference.topTableColumn2user"),idmap.getExtension()}; //$NON-NLS-2$ //$NON-NLS-1$
+ String[] values = new String[] {idmap.getName(), (idmap.isInternal())?XMLCompareMessages.XMLComparePreference_topTableColumn2internal:XMLCompareMessages.XMLComparePreference_topTableColumn2user,idmap.getExtension()};
item.setText(values);
item.setData(idmap);
if (selected) {
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
index 2244659b1..b39ef7986 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
@@ -57,10 +57,10 @@ public class XMLStructureCreator implements IStructureCreator {
protected static final boolean DEBUG_MODE= false;
- public static final String DEFAULT_NAME= XMLCompareMessages.getString("XMLStructureCreator.pluginname"); //$NON-NLS-1$
+ public static final String DEFAULT_NAME= XMLCompareMessages.XMLStructureCreator_pluginname;
- public static final String USE_UNORDERED= XMLCompareMessages.getString("XMLStructureCreator.unordered"); //$NON-NLS-1$
- public static final String USE_ORDERED= XMLCompareMessages.getString("XMLStructureCreator.ordered"); //$NON-NLS-1$
+ public static final String USE_UNORDERED= XMLCompareMessages.XMLStructureCreator_unordered;
+ public static final String USE_ORDERED= XMLCompareMessages.XMLStructureCreator_ordered;
public static final String DEFAULT_IDMAP= USE_ORDERED;
public static final String TYPE_ELEMENT= "element"; //$NON-NLS-1$
@@ -75,7 +75,7 @@ public class XMLStructureCreator implements IStructureCreator {
public static final String SIGN_TEXT= SIGN_ENCLOSING + TYPE_TEXT + SIGN_ENCLOSING;
public static final String SIGN_ATTRIBUTE= SIGN_ENCLOSING + TYPE_ATTRIBUTE + SIGN_ENCLOSING;
- public static final String IDMAP_UNORDERED= XMLCompareMessages.getString("XMLStructureCreator.idmap_unordered"); //$NON-NLS-1$
+ public static final String IDMAP_UNORDERED= XMLCompareMessages.XMLStructureCreator_idmap_unordered;
public static final char ID_SEPARATOR= '<';
public static final char ID_TYPE_BODY= '<';
@@ -334,7 +334,7 @@ public class XMLStructureCreator implements IStructureCreator {
body_value= removeWhiteSpace(body_value);
}
XMLNode bodynode= new XMLNode(TYPE_TEXT, "body_(" + fcurrentParent.bodies + ")", body_value, (fsignature + SIGN_TEXT), fdoc, offset, length); //$NON-NLS-2$ //$NON-NLS-1$
- bodynode.setName(MessageFormat.format("{0} ({1})", new String[] { XMLCompareMessages.getString("XMLStructureCreator.body"), Integer.toString(fcurrentParent.bodies)})); //$NON-NLS-2$ //$NON-NLS-1$
+ bodynode.setName(MessageFormat.format("{0} ({1})", new String[] { XMLCompareMessages.XMLStructureCreator_body, Integer.toString(fcurrentParent.bodies)}));
fcurrentParent.addChild(bodynode);
bodynode.setParent(fcurrentParent);
if (XMLStructureCreator.DEBUG_MODE)
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
index 98a8cbab2..1242a9882 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
@@ -259,7 +259,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
totalWork= 1;
else
totalWork= 3;
- monitor.beginTask(XMLCompareMessages.getString("XMLStructureViewer.matching.beginTask"), totalWork); //$NON-NLS-1$
+ monitor.beginTask(XMLCompareMessages.XMLStructureViewer_matching_beginTask, totalWork);
ArrayList ordered= null;
if (!getXMLStructureCreator()
.getIdMap()
@@ -363,7 +363,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
if (diffnodeIdSig.endsWith(XMLStructureCreator.SIGN_ATTRIBUTE) || (diffnodeIdSig.endsWith(XMLStructureCreator.SIGN_TEXT) && ((XMLNode) diffnode.getId()).getOrigId().endsWith("(1)"))) { //$NON-NLS-1$
Action action= new SetAsIdAction(diffnode);
if (!fIdMaps.containsKey(idmap_name)) {
- action.setText(XMLCompareMessages.getString("XMLStructureViewer.action.notUserIdMap")); //$NON-NLS-1$
+ action.setText(XMLCompareMessages.XMLStructureViewer_action_notUserIdMap);
action.setEnabled(false);
} else {
HashMap idmapHM= (HashMap) fIdMaps.get(idmap_name);
@@ -410,7 +410,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
}
if (idmapHM.containsKey(signature)) {
if (idmapHM.get(signature).equals(idname)) {
- action.setText(XMLCompareMessages.getString("XMLStructureViewer.action.setId.text1")); //$NON-NLS-1$
+ action.setText(XMLCompareMessages.XMLStructureViewer_action_setId_text1);
action.setEnabled(false);
} else {
String oldId= (String) idmapHM.get(signature);
@@ -420,11 +420,11 @@ public class XMLStructureViewer extends StructureDiffViewer {
.ID_TYPE_BODY))
.toString()))
oldId= oldId.substring(1);
- action.setText(MessageFormat.format("{0} {1}", new String[] { XMLCompareMessages.getString("XMLStructureViewer.action.setId.text2"), oldId })); //$NON-NLS-2$ //$NON-NLS-1$
+ action.setText(MessageFormat.format("{0} {1}", new String[] { XMLCompareMessages.XMLStructureViewer_action_setId_text2, oldId }));
action.setEnabled(true);
}
} else {
- action.setText(XMLCompareMessages.getString("XMLStructureViewer.action.setId.text3")); //$NON-NLS-1$
+ action.setText(XMLCompareMessages.XMLStructureViewer_action_setId_text3);
action.setEnabled(true);
}
}
@@ -433,7 +433,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
diffnodeIdSig.endsWith(XMLStructureCreator.SIGN_ELEMENT)) {
SetOrderedAction action= new SetOrderedAction(idmap_name);
if (!fIdMaps.containsKey(idmap_name)) {
- action.setText(XMLCompareMessages.getString("XMLStructureViewer.action.notUserIdMap")); //$NON-NLS-1$
+ action.setText(XMLCompareMessages.XMLStructureViewer_action_notUserIdMap);
action.setEnabled(false);
} else {
ArrayList idmapOrdered=
@@ -448,10 +448,10 @@ public class XMLStructureViewer extends StructureDiffViewer {
XMLStructureCreator.SIGN_ELEMENT));
if (idmapOrdered != null
&& idmapOrdered.contains(signature)) {
- action.setText(XMLCompareMessages.getString("XMLStructureViewer.action.setOrdered.exists")); //$NON-NLS-1$
+ action.setText(XMLCompareMessages.XMLStructureViewer_action_setOrdered_exists);
action.setEnabled(false);
} else {
- action.setText(XMLCompareMessages.getString("XMLStructureViewer.action.setOrdered")); //$NON-NLS-1$
+ action.setText(XMLCompareMessages.XMLStructureViewer_action_setOrdered);
action.setSignature(signature);
action.setEnabled(true);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties
index f59851083..591410843 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties
@@ -12,98 +12,98 @@
#
# Structure Creator
#
-XMLStructureCreator.pluginname= XML Compare
-XMLStructureCreator.unordered= Unordered
-XMLStructureCreator.ordered= Ordered
-XMLStructureCreator.idmap_unordered= Unordered
-XMLStructureCreator.id_map_scheme= Id Map Scheme:
-XMLStructureCreator.body= body
+XMLStructureCreator_pluginname= XML Compare
+XMLStructureCreator_unordered= Unordered
+XMLStructureCreator_ordered= Ordered
+XMLStructureCreator_idmap_unordered= Unordered
+XMLStructureCreator_id_map_scheme= Id Map Scheme:
+XMLStructureCreator_body= body
#
# Id Scheme Drop Down Menu
#
-ChooseMatcherDropDownAction.text= Compare Mode
-ChooseMatcherDropDownAction.tooltip= Compare Mode
+ChooseMatcherDropDownAction_text= Compare Mode
+ChooseMatcherDropDownAction_tooltip= Compare Mode
#
# Preference Page
#
-XMLComparePreference.idtype.attribute= attribute
-XMLComparePreference.idtype.child_body= child text
-XMLComparePreference.topTableLabel= Id Mapping schemes:
-XMLComparePreference.topTableColumn1= Name
-XMLComparePreference.topTableColumn2= Internal/User
-XMLComparePreference.topTableColumn2internal= Internal
-XMLComparePreference.topTableColumn2user= User
-XMLComparePreference.topTableColumn3= Extension
-XMLComparePreference.topAdd= &Add...
-XMLComparePreference.topRename= &Edit...
-XMLComparePreference.topRemove= &Remove
-XMLComparePreference.topEdit= Edit &Copy...
-XMLComparePreference.middleTableColumn1= Element
-XMLComparePreference.middleTableColumn2= Path
-XMLComparePreference.middleTableColumn3= Id Attribute
-XMLComparePreference.middleTableColumn4= Id Source
-XMLComparePreference.middleNew= &New...
-XMLComparePreference.middleEdit= E&dit...
-XMLComparePreference.middleRemove= Re&move
-XMLComparePreference.middleTableLabel=Element mappings of selected Id Mapping Scheme:
-XMLComparePreference.bottomTableLabel=Elements whose children are compared in ordered fashion:
-XMLComparePreference.bottomTableColumn1=Element
-XMLComparePreference.bottomTableColumn2=Path
-XMLComparePreference.bottomNew=Ne&w...
-XMLComparePreference.bottomEdit=Edi&t...
-XMLComparePreference.bottomRemove=Remo&ve
+XMLComparePreference_idtype_attribute= attribute
+XMLComparePreference_idtype_child_body= child text
+XMLComparePreference_topTableLabel= Id Mapping schemes:
+XMLComparePreference_topTableColumn1= Name
+XMLComparePreference_topTableColumn2= Internal/User
+XMLComparePreference_topTableColumn2internal= Internal
+XMLComparePreference_topTableColumn2user= User
+XMLComparePreference_topTableColumn3= Extension
+XMLComparePreference_topAdd= &Add...
+XMLComparePreference_topRename= &Edit...
+XMLComparePreference_topRemove= &Remove
+XMLComparePreference_topEdit= Edit &Copy...
+XMLComparePreference_middleTableColumn1= Element
+XMLComparePreference_middleTableColumn2= Path
+XMLComparePreference_middleTableColumn3= Id Attribute
+XMLComparePreference_middleTableColumn4= Id Source
+XMLComparePreference_middleNew= &New...
+XMLComparePreference_middleEdit= E&dit...
+XMLComparePreference_middleRemove= Re&move
+XMLComparePreference_middleTableLabel=Element mappings of selected Id Mapping Scheme:
+XMLComparePreference_bottomTableLabel=Elements whose children are compared in ordered fashion:
+XMLComparePreference_bottomTableColumn1=Element
+XMLComparePreference_bottomTableColumn2=Path
+XMLComparePreference_bottomNew=Ne&w...
+XMLComparePreference_bottomEdit=Edi&t...
+XMLComparePreference_bottomRemove=Remo&ve
#
# Dialogs
#
-XMLCompareAddIdMapDialog.editTitle= Edit Id Mapping Scheme
-XMLCompareAddIdMapDialog.newTitle= New Id Mapping Scheme
-XMLCompareAddIdMapDialog.label= ID Map Name:
-XMLCompareAddIdMapDialog.extlabel= Extension (optional)
-XMLCompareAddIdMapDialog.error.noname= Enter Id Map Name.
-XMLCompareAddIdMapDialog.error.invalidname= Invalid Id Map Name.
-XMLCompareAddIdMapDialog.error.idmapExists= Id Map already exists.
-XMLCompareAddIdMapDialog.error.extfullstop= Extension cannot contain '.'
-XMLCompareAddIdMapDialog.error.extExists= Extension already set for
+XMLCompareAddIdMapDialog_editTitle= Edit Id Mapping Scheme
+XMLCompareAddIdMapDialog_newTitle= New Id Mapping Scheme
+XMLCompareAddIdMapDialog_label= ID Map Name:
+XMLCompareAddIdMapDialog_extlabel= Extension (optional)
+XMLCompareAddIdMapDialog_error_noname= Enter Id Map Name.
+XMLCompareAddIdMapDialog_error_invalidname= Invalid Id Map Name.
+XMLCompareAddIdMapDialog_error_idmapExists= Id Map already exists.
+XMLCompareAddIdMapDialog_error_extfullstop= Extension cannot contain '.'
+XMLCompareAddIdMapDialog_error_extExists= Extension already set for
-XMLCompareEditCopyIdMapDialog.title= Create Editable Copy of Internal Scheme
-XMLCompareEditCopyIdMapDialog.comment= You cannon edit an internal Id Map Scheme.\nTherefore, a user copy of the Id Map Scheme will created for editing.\nThe extension associated with the internal Id Map Scheme will not be transferred.\n\nPlease Enter a new name for the Id Map Scheme copy.
-XMLCompareEditCopyIdMapDialog.label= ID Map Name of Copy:
-XMLCompareEditCopyIdMapDialog.error.noname= Enter Id Map Name.
-XMLCompareEditCopyIdMapDialog.error.invalidname= Invalid Id Map Name.
-XMLCompareEditCopyIdMapDialog.error.nameExists= Id Map Name already exists.
+XMLCompareEditCopyIdMapDialog_title= Create Editable Copy of Internal Scheme
+XMLCompareEditCopyIdMapDialog_comment= You cannon edit an internal Id Map Scheme.\nTherefore, a user copy of the Id Map Scheme will created for editing.\nThe extension associated with the internal Id Map Scheme will not be transferred.\n\nPlease Enter a new name for the Id Map Scheme copy.
+XMLCompareEditCopyIdMapDialog_label= ID Map Name of Copy:
+XMLCompareEditCopyIdMapDialog_error_noname= Enter Id Map Name.
+XMLCompareEditCopyIdMapDialog_error_invalidname= Invalid Id Map Name.
+XMLCompareEditCopyIdMapDialog_error_nameExists= Id Map Name already exists.
-XMLCompareEditMappingDialog.editTitle= Edit Mapping
-XMLCompareEditMappingDialog.newTitle= New Mapping
-XMLCompareEditMappingDialog.element= Element
-XMLCompareEditMappingDialog.signature= Path
-XMLCompareEditMappingDialog.idattribute= ID
-XMLCompareEditMappingDialog.idtype= ID Source
-XMLCompareEditMappingDialog.idtype.tooltip= Select whether the ID is an attribute of the element or the text of a child
-XMLCompareEditMappingDialog.idtype.attribute.tooltip= ID is an attribute of the element
-XMLCompareEditMappingDialog.idtype.childbody.tooltip= ID is the text of a child element
-XMLCompareEditMappingDialog.error.noname= Enter Element Name.
-XMLCompareEditMappingDialog.error.invalidname= Invalid Element Name.
-XMLCompareEditMappingDialog.error.mappingExists= Mapping already exists.
-XMLCompareEditMappingDialog.error.invalidsignature= Invalid Signature.
-XMLCompareEditMappingDialog.error.invalididattribute= Invalid ID Attribute.
+XMLCompareEditMappingDialog_editTitle= Edit Mapping
+XMLCompareEditMappingDialog_newTitle= New Mapping
+XMLCompareEditMappingDialog_element= Element
+XMLCompareEditMappingDialog_signature= Path
+XMLCompareEditMappingDialog_idattribute= ID
+XMLCompareEditMappingDialog_idtype= ID Source
+XMLCompareEditMappingDialog_idtype_tooltip= Select whether the ID is an attribute of the element or the text of a child
+XMLCompareEditMappingDialog_idtype_attribute_tooltip= ID is an attribute of the element
+XMLCompareEditMappingDialog_idtype_childbody_tooltip= ID is the text of a child element
+XMLCompareEditMappingDialog_error_noname= Enter Element Name.
+XMLCompareEditMappingDialog_error_invalidname= Invalid Element Name.
+XMLCompareEditMappingDialog_error_mappingExists= Mapping already exists.
+XMLCompareEditMappingDialog_error_invalidsignature= Invalid Signature.
+XMLCompareEditMappingDialog_error_invalididattribute= Invalid ID Attribute.
-XMLCompareEditOrderedDialog.newTitle=New Ordered
-XMLCompareEditOrderedDialog.editTitle=Edit Ordered
-XMLCompareEditOrderedDialog.error.orderedExists=Ordered entry already exists
+XMLCompareEditOrderedDialog_newTitle=New Ordered
+XMLCompareEditOrderedDialog_editTitle=Edit Ordered
+XMLCompareEditOrderedDialog_error_orderedExists=Ordered entry already exists
#
# XMLStructureViewer
#
-XMLStructureViewer.newtask= Create new Id Map Scheme
-XMLStructureViewer.action.notUserIdMap= Please select a User Id Mapping Scheme
-XMLStructureViewer.action.setId.text1= Already set as Id
-XMLStructureViewer.action.setId.text2= Replace existing Id
-XMLStructureViewer.action.setId.text3= Set as Id
-XMLStructureViewer.action.setOrdered.exists= Ordered entry exists already
-XMLStructureViewer.action.setOrdered=Set children as ordered
-XMLStructureViewer.matching.beginTask=Running Matching algorithm...
+XMLStructureViewer_newtask= Create new Id Map Scheme
+XMLStructureViewer_action_notUserIdMap= Please select a User Id Mapping Scheme
+XMLStructureViewer_action_setId_text1= Already set as Id
+XMLStructureViewer_action_setId_text2= Replace existing Id
+XMLStructureViewer_action_setId_text3= Set as Id
+XMLStructureViewer_action_setOrdered_exists= Ordered entry exists already
+XMLStructureViewer_action_setOrdered=Set children as ordered
+XMLStructureViewer_matching_beginTask=Running Matching algorithm...

Back to the top