Author: rob.stryker(a)jboss.com
Date: 2011-01-04 15:49:05 -0500 (Tue, 04 Jan 2011)
New Revision: 27885
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
Log:
JBIDE-7753 - stop terminal canceling before stop command fully launched
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-01-04
18:35:43 UTC (rev 27884)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2011-01-04
20:49:05 UTC (rev 27885)
@@ -167,16 +167,17 @@
final String[] output = new String[1];
output[0] = null;
try {
- System.out.println(command);
final IHostShell hs = service.runCommand("/", command, new String[]{}, new
NullProgressMonitor());
hs.addOutputListener(new IHostShellOutputListener(){
public void shellOutputChanged(IHostShellChangeEvent event) {
IHostOutput[] out = event.getLines();
for(int i = 0; i < out.length; i++ ) {
- System.out.println(out[i]);
if( saving[0] ) {
output[0] = out[i].getString();
saving[0] = false;
+ try {
+ Thread.sleep(1000);
+ } catch(InterruptedException ie) {}
hs.exit();
}
/*
@@ -193,13 +194,6 @@
}
});
- while(output[0] != null ) {
- try {
- Thread.sleep(200);
- } catch(InterruptedException ie) {
- }
- }
- // can log the output somewhere?
behaviour.setServerStopped();
} catch( SystemMessageException sme) {
// TODO
Show replies by date