Author: rob.stryker(a)jboss.com
Date: 2008-07-15 17:15:54 -0400 (Tue, 15 Jul 2008)
New Revision: 9149
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
Log:
JBIDE-2479 - added core exceptions if the server is corrupt for some reason
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2008-07-15
19:07:36 UTC (rev 9148)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2008-07-15
21:15:54 UTC (rev 9149)
@@ -70,7 +70,13 @@
public static void forceDefaultsSet(ILaunchConfigurationWorkingCopy wc, IServer server)
throws CoreException {
JBossServer jbs = findJBossServer(server.getId());
+ if( jbs == null )
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Server " + server.getName() + " is not a proper JBoss Server"));
+
String serverHome = getServerHome(jbs);
+ if( serverHome == null )
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Server " + server.getName() + " is corrupt and the server home is unable
to be located."));
+
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
getDefaultArgs(jbs));
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
getDefaultVMArgs(jbs));
Show replies by date