Author: rob.stryker(a)jboss.com
Date: 2011-11-17 23:21:00 -0500 (Thu, 17 Nov 2011)
New Revision: 36430
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
Log:
JBIDE-9707 - rogue 'started' on modules on stopped server
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java 2011-11-18
00:49:06 UTC (rev 36429)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java 2011-11-18
04:21:00 UTC (rev 36430)
@@ -25,8 +25,8 @@
public void init(IServer server) {}
public void serverAdded(IServer server) {}
+ public void serverRemoved(IServer server) {}
public void serverChanged(IServer server) {}
- public void serverRemoved(IServer server) {}
public void serverChanged(ServerEvent event) {}
public void publishStarted(IServer server){}
public void publishFinished(IServer server, IStatus status){}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2011-11-18
00:49:06 UTC (rev 36429)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2011-11-18
04:21:00 UTC (rev 36430)
@@ -14,6 +14,7 @@
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.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IModule;
@@ -61,12 +62,27 @@
public void stop(boolean force) {
if( LaunchCommandPreferences.isIgnoreLaunchCommand(getServer())) {
- super.setServerStopped();
+ setServerStopped();
return;
}
getDelegate().stop(force);
}
+ public void setServerStopped() {
+ super.setServerStopped();
+ IModule[] mods = getServer().getModules();
+ setModulesStopped(new IModule[]{}, mods);
+ }
+
+ protected void setModulesStopped(IModule[] parent, IModule[] children) {
+ for( int i = 0; i < children.length; i++ ) {
+ IModule[] combined = PublishUtil.combine(parent, children[i]);
+ setModuleState(combined, IServer.STATE_UNKNOWN);
+ setModulesStopped(combined, getServer().getChildModules(combined, new
NullProgressMonitor()));
+ }
+ }
+
+
/*
* This shouldn't be done in the delegate.
* The launch config class directly should do it and allow all modes
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2011-11-18
00:49:06 UTC (rev 36429)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2011-11-18
04:21:00 UTC (rev 36430)
@@ -16,8 +16,6 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
-import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
public class ServerListener extends UnitedServerListener {
Show replies by date