Author: adietish
Date: 2011-06-28 10:46:06 -0400 (Tue, 28 Jun 2011)
New Revision: 32405
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
Log:
[JBIDE-9215] moved launchCommandNoResult to RSEPublishMethod since this is the only place
where it's used. Furthermore turned it from public static to private
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-06-28
14:10:55 UTC (rev 32404)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-06-28
14:46:06 UTC (rev 32405)
@@ -100,15 +100,6 @@
//shell.addOutputListener(listener);
}
- public static void launchCommandNoResult(JBossServerBehavior behaviour, int delay,
String command) {
- try {
- ServerShellModel model =
RSEHostShellModel.getInstance().getModel(behaviour.getServer());
- model.executeRemoteCommand("/", command, new String[]{}, new
NullProgressMonitor(), delay, true);
- } catch( CoreException ce ) {
- ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
- }
- }
-
public static void launchStopServerCommand(JBossServerBehavior behaviour) {
String ignore =
behaviour.getServer().getAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS,
(String)null);
Boolean ignoreB = ignore == null ? new Boolean(false) : new Boolean(ignore);
@@ -161,17 +152,7 @@
public void setupLaunchConfiguration(
ILaunchConfigurationWorkingCopy workingCopy, IServer server)
throws CoreException {
- boolean detectStartupCommand = RSELaunchConfigUtils.isDetectStartupCommand(workingCopy,
true);
- String currentStartupCmd = RSELaunchConfigUtils.getStartupCommand(workingCopy);
- if( detectStartupCommand || currentStartupCmd == null ||
"".equals(currentStartupCmd)) {
- RSELaunchConfigUtils.setStartupCommand(getDefaultLaunchCommand(workingCopy),
workingCopy);
- }
-
- boolean detectShutdownCommand =
RSELaunchConfigUtils.isDetectShutdownCommand(workingCopy, true);
- String currentStopCmd = RSELaunchConfigUtils.getShutdownCommand(workingCopy);
- if( detectShutdownCommand || currentStopCmd == null ||
"".equals(currentStopCmd)) {
- RSELaunchConfigUtils.setShutdownCommand(getDefaultStopCommand(server), workingCopy);
- }
+ new RSELaunchConfigurator(server).configure(workingCopy);
/*
* /usr/lib/jvm/jre/bin/java -Dprogram.name=run.sh -server -Xms1530M -Xmx1530M
* -XX:PermSize=425M -XX:MaxPermSize=425M -Dorg.jboss.resolver.warning=true
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-06-28
14:10:55 UTC (rev 32404)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2011-06-28
14:46:06 UTC (rev 32405)
@@ -26,6 +26,7 @@
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
@@ -36,6 +37,7 @@
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.ServerShellModel;
public class RSEPublishMethod extends AbstractPublishMethod {
@@ -77,13 +79,13 @@
protected void startDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), true);
if( cmd != null )
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
+ launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
}
protected void stopDeploymentScanner() {
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), false);
if( cmd != null )
- RSELaunchDelegate.launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
+ launchCommandNoResult((JBossServerBehavior)behaviour, 3000, cmd);
}
protected String getDeploymentScannerCommand(IProgressMonitor monitor, boolean start) {
@@ -190,5 +192,15 @@
public String getPublishDefaultRootFolder(IServer server) {
return getRemoteRootFolder().toString();
}
+
+ private void launchCommandNoResult(JBossServerBehavior behaviour, int delay, String
command) {
+ try {
+ ServerShellModel model =
RSEHostShellModel.getInstance().getModel(behaviour.getServer());
+ model.executeRemoteCommand("/", command, new String[]{}, new
NullProgressMonitor(), delay, true);
+ } catch( CoreException ce ) {
+ ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
+ }
+ }
+
}