Author: rob.stryker(a)jboss.com
Date: 2011-07-07 04:21:39 -0400 (Thu, 07 Jul 2011)
New Revision: 32687
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
Log:
JBIDE-8658 - added event codes to RSE so that the event has a target, and set module state
to unknown
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2011-07-07
08:10:02 UTC (rev 32686)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2011-07-07
08:21:39 UTC (rev 32687)
@@ -85,9 +85,15 @@
protected void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor
monitor) throws CoreException {
if( method == null )
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Not publishing")); //$NON-NLS-1$
- int result = method.publishModule(this, kind, deltaKind, module, monitor);
- setModulePublishState(module, result);
- setModuleState(module, IServer.STATE_STARTED );
+ try {
+ int result = method.publishModule(this, kind, deltaKind, module, monitor);
+ setModulePublishState(module, result);
+ setModuleState(module, IServer.STATE_STARTED );
+ } catch(CoreException ce) {
+ setModulePublishState(module, IServer.PUBLISH_STATE_UNKNOWN);
+ setModuleState(module, IServer.STATE_UNKNOWN );
+ throw ce;
+ }
}
/**
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2011-07-07
08:10:02 UTC (rev 32686)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2011-07-07
08:21:39 UTC (rev 32687)
@@ -27,6 +27,7 @@
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
import org.eclipse.wst.server.core.model.IModuleFile;
+import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil;
import
org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
@@ -52,7 +53,7 @@
method.getFileService().upload(file, remotePath.removeLastSegments(1).toString(),
remotePath.lastSegment(), true, null, null, monitor);
} catch( SystemMessageException sme ) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
+ IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
IEventCodes.JST_PUB_FAIL,
"failed to copy to " + remotePath.toString(), sme);
throw new CoreException(s);
}
@@ -67,7 +68,7 @@
} catch(SystemElementNotFoundException senfe ) {
// ignore, file already does not exist remotely
} catch( SystemMessageException sme ) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
+ IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
IEventCodes.JST_PUB_FAIL,
"failed to delete " + remotePath.toString(), sme);
throw new CoreException(s);
}
@@ -88,7 +89,7 @@
toMake.lastSegment(), ProgressMonitorUtil.submon(monitor, 30));
}
} catch( SystemMessageException sme ) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
+ IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
IEventCodes.JST_PUB_FAIL,
"failed to create folder " + toMake.toString(), sme);
return new IStatus[]{s};
}
@@ -106,7 +107,7 @@
}
method.getFileServiceSubSystem().setLastModified(rf, new Date().getTime(), null);
} catch(SystemMessageException sme) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
+ IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID,
IEventCodes.JST_PUB_FAIL,
"failed to touch remote resource " + file.toString(), sme);
return new IStatus[]{s};
}