jruaux 2003/01/16 03:37:45
Modified: Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui
CactusPreferencePage.java CactusPlugin.java
CactusMessages.properties
ContainersPreferencePage.java
Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
CactusLaunchShortcut.java
Log:
Externalized messages
Revision Changes Path
1.8 +22 -16
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusPreferencePage.java
Index: CactusPreferencePage.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusPreferencePage.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CactusPreferencePage.java 3 Jan 2003 15:50:31 -0000 1.7
+++ CactusPreferencePage.java 16 Jan 2003 11:37:45 -0000 1.8
@@ -94,10 +94,8 @@
{
super(GRID);
setPreferenceStore(CactusPlugin.getDefault().getPreferenceStore());
- // TODO: externalize
setDescription(
- "Preferences of the Apache Cactus plug-in "
- + "for in-container unit testing");
+ CactusMessages.getString("CactusPreferencePage.description"));
}
/**
@@ -108,38 +106,46 @@
*/
public void createFieldEditors()
{
- // TODO: externalize labels
addField(new RadioGroupFieldEditor(
CactusPreferences.CONTEXT_URL_SCHEME,
- "Protocol:",
+ CactusMessages.getString("CactusPreferencePage.label.protocol"),
1,
- new String[][] { { "HTTP", "http" }, {
- "HTTP over SSL", "https" }
+ new String[][] {
+ {
+ CactusMessages.getString(
+ "CactusPreferencePage.label.protocol1"),
+ "http" },
+ {
+ CactusMessages.getString(
+ "CactusPreferencePage.label.protocol2"),
+ "https" }
}, getFieldEditorParent()));
addField(
new StringFieldEditor(
CactusPreferences.CONTEXT_URL_HOST,
- "Host:",
+ CactusMessages.getString("CactusPreferencePage.label.host"),
getFieldEditorParent()));
addField(
new IntegerFieldEditor(
CactusPreferences.CONTEXT_URL_PORT,
- "Port:",
+ CactusMessages.getString("CactusPreferencePage.label.port"),
getFieldEditorParent()));
addField(
new StringFieldEditor(
CactusPreferences.CONTEXT_URL_PATH,
- "Context:",
- getFieldEditorParent()));
- addField(
- new DirectoryFieldEditor(
- CactusPreferences.JARS_DIR,
- "Jars directory:",
+ CactusMessages.getString("CactusPreferencePage.label.context"),
getFieldEditorParent()));
+ // Jars needed by Cactus are now provided with the plugin
+ // Left for future user-override capability
+// addField(
+// new DirectoryFieldEditor(
+// CactusPreferences.JARS_DIR,
+// "Jars directory:",
+// getFieldEditorParent()));
addField(
new DirectoryFieldEditor(
CactusPreferences.TEMP_DIR,
- "Temp directory:",
+ CactusMessages.getString("CactusPreferencePage.label.temp"),
getFieldEditorParent()));
}
1.13 +18 -8
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusPlugin.java
Index: CactusPlugin.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusPlugin.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CactusPlugin.java 15 Jan 2003 09:21:38 -0000 1.12
+++ CactusPlugin.java 16 Jan 2003 11:37:45 -0000 1.13
@@ -184,16 +184,26 @@
*/
protected void initializeDefaultPreferences(IPreferenceStore theStore)
{
- theStore.setDefault(CactusPreferences.CONTEXT_URL_SCHEME, "http");
- theStore.setDefault(CactusPreferences.CONTEXT_URL_HOST, "localhost");
- theStore.setDefault(CactusPreferences.CONTEXT_URL_PORT, 8080);
- theStore.setDefault(CactusPreferences.CONTEXT_URL_PATH, "test");
+ theStore.setDefault(
+ CactusPreferences.CONTEXT_URL_SCHEME,
+ CactusMessages.getString(
+ "CactusPreferencePage.label.protocol.init"));
+ theStore.setDefault(
+ CactusPreferences.CONTEXT_URL_HOST,
+ CactusMessages.getString("CactusPreferencePage.label.host.init"));
+ theStore.setDefault(
+ CactusPreferences.CONTEXT_URL_PORT,
+ CactusMessages.getString("CactusPreferencePage.label.port.init"));
+ theStore.setDefault(
+ CactusPreferences.CONTEXT_URL_PATH,
+ CactusMessages.getString(
+ "CactusPreferencePage.label.context.init"));
theStore.setDefault(
CactusPreferences.JARS_DIR,
- "D:/dev/cactus/jakarta-cactus-13-1.4b1/lib");
- theStore.setDefault(CactusPreferences.TEMP_DIR, "C:/temp");
- theStore.setDefault(CactusPreferences.TOMCAT40_DIR, "");
- theStore.setDefault(CactusPreferences.RESIN20_DIR, "");
+ CactusMessages.getString("CactusPreferencePage.label.temp.init"));
+ theStore.setDefault(
+ CactusPreferences.TEMP_DIR,
+ System.getProperty("java.io.tmpdir"));
}
/**
1.4 +31 -6
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusMessages.properties
Index: CactusMessages.properties
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusMessages.properties,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CactusMessages.properties 15 Jan 2003 16:33:05 -0000 1.3
+++ CactusMessages.properties 16 Jan 2003 11:37:45 -0000 1.4
@@ -4,9 +4,34 @@
# Version $Id$
# ---------------------------------------------------------------------------
-cactus.error.cannotfindjar = Cannot find required jar
-LaunchTestAction.message.error = Error when launching tests
-LaunchTestAction.dialog.title = Cactus launch
-LaunchTestAction.message.notests = No test selected
-PrepareCactusTests.message.failed = Preparation failed
-ContainerStart.message.failed = Container start failed
\ No newline at end of file
+CactusLaunch.message.prepare = Preparing for Cactus tests
+CactusLaunch.message.error = Error when launching tests
+CactusLaunch.message.notests = No test selected
+CactusLaunch.dialog.title = Cactus launch
+CactusLaunch.message.teardown.error = Error while tearing down Cactus tests
+CactusLaunch.message.war.malformed = The WAR file's URL is malformed
+CactusLaunch.message.start = Starting the container
+CactusLaunch.message.start.error = Failed to start the container
+CactusLaunch.message.start.sleep.error = Interruption during sleep
+CactusLaunch.message.stop = Stopping the container
+CactusLaunch.message.deploy = Deploying the container
+CactusLaunch.message.undeploy = Undeploying the container
+CactusLaunch.message.start.url.error = A testURL attribute must be specified
+
+CactusPreferencePage.description = Preferences of the Apache Cactus plug-in for
in-container unit testing
+CactusPreferencePage.label.protocol = Protocol:
+CactusPreferencePage.label.protocol1 = HTTP
+CactusPreferencePage.label.protocol2 = HTTP over SSL
+CactusPreferencePage.label.host = Host:
+CactusPreferencePage.label.port = Port:
+CactusPreferencePage.label.context = Context:
+CactusPreferencePage.label.temp = Temp directory:
+ContainersPreferencePage.description = Preferences for the containers
+ContainersPreferencePage.label.tomcat40 = Tomcat 4.0 home directory:
+ContainersPreferencePage.label.resin20 = Resin 2.0 home directory:
+ContainersPreferencePage.label.weblogic70 = Weblogic 7.0 home directory:
+CactusPreferencePage.label.protocol.init = http
+CactusPreferencePage.label.host.init = localhost
+CactusPreferencePage.label.port.init = 8080
+CactusPreferencePage.label.context.init = test
+CactusPreferencePage.label.temp.init = C:/jakarta-cactus-13-1.4b1/lib
1.3 +9 -7
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/ContainersPreferencePage.java
Index: ContainersPreferencePage.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/ContainersPreferencePage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ContainersPreferencePage.java 3 Jan 2003 15:50:31 -0000 1.2
+++ ContainersPreferencePage.java 16 Jan 2003 11:37:45 -0000 1.3
@@ -89,8 +89,8 @@
{
super(GRID);
setPreferenceStore(CactusPlugin.getDefault().getPreferenceStore());
- // TODO: externalize
- setDescription("Preferences for the containers");
+ setDescription(
+ CactusMessages.getString("ContainersPreferencePage.description"));
}
/**
* Creates the field editors. Field editors are abstractions of
@@ -100,22 +100,24 @@
*/
public void createFieldEditors()
{
- // TODO: externalize labels
addField(
new DirectoryFieldEditor(
CactusPreferences.TOMCAT40_DIR,
- "Tomcat 4.0 home directory:",
+ CactusMessages.getString(
+ "ContainersPreferencePage.label.tomcat40"),
getFieldEditorParent()));
addField(
new DirectoryFieldEditor(
CactusPreferences.RESIN20_DIR,
- "Resin 2.0 home directory:",
+ CactusMessages.getString(
+ "ContainersPreferencePage.label.resin20"),
getFieldEditorParent()));
addField(
new DirectoryFieldEditor(
CactusPreferences.WEBLOGIC70_DIR,
- "Weblogic 7.0 home directory:",
- getFieldEditorParent()));
+ CactusMessages.getString(
+ "ContainersPreferencePage.label.weblogic70"),
+ getFieldEditorParent()));
}
/**
1.27 +16 -10
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java
Index: CactusLaunchShortcut.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- CactusLaunchShortcut.java 15 Jan 2003 16:35:47 -0000 1.26
+++ CactusLaunchShortcut.java 16 Jan 2003 11:37:45 -0000 1.27
@@ -140,7 +140,7 @@
catch (InterruptedException e)
{
CactusPlugin.displayErrorMessage(
- CactusMessages.getString("LaunchTestAction.message.error"),
+ CactusMessages.getString("CactusLaunch.message.error"),
e.getMessage(),
null);
return;
@@ -148,7 +148,7 @@
catch (InvocationTargetException e)
{
CactusPlugin.displayErrorMessage(
- CactusMessages.getString("LaunchTestAction.message.error"),
+ CactusMessages.getString("CactusLaunch.message.error"),
e.getMessage(),
null);
return;
@@ -157,8 +157,8 @@
if (types.length == 0)
{
CactusPlugin.displayErrorMessage(
- CactusMessages.getString("LaunchTestAction.dialog.title"),
- CactusMessages.getString("LaunchTestAction.message.notests"),
+ CactusMessages.getString("CactusLaunch.dialog.title"),
+ CactusMessages.getString("CactusLaunch.message.notests"),
null);
}
else if (types.length > 1)
@@ -230,9 +230,11 @@
}
catch (InvocationTargetException tearDownE)
{
- CactusPlugin.displayErrorMessage(
- CactusMessages.getString("TearDownCactusTests.message.failed"),
- tearDownE.getTargetException().getMessage(),
+ CactusPlugin
+ .displayErrorMessage(
+ CactusMessages.getString(
+ "CactusLaunch.message.teardown.failed"),
+ tearDownE.getTargetException().getMessage(),
null);
}
catch (InterruptedException tearDownE)
@@ -252,7 +254,9 @@
IProgressMonitor thePM)
throws CoreException
{
- thePM.beginTask("Preparing for Cactus tests", 10);
+ thePM.beginTask(
+ CactusMessages.getString("CactusLaunch.message.prepare"),
+ 10);
provider = CactusPlugin.getContainerProvider();
try
{
@@ -275,7 +279,8 @@
IStatus.ERROR,
CactusPlugin.getPluginId(),
IStatus.OK,
- "The WAR file's URL is malformed",
+ CactusMessages.getString(
+ "CactusLaunch.message.war.malformed"),
e));
}
thePM.done();
@@ -299,7 +304,8 @@
catch (CoreException e)
{
CactusPlugin.displayErrorMessage(
- "Error when tearing down tests",
+ CactusMessages.getString(
+ "CactusLaunch.message.teardown.error"),
e.getMessage(),
e.getStatus());
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>