Author: rob.stryker(a)jboss.com
Date: 2010-12-14 11:43:23 -0500 (Tue, 14 Dec 2010)
New Revision: 27457
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
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
Log:
jbide-7754 - big ups to snjezana, now awaits full model load
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 2010-12-14
16:05:39 UTC (rev 27456)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2010-12-14
16:43:23 UTC (rev 27457)
@@ -173,6 +173,7 @@
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;
@@ -313,6 +314,7 @@
}
protected static IShellService findShellService(JBossServerBehavior behaviour) throws
CoreException {
+ RSEUtils.waitForFullInit();
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
IHost host = RSEUtils.findHost(connectionName);
if( host == null ) {
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 2010-12-14
16:05:39 UTC (rev 27456)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-12-14
16:43:23 UTC (rev 27457)
@@ -135,6 +135,7 @@
}
protected void loadRemoteDeploymentDetails() throws CoreException{
+ RSEUtils.waitForFullInit();
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
IDeployableServer ds = ServerConverter.getDeployableServer(behaviour.getServer());
this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(ds));
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-12-14
16:05:39 UTC (rev 27456)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-12-14
16:43:23 UTC (rev 27457)
@@ -10,8 +10,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.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.wst.server.core.IServer;
@@ -104,4 +107,13 @@
return null;
}
+ public static void waitForFullInit() throws CoreException {
+ try {
+ RSECorePlugin.waitForInitCompletion();
+ } catch (InterruptedException e) {
+ throw new CoreException(new Status(IStatus.ERROR,
org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
+ "The RSE model initialization has been interrupted."));
+ }
+ }
+
}