[jbosstools-commits] JBoss Tools SVN: r43740 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling and 8 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Sep 17 00:57:14 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-09-17 00:57:13 -0400 (Mon, 17 Sep 2012)
New Revision: 43740
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDelegatingServerBehavior.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossBehaviourDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractBehaviourDelegate.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/launch/AbstractJBossStartLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7StartLaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.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.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java
Log:
JBIDE-12613 cleanup on behavior interfaces
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -39,6 +39,7 @@
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.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.IModulePathFilter;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
@@ -249,7 +250,7 @@
TrueZipUtil.createArchive(path);
de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
IModuleResource[] resources = getResources(module);
- DeployableServerBehavior beh = ServerConverter.getDeployableServerBehavior(server);
+ IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(server);
IModulePathFilter filter = beh.getPathFilter(module);
IModuleResource[] resources2 = filter == null ? resources : filter.getFilteredMembers();
IStatus[] copyResults = copy(root, resources2);
@@ -284,7 +285,7 @@
IPath path = getOutputFilePath(module);
de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
IModuleResourceDelta[] deltas = ((Server)server).getPublishedResourceDelta(module);
- DeployableServerBehavior beh = ServerConverter.getDeployableServerBehavior(server);
+ IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(server);
IModulePathFilter filter = beh.getPathFilter(module);
return publishChanges(server, deltas, root, filter);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -15,10 +15,10 @@
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IProcessProvider;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.IServerStatePollerType;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
/**
* Essentially does nothing because the process already has a listener
@@ -57,7 +57,7 @@
public boolean isComplete() throws PollingException {
if( server.getServerState() == IServer.STATE_STOPPED)
return true;
- DelegatingServerBehavior beh = (DelegatingServerBehavior) server.getAdapter(DelegatingServerBehavior.class);
+ IDelegatingServerBehavior beh = (IDelegatingServerBehavior) server.getAdapter(IDelegatingServerBehavior.class);
if(beh != null && beh.getDelegate() != null && beh.getDelegate() instanceof IProcessProvider) {
IProcess p = ((IProcessProvider)beh.getDelegate()).getProcess();
if( p == null || p.isTerminated())
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -37,11 +37,11 @@
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.modules.ResourceModuleResourceUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.IModulePathFilter;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ProgressMonitorUtil;
@@ -280,7 +280,7 @@
* @since 2.3
*/
protected IModulePathFilter getPathFilter(IModule[] moduleTree) {
- DeployableServerBehavior beh = ServerConverter.getDeployableServerBehavior(server.getServer());
+ IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(server.getServer());
return beh.getPathFilter(moduleTree);
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDelegatingServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDelegatingServerBehavior.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDelegatingServerBehavior.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -0,0 +1,14 @@
+package org.jboss.ide.eclipse.as.core.server;
+
+import org.eclipse.core.runtime.IStatus;
+
+public interface IDelegatingServerBehavior extends IDeployableServerBehaviour {
+ public IJBossBehaviourDelegate getDelegate();
+ public IStatus canStart(String launchMode);
+ public IStatus canStop(String launchMode);
+ public IStatus canRestart(String launchMode);
+ public void setServerStopping();
+ public void setServerStopped();
+ public void setServerStarting();
+ public void setServerStarted();
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServerBehaviour.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -1,7 +1,11 @@
package org.jboss.ide.eclipse.as.core.server;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleFile;
public interface IDeployableServerBehaviour {
+ public IServer getServer();
public boolean changedFileRequiresModuleRestart(IModuleFile mf);
+ public IModulePathFilter getPathFilter(IModule[] moduleTree);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossBehaviourDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossBehaviourDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossBehaviourDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -15,13 +15,12 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.server.core.IModule;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
public interface IJBossBehaviourDelegate {
public String getBehaviourTypeId();
- public void setActualBehaviour(DelegatingServerBehavior actualBehaviour);
+ public void setActualBehaviour(IDelegatingServerBehavior actualBehaviour);
public void stop(boolean force);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractBehaviourDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractBehaviourDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractBehaviourDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.as.core.modules.ResourceModuleResourceUtil;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IJBossBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.IModulePathFilter;
@@ -24,10 +25,10 @@
*/
public abstract class AbstractBehaviourDelegate implements IJBossBehaviourDelegate {
- protected DelegatingServerBehavior actualBehavior;
+ protected IDelegatingServerBehavior actualBehavior;
@Override
- public void setActualBehaviour(DelegatingServerBehavior actualBehaviour) {
+ public void setActualBehaviour(IDelegatingServerBehavior actualBehaviour) {
this.actualBehavior = actualBehaviour;
}
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 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -25,6 +25,7 @@
import org.jboss.ide.eclipse.as.core.publishers.JSTPublisherXMLToucher;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
@@ -43,7 +44,7 @@
* @author Rob Stryker
*
*/
-public class DelegatingServerBehavior extends DeployableServerBehavior {
+public class DelegatingServerBehavior extends DeployableServerBehavior implements IDelegatingServerBehavior {
private IJBossBehaviourDelegate delegate;
private String lastModeId;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -31,10 +31,8 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.Trace;
-import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IServerAlreadyStartedHandler;
-import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.server.IServerStatePoller2;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory;
import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties;
@@ -51,7 +49,7 @@
@Override
public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor)
throws CoreException {
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ IDelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
IStatus s = jbsBehavior.canStart(mode);
Trace.trace(Trace.STRING_FINEST, "Ensuring Server can start: " + s.getMessage()); //$NON-NLS-1$
@@ -59,15 +57,15 @@
throw new CoreException(jbsBehavior.canStart(mode));
if (LaunchCommandPreferences.isIgnoreLaunchCommand(jbsBehavior.getServer())) {
Trace.trace(Trace.STRING_FINEST, "Server is marked as ignore Launch. Marking as started."); //$NON-NLS-1$
- jbsBehavior.setServerStarting();
- jbsBehavior.setServerStarted();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStarting();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStarted();
return false;
}
JBossExtendedProperties props = ExtendedServerPropertiesAdapterFactory.getJBossExtendedProperties(jbsBehavior.getServer());
IStatus status = props.verifyServerStructure();
if( !status.isOK() ) {
- jbsBehavior.setServerStopped();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStopped();
throw new CoreException(status);
}
@@ -88,11 +86,11 @@
* Should ideally use the poller that the server says is its poller,
* but some pollers such as timeout poller
*/
- protected IStatus isServerStarted(DelegatingServerBehavior jbsBehavior) {
+ protected IStatus isServerStarted(IDelegatingServerBehavior jbsBehavior) {
return PollThreadUtils.isServerStarted(jbsBehavior);
}
- protected boolean handleAlreadyStartedScenario( DelegatingServerBehavior jbsBehavior, IStatus startedStatus) {
+ protected boolean handleAlreadyStartedScenario( IDelegatingServerBehavior jbsBehavior, IStatus startedStatus) {
IServerAlreadyStartedHandler handler = ExtensionManager.getDefault().getAlreadyStartedHandler(jbsBehavior.getServer());
if( handler != null ) {
int handlerResult = handler.promptForBehaviour(jbsBehavior.getServer(), startedStatus);
@@ -105,7 +103,7 @@
}
Trace.trace(Trace.STRING_FINEST, "There is no handler available to prompt the user. The server will be set to started automatically. "); //$NON-NLS-1$
// force server to started mode
- jbsBehavior.setServerStarted();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStarted();
return false;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DelegatingStartLaunchConfiguration.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -24,9 +24,9 @@
import org.eclipse.wst.server.core.ServerUtil;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBossLaunchDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -46,7 +46,7 @@
protected IJBossLaunchDelegate getDelegate(ILaunchConfiguration configuration) throws CoreException {
IServer server = ServerUtil.getServer(configuration);
- DeployableServerBehavior beh = ServerConverter.getDeployableServerBehavior(server);
+ IDeployableServerBehaviour beh = ServerConverter.getDeployableServerBehavior(server);
String currentMode = DeploymentPreferenceLoader.getCurrentDeploymentMethodTypeId(beh.getServer(), LocalPublishMethod.LOCAL_PUBLISH_METHOD);
if( currentMode == null )
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Server's mode (local/rse/etc) is unset or missing.")); //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -12,7 +12,6 @@
import java.util.ArrayList;
-import org.apache.tools.ant.property.GetProperty;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -26,6 +25,7 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IJBossLaunchDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractLocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
@@ -58,17 +58,17 @@
public void preLaunch(ILaunchConfiguration configuration,
String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ IDelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
if( jbsBehavior != null ) {
- jbsBehavior.setRunMode(mode);
- jbsBehavior.setServerStarting();
+ ((DelegatingServerBehavior)jbsBehavior).setRunMode(mode);
+ ((DelegatingServerBehavior)jbsBehavior).setServerStarting();
}
}
public void postLaunch(ILaunchConfiguration configuration, String mode,
ILaunch launch, IProgressMonitor monitor) throws CoreException {
IProcess[] processes = launch.getProcesses();
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ IDelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
if( jbsBehavior != null )
((LocalJBossBehaviorDelegate) (jbsBehavior.getDelegate())).setProcess(processes[0]);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -13,6 +13,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
@@ -22,15 +23,15 @@
@Override
public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor)
throws CoreException {
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ IDelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
if (!jbsBehavior.canStop(mode).isOK())
throw new CoreException(jbsBehavior.canStart(mode));
if (LaunchCommandPreferences.isIgnoreLaunchCommand(jbsBehavior.getServer())) {
- jbsBehavior.setServerStopping();
- jbsBehavior.setServerStopped();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStopping();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStopped();
return false;
}
- jbsBehavior.setServerStopping();
+ ((DelegatingServerBehavior)jbsBehavior).setServerStopping();
return true;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -17,8 +17,9 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IJBossLaunchDelegate;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.launch.LocalJBossStartLaunchDelegate;
import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
@@ -40,16 +41,22 @@
public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ IServer server = ServerUtil.getServer(configuration);
+ DelegatingJBoss7ServerBehavior beh =
+ (DelegatingJBoss7ServerBehavior) server.getAdapter(DelegatingJBoss7ServerBehavior.class);
+
+ IDelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
if( jbsBehavior != null ) {
- jbsBehavior.setRunMode(mode);
- jbsBehavior.setServerStarting();
+ beh.setRunMode(mode);
+ beh.setServerStarting();
}
}
public void postLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
- DelegatingJBoss7ServerBehavior behavior = JBossServerBehaviorUtils.getJBoss7ServerBehavior(configuration);
+ IServer server = ServerUtil.getServer(configuration);
+ DelegatingJBoss7ServerBehavior behavior =
+ (DelegatingJBoss7ServerBehavior) server.getAdapter(DelegatingJBoss7ServerBehavior.class);
if( behavior != null ) {
IProcess[] processes = launch.getProcesses();
if (processes != null && processes.length >= 1) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -14,7 +14,7 @@
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerUtil;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.v7.DelegatingJBoss7ServerBehavior;
/**
@@ -27,10 +27,10 @@
* @param configuration
* @return
*/
- public static DelegatingServerBehavior getServerBehavior(ILaunchConfiguration configuration) {
+ public static IDelegatingServerBehavior getServerBehavior(ILaunchConfiguration configuration) {
try {
IServer server = ServerUtil.getServer(configuration);
- return (DelegatingServerBehavior) server.getAdapter(DelegatingServerBehavior.class);
+ return (IDelegatingServerBehavior) server.getAdapter(IDelegatingServerBehavior.class);
} catch(CoreException ce ) {
return null;
}
@@ -39,7 +39,10 @@
* Return a DelegatingJBoss7ServerBehavior or null
* @param configuration
* @return
+ *
+ * // TODO delete this method
*/
+ @Deprecated
public static DelegatingJBoss7ServerBehavior getJBoss7ServerBehavior(ILaunchConfiguration configuration) {
try {
IServer server = ServerUtil.getServer(configuration);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -18,6 +18,7 @@
import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.INeedCredentials;
import org.jboss.ide.eclipse.as.core.server.IPollResultListener;
import org.jboss.ide.eclipse.as.core.server.IProvideCredentials;
@@ -25,7 +26,6 @@
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller2;
import org.jboss.ide.eclipse.as.core.server.IServerStatePollerType;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
@@ -201,7 +201,7 @@
}
}
- public static IStatus isServerStarted(DelegatingServerBehavior jbsBehavior) {
+ public static IStatus isServerStarted(IDelegatingServerBehavior jbsBehavior) {
IServerStatePoller poller = PollThreadUtils.getPoller(IServerStatePoller.SERVER_UP, jbsBehavior.getServer());
return isServerStarted(jbsBehavior.getServer(), poller);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -23,11 +23,10 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.v7.DelegatingJBoss7ServerBehavior;
/**
@@ -57,12 +56,12 @@
return server;
}
- @SuppressWarnings("unchecked")
public static <SERVER> SERVER checkedGetJBossServer(IServer server, Class<SERVER> serverClass) throws CoreException {
- if (server == null) {
- return null;
- }
- SERVER adaptedServer = (SERVER) server.loadAdapter(serverClass, new NullProgressMonitor());
+ return checkedConvertServer(server, serverClass);
+ }
+
+ public static <SERVER> SERVER checkedConvertServer(IServerAttributes server, Class<SERVER> serverClass) throws CoreException {
+ SERVER adaptedServer = convertServer(server, serverClass);
if (adaptedServer == null) {
throw new CoreException(
new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
@@ -71,68 +70,41 @@
}
return adaptedServer;
}
-
- public static JBossServer getJBossServer(IServer server) {
+
+ @SuppressWarnings("unchecked")
+ public static <SERVER> SERVER convertServer(IServerAttributes server, Class<SERVER> serverClass) {
if (server == null) {
return null;
}
- JBossServer jbServer = (JBossServer) server.getAdapter(JBossServer.class);
- if (jbServer == null) {
- jbServer = (JBossServer) server.loadAdapter(JBossServer.class, new NullProgressMonitor());
- }
- return jbServer;
+ SERVER adaptedServer = (SERVER) server.loadAdapter(serverClass, new NullProgressMonitor());
+ return adaptedServer;
}
+
+ public static JBossServer getJBossServer(IServer server) {
+ return convertServer(server, JBossServer.class);
+ }
public static JBossServer checkedGetJBossServer(IServer server) throws CoreException {
- JBossServer jBossServer = getJBossServer(server);
- if (jBossServer == null) {
- throw new CoreException(
- new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
- NLS.bind(Messages.CannotSetUpImproperServer, server.getName())));
- }
- return jBossServer;
+ return checkedConvertServer(server, JBossServer.class);
}
public static JBossServer getJBossServer(IServerWorkingCopy server) {
- if (server == null) {
- return null;
- }
- JBossServer jbServer = (JBossServer) server.getAdapter(JBossServer.class);
- if (jbServer == null) {
- jbServer = (JBossServer) server.loadAdapter(JBossServer.class, new NullProgressMonitor());
- }
- return jbServer;
+ return convertServer(server, JBossServer.class);
}
public static IDeployableServer getDeployableServer(IServerAttributes server) {
- if (server == null) {
- return null;
- }
- IDeployableServer dep = (IDeployableServer) server.getAdapter(IDeployableServer.class);
- if (dep == null) {
- dep = (IDeployableServer) server.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
- }
- return dep;
+ return convertServer(server, IDeployableServer.class);
}
- public static DeployableServerBehavior getDeployableServerBehavior(IServer server) {
- if (server == null)
- return null;
- return (DeployableServerBehavior) server.loadAdapter(
- DeployableServerBehavior.class, new NullProgressMonitor());
+ public static IDeployableServerBehaviour getDeployableServerBehavior(IServer server) {
+ return convertServer(server, IDeployableServerBehaviour.class);
}
public static DelegatingJBoss7ServerBehavior getJBoss7ServerBehavior(IServer server) {
- if (server == null)
- return null;
- return (DelegatingJBoss7ServerBehavior) server.loadAdapter(
- DelegatingJBoss7ServerBehavior.class, new NullProgressMonitor());
+ return convertServer(server, DelegatingJBoss7ServerBehavior.class);
}
- public static DelegatingServerBehavior getJBossServerBehavior(IServer server) {
- if (server == null)
- return null;
- return (DelegatingServerBehavior) server.loadAdapter(
- DelegatingServerBehavior.class, new NullProgressMonitor());
+ public static IDelegatingServerBehavior getJBossServerBehavior(IServer server) {
+ return convertServer(server, IDelegatingServerBehavior.class);
}
/**
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -33,9 +33,9 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IJBossBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
public class ServerUtil {
@@ -66,7 +66,7 @@
}
public static IJBossBehaviourDelegate checkedGetBehaviorDelegate(IServer server) throws CoreException {
- return checkedGetServerAdapter(server, DelegatingServerBehavior.class).getDelegate();
+ return checkedGetServerAdapter(server, IDelegatingServerBehavior.class).getDelegate();
}
public static IPath makeRelative(IRuntime rt, IPath p) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -23,6 +23,8 @@
import org.eclipse.rse.services.shells.IHostShell;
import org.eclipse.rse.services.shells.IHostShellChangeEvent;
import org.eclipse.rse.services.shells.IHostShellOutputListener;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBossBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.IJBossLaunchDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
@@ -36,7 +38,7 @@
public static final String DELIMETER = ":";
public static final String ECHO_KEY_DISCOVER_PID = "JBTOOLS_SERVER_START_CMD";
- protected void executeRemoteCommand(String command, DelegatingServerBehavior behavior)
+ protected void executeRemoteCommand(String command, IDelegatingServerBehavior behavior)
throws CoreException {
try {
ServerShellModel model = RSEHostShellModel.getInstance().getModel(behavior.getServer());
@@ -46,14 +48,15 @@
shell.writeToShell(getPidCommand);
} catch (SystemMessageException sme) {
// could not connect to remote system
- behavior.setServerStopped();
+ ((DelegatingServerBehavior)behavior).setServerStopped();
throw new CoreException(new Status(IStatus.ERROR,
org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
MessageFormat.format("Could not execute command on remote server {0}. Please ensure the server is reachable.", behavior.getServer().getName()), sme));
}
}
- private void addShellOutputListener(final IHostShell shell, final DelegatingServerBehavior behavior) {
+ private void addShellOutputListener(final IHostShell shell,
+ final IDelegatingServerBehavior behavior) {
if( shell == null )
return; // No listener needed for a null shell.
IHostShellOutputListener listener = null;
@@ -76,9 +79,9 @@
shell.addOutputListener(listener);
}
- protected void launchPingThread(DeployableServerBehavior beh) {
+ protected void launchPingThread(IDeployableServerBehaviour beh) {
// TODO do it properly here
ThreadUtils.sleepFor(30000);
- beh.setServerStarted();
+ ((DeployableServerBehavior)beh).setServerStarted();
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7StartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7StartLaunchDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7StartLaunchDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -18,6 +18,7 @@
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.launch.DelegatingStartLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
@@ -29,12 +30,13 @@
public void actualLaunch(DelegatingStartLaunchConfiguration launchConfig,
ILaunchConfiguration configuration, String mode, ILaunch launch,
IProgressMonitor monitor) throws CoreException {
- DelegatingServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
- beh.setServerStarting();
+ IDelegatingServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
if (LaunchCommandPreferences.isIgnoreLaunchCommand(beh.getServer())) {
- beh.setServerStarted();
+ ((DelegatingServerBehavior)beh).setServerStarting();
+ ((DelegatingServerBehavior)beh).setServerStarted();
return;
}
+ ((DelegatingServerBehavior)beh).setServerStarting();
String command = RSELaunchConfigProperties.getStartupCommand(configuration);
executeRemoteCommand(command, beh);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBossStartLaunchDelegate.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -21,6 +21,7 @@
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
+import org.jboss.ide.eclipse.as.core.server.IDelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.IJBossBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -40,8 +41,8 @@
DelegatingStartLaunchConfiguration launchConfig,
ILaunchConfiguration configuration, String mode, ILaunch launch,
IProgressMonitor monitor) throws CoreException {
- DelegatingServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
- beh.setServerStarting();
+ IDelegatingServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ ((DelegatingServerBehavior)beh).setServerStarting();
String command = RSELaunchConfigProperties.getStartupCommand(configuration);
executeRemoteCommand(command, beh);
launchPingThread(beh);
@@ -52,12 +53,12 @@
public boolean preLaunchCheck(ILaunchConfiguration configuration,
String mode, IProgressMonitor monitor) throws CoreException {
// ping if up
- final DelegatingServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
- // TODO: use configured polelr
+ final IDelegatingServerBehavior beh = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ // TODO: use configured poller
boolean started = WebPortPoller.onePing(beh.getServer());
if (started) {
- beh.setServerStarting();
- beh.setServerStarted();
+ ((DelegatingServerBehavior)beh).setServerStarting();
+ ((DelegatingServerBehavior)beh).setServerStarted();
return false;
}
return 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 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -25,7 +25,6 @@
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.Trace;
@@ -34,6 +33,7 @@
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
@@ -49,18 +49,18 @@
public static final String RSE_ID = "rse"; //$NON-NLS-1$
- private DeployableServerBehavior behaviour;
+ private IDeployableServerBehaviour behaviour;
@Override
public String getPublishMethodId() {
return RSE_ID;
}
- public void setBehaviour(DeployableServerBehavior beh) {
+ public void setBehaviour(IDeployableServerBehaviour beh) {
this.behaviour = beh;
}
- public DeployableServerBehavior getBehaviour() {
+ public IDeployableServerBehaviour getBehaviour() {
return this.behaviour;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java 2012-09-17 04:12:10 UTC (rev 43739)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSectionComposite.java 2012-09-17 04:57:13 UTC (rev 43740)
@@ -33,10 +33,10 @@
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServerBehaviour;
import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel;
import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel.Behaviour;
import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel.BehaviourImpl;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
@@ -131,7 +131,7 @@
nameList[i] = deployAdditions.get(i).behaviourName;
}
deployTypeCombo.setItems(nameList);
- DeployableServerBehavior ds = ServerConverter.getDeployableServerBehavior(callback.getServer().getOriginal());
+ IDeployableServerBehaviour ds = ServerConverter.getDeployableServerBehavior(callback.getServer().getOriginal());
String current = null;
if( ds != null ) {
Behaviour b = BehaviourModel.getModel().getBehaviour(callback.getServer().getOriginal().getServerType().getId());
More information about the jbosstools-commits
mailing list