Author: rob.stryker(a)jboss.com
Date: 2011-01-31 18:07:20 -0500 (Mon, 31 Jan 2011)
New Revision: 28802
Modified:
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
Log:
JBIDE-8240 committed to branch, verified works
Modified:
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
---
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2011-01-31
22:53:06 UTC (rev 28801)
+++
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2011-01-31
23:07:20 UTC (rev 28802)
@@ -99,7 +99,7 @@
return wc;
}
- public static String getDefaultArgs(JBossServer jbs) throws CoreException {
+ public static String getDefaultArgs(JBossServer jbs) {
IJBossRuntimeConstants c = new IJBossRuntimeConstants() {};
IJBossToolingConstants tc = new IJBossToolingConstants() {};
Modified:
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java
===================================================================
---
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java 2011-01-31
22:53:06 UTC (rev 28801)
+++
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeConstants.java 2011-01-31
23:07:20 UTC (rev 28802)
@@ -29,6 +29,7 @@
public static final String SHUTDOWN_PASS_ARG = "-p";//$NON-NLS-1$
public static final String SHUTDOWN_ADAPTER_ARG = "-a";//$NON-NLS-1$
public static final String SHUTDOWN_STOP_ARG = "-S"; //$NON-NLS-1$
+ public static final String SHUTDOWN_ARG_PORT_LONG = "--port"; //$NON-NLS-1$
public static final String STARTUP_ARG_HOST_SHORT = "-b"; //$NON-NLS-1$
public static final String STARTUP_ARG_HOST_LONG = "--host"; //$NON-NLS-1$
public static final String STARTUP_ARG_CONFIG_SHORT = "-c"; //$NON-NLS-1$
Modified:
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
===================================================================
---
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-01-31
22:53:06 UTC (rev 28801)
+++
branches/jbosstools-3.2.x/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-01-31
23:07:20 UTC (rev 28802)
@@ -13,13 +13,11 @@
package org.jboss.ide.eclipse.as.rse.core;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -35,12 +33,12 @@
import org.eclipse.rse.services.shells.IShellService;
import
org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import
org.jboss.ide.eclipse.as.core.server.internal.launch.AbstractJBossLaunchConfigType;
import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.IStartLaunchSetupParticipant;
import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.StartLaunchDelegate;
import
org.jboss.ide.eclipse.as.core.server.internal.launch.LocalJBossServerStartupLaunchUtil;
@@ -272,15 +270,12 @@
String rseHome = server.getAttribute(RSEUtils.RSE_SERVER_HOME_DIR, "");
JBossServer jbs = ServerConverter.getJBossServer(server);
- // initialize stop command to something reasonable
- String username = jbs.getUsername();
- String pass = jbs.getPassword();
- String stop = new
Path(rseHome).append(IJBossRuntimeResourceConstants.BIN).append(IJBossRuntimeResourceConstants.SHUTDOWN_SH).toString()
+
- IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.SHUTDOWN_STOP_ARG +
IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.SHUTDOWN_SERVER_ARG +
- IJBossRuntimeConstants.SPACE + server.getHost() + IJBossRuntimeConstants.SPACE +
- IJBossRuntimeConstants.SHUTDOWN_USER_ARG + IJBossRuntimeConstants.SPACE +
- username + IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.SHUTDOWN_PASS_ARG +
IJBossRuntimeConstants.SPACE + pass;
+ IJBossRuntimeResourceConstants c = new IJBossRuntimeResourceConstants(){};
+ String stop = new Path(rseHome).append(c.BIN).append(c.SHUTDOWN_SH).toString() +
IJBossRuntimeConstants.SPACE;
+
+ // Pull args from single utility method
+ stop += StopLaunchConfiguration.getDefaultArgs(jbs);
return stop;
}
Show replies by date