You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/05/09 17:27:32 UTC
svn commit: r654856 - in
/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core:
GeronimoRuntimeDelegate.java internal/Messages.properties
Author: mcconne
Date: Fri May 9 08:27:32 2008
New Revision: 654856
URL: http://svn.apache.org/viewvc?rev=654856&view=rev
Log:
GERONIMODEVTOOLS-341 Fix runtime and missing content branding messages -- Thanks Ted Kirby for the patch !!
Modified:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/Messages.properties
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java?rev=654856&r1=654855&r2=654856&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java Fri May 9 08:27:32 2008
@@ -105,23 +105,33 @@
count = runtimeLoc.append("lib").toFile().exists() ? ++count : count;
count = runtimeLoc.append("repository").toFile().exists() ? ++count : count;
- if (count == 0)
+ if (count == 0) {
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, NO_IMAGE, "", null);
+ }
if (count < 4) {
- // part of a server image was found, don't let install happen
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PARTIAL_IMAGE, Messages.missingContent, null);
- }
+ // part of a server image was found, don't let install happen
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ PARTIAL_IMAGE, Messages.bind(Messages.missingContent,
+ getRuntime().getName()), null);
+ }
String detectedVersion = detectVersion();
- if (detectedVersion == null)
- return new Status(IStatus.WARNING, Activator.PLUGIN_ID, INCORRECT_VERSION, Messages.noVersion, null);
-
- if (!detectedVersion.startsWith(getRuntime().getRuntimeType().getVersion())) {
- String message = NLS.bind(Messages.incorrectVersion, new String[] {
- getRuntime().getRuntimeType().getVersion(), detectedVersion});
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, INCORRECT_VERSION, message, null);
- }
+ if (detectedVersion == null) {
+ return new Status(IStatus.WARNING, Activator.PLUGIN_ID,
+ INCORRECT_VERSION, Messages.bind(Messages.noVersion,
+ getRuntime().getName()), null);
+ }
+
+ if (!detectedVersion.startsWith(getRuntime().getRuntimeType()
+ .getVersion())) {
+ String message = NLS.bind(Messages.incorrectVersion,
+ new String[] { getRuntime().getName(),
+ getRuntime().getRuntimeType().getVersion(),
+ detectedVersion });
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ INCORRECT_VERSION, message, null);
+ }
return Status.OK_STATUS;
}
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/Messages.properties?rev=654856&r1=654855&r2=654856&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/Messages.properties (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/Messages.properties Fri May 9 08:27:32 2008
@@ -27,9 +27,9 @@
target21runtime=Geronimo v2.1 Runtime
target22runtime=Geronimo v2.2 Runtime
-incorrectVersion=An incorrect version of Geronimo was detected. Version {0} was expected, but version {1} was found.
-noVersion=A geronimo installation was detected, however the version could not be verified.
-missingContent=A geronimo installation was detected, however parts of the server seem to be missing.
+incorrectVersion=An incorrect version of {0} was detected. Version {1} was expected, but version {2} was found.
+noVersion=A {0} installation was detected, however the version could not be verified.
+missingContent=A {0} installation was detected, however parts of the server seem to be missing.
errorJRE=The JRE could not be found. Edit the server and change the JRE location.
errorPortInUse=Port {0} required by {1} is already in use. The server may already be running in another process, or a system process may be using the port. \
To start this server you will need to stop the other process or change the port number(s).