Author: rob.stryker(a)jboss.com
Date: 2011-06-24 05:48:02 -0400 (Fri, 24 Jun 2011)
New Revision: 32345
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7ServerWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
Cleanup of runtime wizard fragments with some string changes
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2011-06-24
09:47:18 UTC (rev 32344)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2011-06-24
09:48:02 UTC (rev 32345)
@@ -62,6 +62,7 @@
public static String rwf_homeDirBlank;
public static String rwf_NoVMSelected;
public static String rwf_jre6NotFound;
+ public static String rwf_noValidJRE;
public static String swf_Title;
public static String swf_RuntimeInformation;
public static String swf_AuthorizationDescription;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-06-24
09:47:18 UTC (rev 32344)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-06-24
09:48:02 UTC (rev 32345)
@@ -13,13 +13,14 @@
rwf_JBossRuntime=JBoss Runtime
rwf_Explanation=A JBoss Server runtime references a JBoss installation directory.\nIt can
be used to set up classpaths for projects which depend on this runtime,\nas well as by a
"server" which will be able to start and stop instances of JBoss.
rwf_NameInUse=Runtime name already in use
-rwf_homeMissingFiles=The home directory does not exist or is missing the run.jar.
+rwf_homeMissingFiles=The home directory does not exist or is missing a required file or
folder: {0}
rwf_jboss7homeNotValid=The home directory does not point to a valid JBoss installation.
rwf_homeIncorrectVersion=This server type expects a version of {0} but the server
directory is of version {1}.
rwf_nameTextBlank=The name field must not be blank
rwf_homeDirBlank=The directory field must not be blank
rwf_NoVMSelected=No VM selected
rwf_jre6NotFound=No Java 6 runtime environment found
+rwf_noValidJRE=No valid JREs found for execution environment "{0}"
J2EEModuleExportOperation_could_not_export_module=Could not export module {1} to {0}.
J2EEModuleExportOperation_ErrorExportingArchive=Error Exporting Archive: {0}
JBAS_version=JBoss Application Server {0}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7ServerWizardFragment.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7ServerWizardFragment.java 2011-06-24
09:47:18 UTC (rev 32344)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7ServerWizardFragment.java 2011-06-24
09:48:02 UTC (rev 32345)
@@ -8,10 +8,12 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
import org.eclipse.wst.server.core.TaskModel;
+import org.jboss.ide.eclipse.as.core.server.bean.JBossServerType;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -62,7 +64,7 @@
return Messages.rwf_NameInUse;
if (!isHomeValid())
- return Messages.rwf_homeMissingFiles;
+ return NLS.bind(Messages.rwf_homeMissingFiles, getSystemJarPath());
if (name == null || name.equals("")) //$NON-NLS-1$
return Messages.rwf_nameTextBlank;
@@ -86,11 +88,9 @@
.toString();
return new File(standaloneScriptPath).exists();
}
-
@Override
- protected String getVersionString(File loc) {
- // TODO clean this up for later
- return "7.0"; //$NON-NLS-1$
+ protected String getSystemJarPath() {
+ return JBossServerType.AS7.getSystemJarPath();
}
@Override
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2011-06-24
09:47:18 UTC (rev 32344)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2011-06-24
09:48:02 UTC (rev 32345)
@@ -615,14 +615,13 @@
}
if( getValidJREs().size() == 0 ) {
- String error = "No valid JREs found for execution environment \""
- + getRuntime().getExecutionEnvironment().getId() + "\"";
+ String error = NLS.bind(Messages.rwf_noValidJRE,
getRuntime().getExecutionEnvironment().getId());
return error;
}
if (!isHomeValid())
- return Messages.rwf_homeMissingFiles;
+ return NLS.bind(Messages.rwf_homeMissingFiles, getSystemJarPath());
if (name == null || name.equals("")) //$NON-NLS-1$
return Messages.rwf_nameTextBlank;
@@ -652,8 +651,12 @@
return version;
}
+ protected String getSystemJarPath() {
+ return JBossServerType.AS.getSystemJarPath();
+ }
+
protected String getHomeVersionWarning() {
- File loc = new File(homeDir, JBossServerType.AS.getSystemJarPath());
+ File loc = new File(homeDir, getSystemJarPath() );
String version = getVersionString(loc);
IRuntime rt = (IRuntime) getTaskModel().getObject(
TaskModel.TASK_RUNTIME);
@@ -675,8 +678,8 @@
}
protected void browseHomeDirClicked() {
- File file = new File(homeDir);
- if (!file.exists()) {
+ File file = homeDir == null ? null : new File(homeDir);
+ if (file != null && !file.exists()) {
file = null;
}
Show replies by date