Author: rob.stryker(a)jboss.com
Date: 2010-09-02 01:34:36 -0400 (Thu, 02 Sep 2010)
New Revision: 24636
Added:
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/target/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEJSTPublisher.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSESingleFilePublisher.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEUtils.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/archives/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/maven-archiver/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/maven-archiver/pom.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/org.jboss.ide.eclipse.as.rse.core-0.9.0-SNAPSHOT.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2artifacts.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2content.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPageCallback.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$1.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$2.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$3.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$4.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$CustomSystemHostCombo$1.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$CustomSystemHostCombo.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.class
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/maven-archiver/
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/maven-archiver/pom.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/org.jboss.ide.eclipse.as.rse.ui-0.9.0-SNAPSHOT.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2artifacts.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2content.xml
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/JSTPublisherXMLToucher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.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/RSERemotePublishHandler.java
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.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHCopyCallback.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
Log:
Ongoing RSE work, also JBDS-1103
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 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -34,14 +34,12 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
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.IJBossServerConstants;
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.xpl.PublishCopyUtil;
import
org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
-import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
@@ -205,8 +203,9 @@
IPath deployPath = getDeployPath(moduleTree, server);
boolean isBinaryObject = ServerModelUtilities.isBinaryModule(module);
boolean forceZip = forceZipModule(moduleTree);
+ IPublishCopyCallbackHandler handler = null;
if( !forceZip && !isBinaryObject) {
- IPublishCopyCallbackHandler handler = getCallbackHandler(deployPath);
+ handler = getCallbackHandler(deployPath);
results = new PublishCopyUtil(handler).publishDelta(delta,
ProgressMonitorUtil.submon(monitor, 100));
} else if( delta.length > 0 ) {
if( isBinaryObject)
@@ -219,7 +218,7 @@
File temp = File.createTempFile(module.getName(), ".tmp",
localDeployRoot.toFile()); //$NON-NLS-1$
IPath tempFile = new Path(temp.getAbsolutePath());
PublishUtil.packModuleIntoJar(moduleTree[moduleTree.length-1], tempFile);
- IPublishCopyCallbackHandler handler = getCallbackHandler(new Path("/"));
//$NON-NLS-1$
+ handler = getCallbackHandler(new Path("/")); //$NON-NLS-1$
String parentFolder = deployPath.removeLastSegments(1).toString();
handler.makeDirectoryIfRequired(new Path(parentFolder),
ProgressMonitorUtil.submon(monitor, 50));
ModuleFile mf = new ModuleFile(tempFile.toFile(), tempFile.lastSegment(),
tempFile);
@@ -240,6 +239,10 @@
return ms;
}
+ if( handler != null && handler.shouldRestartModule() ) {
+ JSTPublisherXMLToucher.getInstance().touch(deployPath, module, handler);
+ }
+
IStatus ret = new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,
IEventCodes.JST_PUB_FULL_SUCCESS,
NLS.bind(Messages.CountModifiedMembers, PublishUtil.countChanges(delta),
module.getName()), null);
return ret;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.wst.server.core.IModule;
+import
org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
@@ -32,7 +33,7 @@
}
public interface IDescriptorToucher {
- public void touchDescriptors(IPath moduleRoot);
+ public void touchDescriptors(IPath moduleRoot, IPublishCopyCallbackHandler handler);
}
public static class PathDescriptorToucher implements IDescriptorToucher {
@@ -47,12 +48,10 @@
public PathDescriptorToucher(IPath[] path) {
this.paths = path == null ? new IPath[0] : path;
}
- public void touchDescriptors(IPath moduleRoot) {
+ public void touchDescriptors(IPath moduleRoot, IPublishCopyCallbackHandler handler) {
File tmp;
for( int i = 0; i < paths.length; i++ ) {
- tmp = moduleRoot.append(paths[i]).toFile();
- if( tmp.exists())
- tmp.setLastModified(new Date().getTime());
+ handler.touchResource(paths[i]);
}
}
}
@@ -79,13 +78,13 @@
map.put(typeId, toucher);
}
- public void touch(IPath root, IModule module) {
+ public void touch(IPath root, IModule module, IPublishCopyCallbackHandler handler) {
String id = module.getModuleType().getId();
IDescriptorToucher toucher = map.get(id);
if( toucher == null )
defaultTouch(root);
else
- toucher.touchDescriptors(root);
+ toucher.touchDescriptors(root, handler);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossBehaviourDelegate.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -35,10 +35,6 @@
}
public abstract void stop(boolean force);
- public abstract void setupLaunchConfiguration(
- ILaunchConfigurationWorkingCopy workingCopy,
- IProgressMonitor monitor) throws CoreException;
-
public void publishStart(IProgressMonitor monitor) throws CoreException {
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -18,6 +18,7 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
/**
@@ -30,7 +31,6 @@
public static interface JBossBehaviourDelegate {
public void setActualBehaviour(JBossServerBehavior actualBehaviour);
public void stop(boolean force);
- public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
IProgressMonitor monitor) throws CoreException;
public void publishStart(final IProgressMonitor monitor) throws CoreException;
public void publishFinish(final IProgressMonitor monitor) throws CoreException;
public void serverStarting();
@@ -78,8 +78,13 @@
getDelegate().stop(force);
}
+ /*
+ * This shouldn't be done in the delegate.
+ * The launch config class directly should do it and allow all modes
+ * to participate?
+ */
public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
IProgressMonitor monitor) throws CoreException {
- getDelegate().setupLaunchConfiguration(workingCopy, monitor);
+ JBossServerStartupLaunchConfiguration.setupLaunchConfiguration(workingCopy,
getServer());
}
public void setRunMode(String mode) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossBehaviorDelegate.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -8,16 +8,6 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
import javax.management.MBeanServerConnection;
@@ -128,11 +118,6 @@
ServerLogger.getDefault().log(getServer(), status);
}
- public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
IProgressMonitor monitor) throws CoreException {
- LocalJBossServerStartupLaunchUtil.setupLaunchConfiguration(workingCopy, getServer());
- }
-
-
protected transient IDebugEventSetListener processListener;
public synchronized void setProcess(final IProcess newProcess) {
if (process != null) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -10,16 +10,23 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal.launch;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerUtil;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
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;
public class JBossServerStartupLaunchConfiguration extends AbstractJBossLaunchConfigType
{
@@ -36,18 +43,44 @@
}
- private StartLaunchDelegate del = null;
+ public static interface IStartLaunchSetupParticipant {
+ public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
IServer server) throws CoreException;
+ }
+
+ public static HashMap<String, StartLaunchDelegate> launchDelegates;
+ public static ArrayList<IStartLaunchSetupParticipant> setupParticipants;
+
+ static {
+ setupParticipants = new ArrayList<IStartLaunchSetupParticipant>();
+ setupParticipants.add(new LocalJBossServerStartupLaunchUtil());
+ launchDelegates = new HashMap<String, StartLaunchDelegate>();
+ launchDelegates.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, new
LocalJBossServerStartupLaunchUtil());
+ }
+
+ public static void addLaunchDelegateMapping(String mode, StartLaunchDelegate del) {
+ launchDelegates.put(mode, del);
+ }
+
+ public static void addSetupLaunchParticipant(IStartLaunchSetupParticipant participant)
{
+ setupParticipants.add(participant);
+ }
+
+ // Allow all participants to set some defaults for their own details
+ // Participants should be careful not to change shared launch keys / values
+ // unless their operation mode (local / rse / etc) is in use
+ public static void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
IServer server) throws CoreException {
+ for( Iterator<IStartLaunchSetupParticipant> i = setupParticipants.iterator();
i.hasNext(); ) {
+ i.next().setupLaunchConfiguration(workingCopy, server);
+ }
+ }
+
protected StartLaunchDelegate getDelegate(ILaunchConfiguration configuration) throws
CoreException {
- if( del != null )
- return del;
IServer server = ServerUtil.getServer(configuration);
DeployableServerBehavior beh = ServerConverter.getDeployableServerBehavior(server);
IJBossServerPublishMethodType type = beh.createPublishMethod().getPublishMethodType();
- if( type.getId().equals(LocalPublishMethod.LOCAL_PUBLISH_METHOD)) {
- del = new LocalJBossServerStartupLaunchUtil();
- }
- return del;
+ return launchDelegates.get(type.getId());
}
+
public void actualLaunch(ILaunchConfiguration configuration,
String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
getDelegate(configuration).actualLaunch(this, configuration, mode, launch, monitor);
@@ -75,4 +108,58 @@
ILaunch launch, IProgressMonitor monitor) throws CoreException {
getDelegate(configuration).postLaunch(configuration, mode, launch, monitor);
}
+
+ /**
+ * Will create a launch configuration for the server
+ * if one does not already exist.
+ */
+ public static ILaunchConfigurationWorkingCopy createLaunchConfiguration(IServer server)
throws CoreException {
+ ILaunchConfigurationType launchConfigType =
DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(LAUNCH_TYPE);
+ if (launchConfigType == null)
+ return null;
+
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfiguration[] launchConfigs = null;
+ try {
+ launchConfigs = launchManager.getLaunchConfigurations(launchConfigType);
+ } catch (CoreException e) {
+ // ignore
+ }
+
+ if (launchConfigs != null) {
+ int size = launchConfigs.length;
+ for (int i = 0; i < size; i++) {
+ try {
+ String serverId =
launchConfigs[i].getAttribute(AbstractJBossLaunchConfigType.SERVER_ID, (String) null);
+ if (server.getId().equals(serverId)) {
+ ILaunchConfigurationWorkingCopy wc = launchConfigs[i].getWorkingCopy();
+ return wc;
+ }
+ } catch (CoreException e) {
+ }
+ }
+ }
+
+ // create a new launch configuration
+ String launchName = getValidLaunchConfigurationName(server.getName());
+ launchName = launchManager.generateUniqueLaunchConfigurationNameFrom(launchName);
+ ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, launchName);
+ wc.setAttribute(AbstractJBossLaunchConfigType.SERVER_ID, server.getId());
+ return wc;
+ }
+
+ static final char[] INVALID_CHARS = new char[] {'\\', '/', ':',
'*', '?', '"', '<', '>', '|',
'\0', '@', '&'};
+ static final String LAUNCH_TYPE =
"org.jboss.ide.eclipse.as.core.server.startupConfiguration"; //$NON-NLS-1$
+
+ protected static String getValidLaunchConfigurationName(String s) {
+ if (s == null || s.length() == 0)
+ return "1"; //$NON-NLS-1$
+ int size = INVALID_CHARS.length;
+ for (int i = 0; i < size; i++) {
+ s = s.replace(INVALID_CHARS[i], '_');
+ }
+ return s;
+ }
+
+
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -23,10 +23,8 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IProcess;
@@ -46,6 +44,7 @@
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.IStartLaunchSetupParticipant;
import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.StartLaunchDelegate;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
import org.jboss.ide.eclipse.as.core.util.IConstants;
@@ -53,21 +52,13 @@
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
-public class LocalJBossServerStartupLaunchUtil implements StartLaunchDelegate {
+public class LocalJBossServerStartupLaunchUtil implements StartLaunchDelegate,
IStartLaunchSetupParticipant {
- static final char[] INVALID_CHARS = new char[] {'\\', '/', ':',
'*', '?', '"', '<', '>', '|',
'\0', '@', '&'};
- static final String LAUNCH_TYPE =
"org.jboss.ide.eclipse.as.core.server.startupConfiguration"; //$NON-NLS-1$
static final String DEFAULTS_SET = "jboss.defaults.been.set"; //$NON-NLS-1$
static final String START_JAR_LOC = IJBossRuntimeResourceConstants.BIN + Path.SEPARATOR
+ IJBossRuntimeResourceConstants.START_JAR;
static final String START_MAIN_TYPE = IJBossRuntimeConstants.START_MAIN_TYPE;
- public static ILaunchConfigurationWorkingCopy setupLaunchConfiguration(IServer server,
String action) throws CoreException {
- ILaunchConfigurationWorkingCopy config = createLaunchConfiguration(server);
- setupLaunchConfiguration(config, server);
- return config;
- }
-
- public static void setupLaunchConfiguration(
+ public void setupLaunchConfiguration(
ILaunchConfigurationWorkingCopy workingCopy, IServer server) throws CoreException {
if(!workingCopy.getAttributes().containsKey(DEFAULTS_SET)) {
forceDefaultsSet(workingCopy, server);
@@ -283,55 +274,6 @@
return jbossServerBehavior;
}
- protected static String getValidLaunchConfigurationName(String s) {
- if (s == null || s.length() == 0)
- return "1"; //$NON-NLS-1$
- int size = INVALID_CHARS.length;
- for (int i = 0; i < size; i++) {
- s = s.replace(INVALID_CHARS[i], '_');
- }
- return s;
- }
-
- /**
- * Will create a launch configuration for the server
- * if one does not already exist.
- */
- public static ILaunchConfigurationWorkingCopy createLaunchConfiguration(IServer server)
throws CoreException {
- ILaunchConfigurationType launchConfigType =
DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(LAUNCH_TYPE);
- if (launchConfigType == null)
- return null;
-
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfiguration[] launchConfigs = null;
- try {
- launchConfigs = launchManager.getLaunchConfigurations(launchConfigType);
- } catch (CoreException e) {
- // ignore
- }
-
- if (launchConfigs != null) {
- int size = launchConfigs.length;
- for (int i = 0; i < size; i++) {
- try {
- String serverId =
launchConfigs[i].getAttribute(AbstractJBossLaunchConfigType.SERVER_ID, (String) null);
- if (server.getId().equals(serverId)) {
- ILaunchConfigurationWorkingCopy wc = launchConfigs[i].getWorkingCopy();
- return wc;
- }
- } catch (CoreException e) {
- }
- }
- }
-
- // create a new launch configuration
- String launchName = getValidLaunchConfigurationName(server.getName());
- launchName = launchManager.generateUniqueLaunchConfigurationNameFrom(launchName);
- ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, launchName);
- wc.setAttribute(AbstractJBossLaunchConfigType.SERVER_ID, server.getId());
- return wc;
- }
-
/* For "restore defaults" functionality */
private static final String DEFAULT_CP_PROVIDER_ID =
"org.jboss.ide.eclipse.as.core.server.internal.launch.serverClasspathProvider";
//$NON-NLS-1$
public static class JBossServerDefaultClasspathProvider extends
StandardClasspathProvider {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -18,6 +18,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import javax.swing.ProgressMonitor;
@@ -96,6 +97,19 @@
* @return a list of error status objects.
*/
public IStatus[] makeDirectoryIfRequired(IPath dir, IProgressMonitor monitor) throws
CoreException;
+
+ /**
+ * Verify whether any changes made require a module restart
+ * @return
+ */
+ public boolean shouldRestartModule();
+
+ /**
+ * For touching / updating timestamp
+ * @param path
+ * @return
+ */
+ public IStatus[] touchResource(IPath path);
}
public static class LocalCopyCallback implements IPublishCopyCallbackHandler {
@@ -120,14 +134,9 @@
return shouldRestartModule;
}
- private void checkRestartModule(File file) {
- if( file.getName().toLowerCase().endsWith(".jar")) //$NON-NLS-1$
- shouldRestartModule = true;
- }
-
public IStatus[] copyFile(IModuleFile mf, IPath relativePath, IProgressMonitor monitor)
throws CoreException {
File file = PublishUtil.getFile(mf);
- checkRestartModule(file);
+ shouldRestartModule |= checkRestartModule(file);
if( file != null ) {
InputStream in = null;
try {
@@ -422,6 +431,13 @@
deployRootFolder.append(relativeDir).toFile().mkdirs();
return new IStatus[] {Status.OK_STATUS};
}
+
+ public IStatus[] touchResource(IPath path) {
+ File tmp = deployRootFolder.append(path).toFile();
+ if( tmp.exists())
+ tmp.setLastModified(new Date().getTime());
+ return null;
+ }
}
@@ -604,4 +620,11 @@
for (int i = 0; i < size; i++)
list.add(a[i]);
}
+
+ public static boolean checkRestartModule(File file) {
+ if( file.getName().toLowerCase().endsWith(".jar")) //$NON-NLS-1$
+ return true;
+ return false;
+ }
+
}
\ No newline at end of file
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ArgsUtil.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -110,6 +110,7 @@
}
public static String setArg(String allArgs, String shortOpt, String longOpt, String
value, boolean addQuotes ) {
+ String originalValue = value;
if( addQuotes )
value = QUOTE + value + QUOTE;
boolean found = false;
@@ -120,8 +121,15 @@
args[i+1] = value;
retVal += args[i] + SPACE + args[++i] + SPACE;
found = true;
- } else if( longOpt != null && args[i].startsWith(longOpt + EQ)) {
- args[i] = longOpt + EQ + value;
+ } else if( longOpt != null &&
+ (args[i].startsWith(longOpt + EQ) || args[i].startsWith(QUOTE + longOpt + EQ))) {
+ String newVal = null;
+ if( args[i].startsWith(QUOTE)) {
+ newVal = QUOTE + longOpt + EQ + originalValue + QUOTE;
+ } else {
+ newVal = longOpt + EQ + value;
+ }
+ args[i] = newVal;
retVal += args[i] + SPACE;
found = true;
} else {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -30,6 +30,7 @@
public static final String TWIDDLE_JAR = "twiddle.jar"; //$NON-NLS-1$
public static final String SHUTDOWN_JAR = "shutdown.jar"; //$NON-NLS-1$
+ public static final String SHUTDOWN_SH = "shutdown.sh"; //$NON-NLS-1$
public static final String START_JAR = "run.jar"; //$NON-NLS-1$
public static final String TOOLS_JAR = "tools.jar"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF 2010-09-02
00:58:45 UTC (rev 24635)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/META-INF/MANIFEST.MF 2010-09-02
05:34:36 UTC (rev 24636)
@@ -20,7 +20,9 @@
org.eclipse.wst.common.emfworkbench.integration,
org.eclipse.jem.util,
org.jboss.ide.eclipse.archives.webtools,
- org.eclipse.debug.core
+ org.eclipse.debug.core,
+ org.eclipse.jdt.launching,
+ org.eclipse.rse.subsystems.shells.core;bundle-version="3.1.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.jboss.ide.eclipse.as.rse.core
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEBehaviourDelegate.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -1,24 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * TODO: Logging and Progress Monitors
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossBehaviourDelegate;
public class RSEBehaviourDelegate extends AbstractJBossBehaviourDelegate {
@Override
public void stop(boolean force) {
- // TODO Auto-generated method stub
-
+ if( force ) {
+ getActualBehavior().setServerStopped();
+ return;
+ }
+ RSELaunchDelegate.launchStopServerCommand(getActualBehavior());
}
-
- @Override
- public void setupLaunchConfiguration(
- ILaunchConfigurationWorkingCopy workingCopy,
- IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }
-
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -1,6 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * TODO: Logging and Progress Monitors
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -19,6 +32,8 @@
public void start(BundleContext bundleContext) throws Exception {
RSECorePlugin.context = bundleContext;
JBossServerBehavior.addDelegateMapping(RSEPublishMethod.RSE_ID,
RSEBehaviourDelegate.class);
+ JBossServerStartupLaunchConfiguration.addLaunchDelegateMapping(RSEPublishMethod.RSE_ID,
new RSELaunchDelegate());
+ JBossServerStartupLaunchConfiguration.addSetupLaunchParticipant(new
RSELaunchDelegate());
}
/*
Added:
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
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * TODO: Logging and Progress Monitors
+ ******************************************************************************/
+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.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.shells.IHostOutput;
+import org.eclipse.rse.services.shells.IHostShell;
+import org.eclipse.rse.services.shells.IHostShellChangeEvent;
+import org.eclipse.rse.services.shells.IHostShellOutputListener;
+import org.eclipse.rse.services.shells.IShellService;
+import
org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IShellServiceSubSystem;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.IStartLaunchSetupParticipant;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration.StartLaunchDelegate;
+import
org.jboss.ide.eclipse.as.core.server.internal.launch.LocalJBossServerStartupLaunchUtil;
+import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+
+public class RSELaunchDelegate implements StartLaunchDelegate,
IStartLaunchSetupParticipant {
+
+ public static final String RSE_STARTUP_COMMAND =
"org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate.STARTUP_COMMAND";
+ public static final String RSE_SHUTDOWN_COMMAND =
"org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate.SHUTDOWN_COMMAND";
+
+ public void actualLaunch(
+ JBossServerStartupLaunchConfiguration launchConfig,
+ ILaunchConfiguration configuration, String mode, ILaunch launch,
+ IProgressMonitor monitor) throws CoreException {
+ JBossServerBehavior beh =
LocalJBossServerStartupLaunchUtil.getServerBehavior(configuration);
+ beh.setServerStarting();
+ String command = configuration.getAttribute(RSE_STARTUP_COMMAND, (String)null);
+ IShellService service = findShellService(beh);
+ try {
+ final IHostShell hs = service.runCommand("/", command, new String[]{}, new
NullProgressMonitor());
+
+ // TODO clean this shit up. It works now, and this is great, but
+ // lets handle the listener, make sure to remove it at the right time,
+ // check output for obvious errors, launch a poller, etc
+ 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]);
+ }
+ }
+ });
+ int x = 0;
+ while( x < 30000) {
+ x+=1000;
+ try {
+ Thread.sleep(1000);
+ } catch(InterruptedException ie) {
+ }
+ }
+
+ // Now launch ping thread
+ } catch(SystemMessageException sme) {
+ sme.printStackTrace();
+ }
+
+ beh.setServerStarted();
+ }
+
+ public static void launchStopServerCommand(JBossServerBehavior behaviour) {
+ behaviour.setServerStopping();
+ IPath home = new Path(RSEUtils.getRSEHomeDir(behaviour.getServer()));
+ IPath shutdown = home.append(IJBossRuntimeResourceConstants.BIN)
+ .append(IJBossRuntimeResourceConstants.SHUTDOWN_SH);
+ String hostname = behaviour.getServer().getHost();
+ JBossServer jbs = ServerConverter.getJBossServer(behaviour.getServer());
+
+ String user = jbs.getUsername();
+ String pass = jbs.getPassword();
+ IJBossRuntimeConstants rc = new IJBossRuntimeConstants() {};
+ final String command = shutdown.toString() + rc.SPACE + rc.SHUTDOWN_STOP_ARG +
rc.SPACE
+ + rc.SHUTDOWN_SERVER_ARG + rc.SPACE + hostname + rc.SPACE + rc.SHUTDOWN_USER_ARG
+ + rc.SPACE + user + rc.SPACE + rc.SHUTDOWN_PASS_ARG + rc.SPACE + pass;
+ IShellService service = findShellService(behaviour);
+ if( service != null ) {
+ final boolean[] saving = new boolean[1];
+ saving[0] = false;
+ final String[] output = new String[1];
+ output[0] = null;
+ try {
+ 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++ ) {
+ if( saving[0] ) {
+ output[0] = out[i].getString();
+ saving[0] = false;
+ hs.exit();
+ }
+ /*
+ * This is an extreme hack, because for some reason,
+ * when the command line comes back, there's an extra space
+ * "shutdown .sh"
+ */
+ String outNoSpace = out[i].getString().replaceAll(" ", "");
+ String commandNoSpace = command.replaceAll(" ", "");
+ boolean contains = outNoSpace.contains(commandNoSpace);
+ if(!saving[0] && contains)
+ saving[0] = true;
+ }
+ }
+ });
+
+ while(output[0] != null ) {
+ try {
+ Thread.sleep(200);
+ } catch(InterruptedException ie) {
+ }
+ }
+ // can log the output somewhere?
+ behaviour.setServerStopped();
+// if( output[0].contains("Exception in thread")) {
+// behaviour.setServerStopped();
+// } else {
+// // launch ping thread? Just mark it stopped and trust the server to figure it
out?
+// }
+ } catch( SystemMessageException sme) {
+ // TODO
+ sme.printStackTrace();
+ }
+ }
+ }
+
+
+ public boolean preLaunchCheck(ILaunchConfiguration configuration,
+ String mode, IProgressMonitor monitor) throws CoreException {
+ return true;
+ }
+
+ public void preLaunch(ILaunchConfiguration configuration, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ }
+
+ public void postLaunch(ILaunchConfiguration configuration, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException {
+ }
+
+ public void setupLaunchConfiguration(
+ ILaunchConfigurationWorkingCopy workingCopy, IServer server)
+ throws CoreException {
+ String rseHome = server.getAttribute(RSEUtils.RSE_SERVER_HOME_DIR, "");
+ String currentStartupCmd =
workingCopy.getAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, (String)null);
+ if( currentStartupCmd == null || "".equals(currentStartupCmd)) {
+ // initialize startup command to something reasonable
+ String currentArgs =
workingCopy.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
""); //$NON-NLS-1$
+ String currentVMArgs =
workingCopy.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
""); //$NON-NLS-1$
+
+ currentVMArgs= ArgsUtil.setArg(currentVMArgs, null,
+ IJBossRuntimeConstants.SYSPROP + IJBossRuntimeConstants.ENDORSED_DIRS,
+ new Path(rseHome).append(
+ IJBossRuntimeResourceConstants.LIB).append(
+ IJBossRuntimeResourceConstants.ENDORSED).toOSString(), true);
+
+
+ String cmd = "java " + currentVMArgs + "-classpath " +
+ new Path(rseHome).append(IJBossRuntimeResourceConstants.BIN).append(
+ IJBossRuntimeResourceConstants.START_JAR).toString() + IJBossRuntimeConstants.SPACE
+
+ IJBossRuntimeConstants.START_MAIN_TYPE + IJBossRuntimeConstants.SPACE + currentArgs
+ "&";
+ workingCopy.setAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, cmd);
+ }
+
+ String currentStopCmd =
workingCopy.getAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, (String)null);
+ if( currentStopCmd == null || "".equals(currentStopCmd)) {
+ JBossServer jbs = ServerConverter.getJBossServer(server);
+ // initialize stop command to something reasonable
+ String username = jbs.getUsername();
+ String pass = jbs.getPassword();
+
+ String stop = new
Path(rseHome).append(IJBossRuntimeResourceConstants.BIN).append(IJBossRuntimeResourceConstants.SHUTDOWN_SH).toString()
+
+ IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.SHUTDOWN_STOP_ARG +
IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.SHUTDOWN_SERVER_ARG +
+ IJBossRuntimeConstants.SPACE + server.getHost() + IJBossRuntimeConstants.SPACE +
+ IJBossRuntimeConstants.SHUTDOWN_USER_ARG + IJBossRuntimeConstants.SPACE +
+ username + IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.SHUTDOWN_PASS_ARG +
IJBossRuntimeConstants.SPACE + pass;
+ workingCopy.setAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, stop);
+ }
+ /*
+ * /usr/lib/jvm/jre/bin/java -Dprogram.name=run.sh -server -Xms1530M -Xmx1530M
+ * -XX:PermSize=425M -XX:MaxPermSize=425M -Dorg.jboss.resolver.warning=true
+ * -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
+ * -Djboss.partition.udpGroup=228.1.2.3 -Djboss.webpartition.mcast_port=45577
+ * -Djboss.hapartition.mcast_port=45566 -Djboss.ejb3entitypartition.mcast_port=43333
+ * -Djboss.ejb3sfsbpartition.mcast_port=45551 -Djboss.jvmRoute=node-10.209.183.100
+ * -Djboss.gossip_port=12001 -Djboss.gossip_refresh=5000 -Djava.awt.headless=true
+ * -Djava.net.preferIPv4Stack=true
+ * -Djava.endorsed.dirs=/opt/jboss-eap-5.1.0.Beta/jboss-as/lib/endorsed
+ * -classpath /opt/jboss-eap-5.1.0.Beta/jboss-as/bin/run.jar org.jboss.Main
+ * -c default -b 10.209.183.100
+ */
+ }
+
+ protected static IShellService findShellService(JBossServerBehavior behaviour) {
+ String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
+ IHost host = RSEUtils.findHost(connectionName);
+ ISubSystem[] systems = RSECorePlugin.getTheSystemRegistry().getSubSystems(host);
+ for( int i = 0; i < systems.length; i++ ) {
+ if( systems[i] instanceof IShellServiceSubSystem)
+ return ((IShellServiceSubSystem)systems[i]).getShellService();
+ }
+ return 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-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -88,7 +88,7 @@
this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(jbs));
this.remoteTemporaryFolder = new Path("/home/rob/redhat/tmp"); //$NON-NLS-1$
- IHost host = findHost(connectionName);
+ IHost host = RSEUtils.findHost(connectionName);
if( host != null ) {
fileSubSystem = findFileTransferSubSystem(host);
} else {
@@ -96,15 +96,6 @@
}
}
- protected IHost findHost(String connectionName) {
- IHost[] allHosts = RSECorePlugin.getTheSystemRegistry().getHosts();
- for( int i = 0; i < allHosts.length; i++ ) {
- if( allHosts[i].getAliasName().equals(connectionName))
- return allHosts[i];
- }
- return null;
- }
-
/* approved files subsystems *
ftp.files
local.files
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 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -14,16 +14,21 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.Date;
import org.eclipse.core.runtime.CoreException;
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.Status;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.files.IHostFile;
+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.publishers.PublishUtil;
+import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil;
import
org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
public class RSERemotePublishHandler implements IPublishCopyCallbackHandler {
@@ -34,9 +39,14 @@
this.root = path;
this.method = method;
}
+ private boolean shouldRestartModule = false;
+ public boolean shouldRestartModule() {
+ return shouldRestartModule;
+ }
public IStatus[] copyFile(IModuleFile mf, IPath path,
IProgressMonitor monitor) throws CoreException {
File file = PublishUtil.getFile(mf);
+ shouldRestartModule |= PublishCopyUtil.checkRestartModule(file);
IPath remotePath = root.append(path);
try {
method.getFileService().upload(file, remotePath.removeLastSegments(1).toString(),
@@ -76,5 +86,15 @@
monitor.done();
return null;
}
+
+ public IStatus[] touchResource(IPath path) {
+ IPath file = root.append(path);
+ try {
+ IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(),
new NullProgressMonitor());
+ method.getFileServiceSubSystem().setLastModified(rf, new Date().getTime(), null);
+ } catch(SystemMessageException sme) {
+ }
+ return null;
+ }
}
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-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -12,6 +12,8 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerAttributes;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
@@ -91,5 +93,13 @@
return p;
}
+ public static IHost findHost(String connectionName) {
+ IHost[] allHosts = RSECorePlugin.getTheSystemRegistry().getHosts();
+ for( int i = 0; i < allHosts.length; i++ ) {
+ if( allHosts[i].getAliasName().equals(connectionName))
+ return allHosts[i];
+ }
+ return null;
+ }
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/MANIFEST.MF
(rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/MANIFEST.MF 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Export-Package: org.jboss.ide.eclipse.as.rse.core
+Require-Bundle: org.eclipse.core.runtime,org.eclipse.rse.core,org.ecli
+ pse.rse.subsystems.files.core,org.eclipse.rse.services,org.eclipse.rs
+ e.services.files.ftp,org.eclipse.rse.services.local,org.eclipse.rse.s
+ ervices.ssh,org.jboss.ide.eclipse.as.core,org.jboss.ide.eclipse.as.wt
+ p.core,org.eclipse.wst.server.core,org.eclipse.wst.common.project.fac
+ et.core,org.eclipse.core.resources,org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.emfworkbench.integration,org.eclipse.jem.util,
+ org.jboss.ide.eclipse.archives.webtools;resolution:=optional
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.v20100816-2135-M2
+Bundle-Name: Core
+Bundle-Activator: org.jboss.ide.eclipse.as.rse.core.RSECorePlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.jboss.ide.eclipse.as.rse.core;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEJSTPublisher.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEJSTPublisher.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSESingleFilePublisher.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSESingleFilePublisher.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEUtils.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/RSEUtils.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/classes/org/jboss/ide/eclipse/as/rse/core/archives/RSEZippedJSTPublisher.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/maven-archiver/pom.properties
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/maven-archiver/pom.properties
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/maven-archiver/pom.properties 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Mon Aug 16 21:39:05 GMT+08:00 2010
+version=0.9.0-SNAPSHOT
+groupId=org.jboss.tools.as.plugins
+artifactId=org.jboss.ide.eclipse.as.rse.core
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/org.jboss.ide.eclipse.as.rse.core-0.9.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/org.jboss.ide.eclipse.as.rse.core-0.9.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2artifacts.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2artifacts.xml
(rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2artifacts.xml 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<artifacts size='1'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.ide.eclipse.as.rse.core'
version='0.9.0.v20100816-2135-M2'>
+ <properties size='6'>
+ <property name='artifact.size' value='14206'/>
+ <property name='download.size' value='14206'/>
+ <property name='download.md5'
value='68625223f4fc4bfd60ec555f42bbb9e2'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.ide.eclipse.as.rse.core'/>
+ <property name='maven-version' value='0.9.0-SNAPSHOT'/>
+ </properties>
+ </artifact>
+</artifacts>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2content.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2content.xml
(rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/target/p2content.xml 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<units size='1'>
+ <unit id='org.jboss.ide.eclipse.as.rse.core'
version='0.9.0.v20100816-2135-M2'>
+ <update id='org.jboss.ide.eclipse.as.rse.core'
range='[0.0.0,0.9.0.v20100816-2135-M2)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Core'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.ide.eclipse.as.rse.core'/>
+ <property name='maven-version' value='0.9.0-SNAPSHOT'/>
+ </properties>
+ <provides size='4'>
+ <provided namespace='org.eclipse.equinox.p2.iu'
name='org.jboss.ide.eclipse.as.rse.core'
version='0.9.0.v20100816-2135-M2'/>
+ <provided namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.rse.core'
version='0.9.0.v20100816-2135-M2'/>
+ <provided namespace='java.package'
name='org.jboss.ide.eclipse.as.rse.core' version='0.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type'
name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='16'>
+ <required namespace='osgi.bundle'
name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.rse.core'
range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.subsystems.files.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services.files.ftp' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services.local' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services.ssh' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.wtp.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.server.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.common.project.facet.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.core.resources' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.common.modulecore' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.common.emfworkbench.integration' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jem.util'
range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.archives.webtools' range='0.0.0'
optional='true'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.ide.eclipse.as.rse.core'
version='0.9.0.v20100816-2135-M2'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-Name: Core
Bundle-Version:
0.9.0.v20100816-2135-M2
Bundle-Activator:
org.jboss.ide.eclipse.as.rse.core.RSECorePlugin
Created-By: Apache
Maven
Archiver-Version: Plexus Archiver
Require-Bundle:
org.eclipse.core.runtime,org.eclipse.rse.core,org.eclipse.rse.subsystems.files.core,org.eclipse.rse.services,org.eclipse.rse.services.files.ftp,org.eclipse.rse.services.local,org.eclipse.rse.services.ssh,org.jboss.ide.eclipse.as.core,org.jboss.ide.eclipse.as.wtp.core,org.eclipse.wst.server.core,org.eclipse.wst.common.project.facet.core,org.eclipse.core.resources,org.eclipse.wst.common.modulecore,org.eclipse.wst.common.emfworkbench.integration,org.eclipse.jem.util,org.jboss.ide.eclipse.archives.webtools;resolution:=optional
Export-Package:
org.jboss.ide.eclipse.as.rse.core
Bundle-SymbolicName:
org.jboss.ide.eclipse.as.rse.core;singleton:=true
Built-By:
rob
Manifest-Version: 1.0
Build-Jdk:
1.6.0_14
Bundle-ActivationPolicy: lazy!

Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment:
JavaSE-1.6

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+</units>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF 2010-09-02
00:58:45 UTC (rev 24635)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/META-INF/MANIFEST.MF 2010-09-02
05:34:36 UTC (rev 24636)
@@ -24,6 +24,7 @@
org.jboss.ide.eclipse.as.ui,
org.eclipse.rse.files.ui,
org.eclipse.rse.ui,
- org.eclipse.wst.server.ui
+ org.eclipse.wst.server.ui,
+ org.eclipse.debug.ui;bundle-version="3.6.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,90 @@
+package org.jboss.ide.eclipse.as.rse.ui;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.ide.eclipse.as.rse.core.RSELaunchDelegate;
+import org.jboss.ide.eclipse.as.ui.UIUtil;
+import
org.jboss.ide.eclipse.as.ui.launch.JBossLaunchConfigurationTabGroup.IJBossLaunchTabProvider;
+
+public class RSELaunchTabProvider implements IJBossLaunchTabProvider {
+
+ public ILaunchConfigurationTab[] createTabs() {
+ return new ILaunchConfigurationTab[]{
+ new RSERemoteLaunchTab()
+ };
+ }
+
+
+ public static class RSERemoteLaunchTab extends AbstractLaunchConfigurationTab {
+
+ private Text startText;
+ private Text stopText;
+ public void createControl(Composite parent) {
+ createUI(parent);
+ addListeners();
+ }
+
+ public void createUI(Composite parent) {
+ Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_HORIZONTAL);
+ setControl(comp);
+ comp.setLayout(new FormLayout());
+ Group startGroup = new Group(comp, SWT.NONE);
+ startGroup.setText("Start Command");
+ FormData data = UIUtil.createFormData2(0, 5, 0, 75, 0, 5, 100, -5);
+ startGroup.setLayoutData(data);
+ startGroup.setLayout(new FormLayout());
+ startText = new Text(startGroup, SWT.BORDER | SWT.MULTI | SWT.WRAP);
+ data = UIUtil.createFormData2(0, 5, 100, -5, 0, 5, 100, -5);
+ startText.setLayoutData(data);
+
+ Group stopGroup = new Group(comp, SWT.NONE);
+ stopGroup.setText("Stop Command");
+ data = UIUtil.createFormData2(startGroup, 5, startGroup, 150, 0, 5, 100, -5);
+ stopGroup.setLayoutData(data);
+ stopGroup.setLayout(new FormLayout());
+ stopText = new Text(stopGroup, SWT.BORDER | SWT.MULTI | SWT.WRAP);
+ data = UIUtil.createFormData2(0, 5, 100, -5, 0, 5, 100, -5);
+ stopText.setLayoutData(data);
+ }
+
+ protected void addListeners() {
+ }
+
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ }
+
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ try {
+ String startCommand =
configuration.getAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND, "");
+ startText.setText(startCommand);
+
+ String stopCommand =
configuration.getAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND, "");
+ stopText.setText(stopCommand);
+ } catch( CoreException ce) {
+ // TODO
+ }
+ }
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(RSELaunchDelegate.RSE_STARTUP_COMMAND,
startText.getText());
+ configuration.setAttribute(RSELaunchDelegate.RSE_SHUTDOWN_COMMAND,
stopText.getText());
+ }
+ public String getName() {
+ return "RSE Remote Launch";
+ }
+
+ }
+}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -2,6 +2,7 @@
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
import org.jboss.ide.eclipse.as.ui.editor.DeploymentModuleOptionCompositeAssistant;
+import org.jboss.ide.eclipse.as.ui.launch.JBossLaunchConfigurationTabGroup;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -20,6 +21,7 @@
public void start(BundleContext bundleContext) throws Exception {
RSEUIPlugin.context = bundleContext;
DeploymentModuleOptionCompositeAssistant.addMapping(RSEPublishMethod.RSE_ID, new
RSEDeploymentPageCallback());
+ JBossLaunchConfigurationTabGroup.addTabProvider(new RSELaunchTabProvider());
}
/*
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/MANIFEST.MF
(rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/MANIFEST.MF 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,org.eclipse.ui,org.eclipse.rs
+ e.core,org.eclipse.rse.subsystems.files.core,org.eclipse.rse.services
+ ,org.eclipse.rse.services.files.ftp,org.eclipse.rse.services.local,or
+ g.eclipse.rse.services.ssh,org.jboss.ide.eclipse.as.core,org.jboss.id
+
e.eclipse.as.wtp.core,org.eclipse.wst.server.core,org.eclipse.wst.com
+
mon.project.facet.core,org.eclipse.core.resources,org.eclipse.wst.com
+ mon.modulecore,org.eclipse.wst.common.emfworkbench.integration,org.ec
+ lipse.jem.util,org.jboss.ide.eclipse.as.rse.core,org.jboss.ide.eclips
+ e.as.ui,org.eclipse.rse.files.ui,org.eclipse.rse.ui,org.eclipse.wst.s
+ erver.ui
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.9.0.v20100816-2135-M2
+Bundle-Name: Ui
+Bundle-Activator: org.jboss.ide.eclipse.as.rse.ui.RSEUIPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.jboss.ide.eclipse.as.rse.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPageCallback.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPageCallback.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$1.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$1.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$2.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$2.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$3.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$3.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$4.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$4.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$CustomSystemHostCombo$1.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$CustomSystemHostCombo$1.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$CustomSystemHostCombo.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite$CustomSystemHostCombo.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI$RSEDeploymentPreferenceComposite.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.class
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/classes/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/maven-archiver/pom.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/maven-archiver/pom.properties
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/maven-archiver/pom.properties 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Mon Aug 16 21:39:13 GMT+08:00 2010
+version=0.9.0-SNAPSHOT
+groupId=org.jboss.tools.as.plugins
+artifactId=org.jboss.ide.eclipse.as.rse.ui
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/org.jboss.ide.eclipse.as.rse.ui-0.9.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/org.jboss.ide.eclipse.as.rse.ui-0.9.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2artifacts.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2artifacts.xml
(rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2artifacts.xml 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<artifacts size='1'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.ide.eclipse.as.rse.ui'
version='0.9.0.v20100816-2135-M2'>
+ <properties size='6'>
+ <property name='artifact.size' value='16350'/>
+ <property name='download.size' value='16350'/>
+ <property name='download.md5'
value='f84cb1ab7b70e613b22cfe2e08fcc3b7'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.ide.eclipse.as.rse.ui'/>
+ <property name='maven-version' value='0.9.0-SNAPSHOT'/>
+ </properties>
+ </artifact>
+</artifacts>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2content.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2content.xml
(rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/target/p2content.xml 2010-09-02
05:34:36 UTC (rev 24636)
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<units size='1'>
+ <unit id='org.jboss.ide.eclipse.as.rse.ui'
version='0.9.0.v20100816-2135-M2'>
+ <update id='org.jboss.ide.eclipse.as.rse.ui'
range='[0.0.0,0.9.0.v20100816-2135-M2)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='Ui'/>
+ <property name='maven-groupId'
value='org.jboss.tools.as.plugins'/>
+ <property name='maven-artifactId'
value='org.jboss.ide.eclipse.as.rse.ui'/>
+ <property name='maven-version' value='0.9.0-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu'
name='org.jboss.ide.eclipse.as.rse.ui'
version='0.9.0.v20100816-2135-M2'/>
+ <provided namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.rse.ui'
version='0.9.0.v20100816-2135-M2'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type'
name='bundle' version='1.0.0'/>
+ </provides>
+ <requires size='21'>
+ <required namespace='osgi.bundle'
name='org.eclipse.core.runtime' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.ui'
range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.rse.core'
range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.subsystems.files.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services.files.ftp' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services.local' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.services.ssh' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.wtp.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.server.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.common.project.facet.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.core.resources' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.common.modulecore' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.common.emfworkbench.integration' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.jem.util'
range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.rse.core' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.jboss.ide.eclipse.as.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.rse.files.ui' range='0.0.0'/>
+ <required namespace='osgi.bundle' name='org.eclipse.rse.ui'
range='0.0.0'/>
+ <required namespace='osgi.bundle'
name='org.eclipse.wst.server.ui' range='0.0.0'/>
+ </requires>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle'
id='org.jboss.ide.eclipse.as.rse.ui'
version='0.9.0.v20100816-2135-M2'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Name:
Ui
Created-By: Apache Maven
Bundle-Activator:
org.jboss.ide.eclipse.as.rse.ui.RSEUIPlugin
Manifest-Version:
1.0
Bundle-ActivationPolicy: lazy
Bundle-SymbolicName:
org.jboss.ide.eclipse.as.rse.ui;singleton:=true
Bundle-ManifestVersion:
2
Build-Jdk: 1.6.0_14
Archiver-Version: Plexus
Archiver
Bundle-Version: 0.9.0.v20100816-2135-M2
Built-By:
rob
Require-Bundle:
org.eclipse.core.runtime,org.eclipse.ui,org.eclipse.rse.core,org.eclipse.rse.subsystems.files.core,org.eclipse.rse.services,org.eclipse.rse.services.files.ftp,org.eclipse.rse.services.local,org.eclipse.rse.services.ssh,org.jboss.ide.eclipse.as.core,org.jboss.ide.eclipse.as.wtp.core,org.eclipse.wst.server.core,org.eclipse.wst.common.project.facet.core,org.eclipse.core.resources,org.eclipse.wst.common.modulecore,org.eclipse.wst.common.emfworkbench.integration,org.eclipse.jem.util,org.jboss.ide.eclipse.as.!
rse.core,org.jboss.ide.eclipse.as.ui,org.eclipse.rse.files.ui,org.eclipse.rse.ui,org.eclipse.wst.server.ui

+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+</units>
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHCopyCallback.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHCopyCallback.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHCopyCallback.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -19,6 +19,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.model.IModuleFile;
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;
import org.jboss.ide.eclipse.as.ssh.server.SSHServerBehaviourDelegate.SSHPublishMethod;
@@ -32,10 +33,15 @@
this.root = deployRoot;
this.method = method;
}
-
+ private boolean shouldRestartModule = false;
+ public boolean shouldRestartModule() {
+ return shouldRestartModule;
+ }
+
public IStatus[] copyFile(IModuleFile mf, IPath path,
IProgressMonitor monitor) throws CoreException {
File sourceFile = PublishUtil.getFile(mf);
+ shouldRestartModule |= PublishCopyUtil.checkRestartModule(sourceFile);
IPath destination = root.append(path);
String parentFolder = destination.removeLastSegments(1).toString();
SSHCommandUtil.launchCommand(getSession(), "mkdir -p " + parentFolder, new
NullProgressMonitor());
@@ -66,4 +72,9 @@
}
return new IStatus[] {};
}
+
+ public IStatus[] touchResource(IPath path) {
+ // not implemented
+ return null;
+ }
}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-09-02 00:58:45
UTC (rev 24635)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-09-02 05:34:36
UTC (rev 24636)
@@ -56,8 +56,9 @@
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.dialogs,
+ org.jboss.ide.eclipse.as.ui.editor,
+ org.jboss.ide.eclipse.as.ui.launch,
org.jboss.ide.eclipse.as.ui.views.server.extensions,
- org.jboss.ide.eclipse.as.ui.editor,
org.jboss.ide.eclipse.as.ui.wizards,
org.jboss.tools.as.wst.server.ui.xpl
Bundle-Activator: org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2010-09-02
00:58:45 UTC (rev 24635)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2010-09-02
05:34:36 UTC (rev 24636)
@@ -21,6 +21,9 @@
*/
package org.jboss.ide.eclipse.as.ui.launch;
+import java.util.ArrayList;
+import java.util.Iterator;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
@@ -53,19 +56,52 @@
public class JBossLaunchConfigurationTabGroup extends
AbstractLaunchConfigurationTabGroup {
+ /*
+ * Unfortunately the jdt api does not allow me to add a set number
+ * of tabs based on what is in the launch configuration already.
+ * Each server type / launch config type must have a standard set of tabs.
+ * This means that even a standard jboss server must have all tabs that might
+ * be used, whether they are used now or not.
+ * Ex - if RSE is installed, all jboss servers need an RSE start / stop command tab
+ */
+
+ public static interface IJBossLaunchTabProvider {
+ public ILaunchConfigurationTab[] createTabs();
+ }
+ public static ArrayList<IJBossLaunchTabProvider> providers =
+ new ArrayList<IJBossLaunchTabProvider>();
+ static {
+ providers.add(new JBossStandardTabProvider());
+ }
+ public static void addTabProvider(IJBossLaunchTabProvider provider) {
+ providers.add(provider);
+ }
+
+ public static class JBossStandardTabProvider implements IJBossLaunchTabProvider {
+ public ILaunchConfigurationTab[] createTabs() {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new JavaArgumentsTabExtension(),
+ new JavaMainTabExtension(),
+ new JavaClasspathTab(),
+ new SourceLookupTab(),
+ new EnvironmentTab(),
+ new CommonTab()
+ };
+ return tabs;
+ }
+ }
+
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new JavaArgumentsTabExtension(),
- new JavaMainTabExtension(),
- new JavaClasspathTab(),
- new SourceLookupTab(),
- new EnvironmentTab(),
- new CommonTab()
- };
-
- for( int i = 0; i < tabs.length; i++ )
- tabs[i].setLaunchConfigurationDialog(dialog);
- setTabs(tabs);
+ Iterator<IJBossLaunchTabProvider> i = providers.iterator();
+ ArrayList<ILaunchConfigurationTab> tabs = new
ArrayList<ILaunchConfigurationTab>();
+ while(i.hasNext()) {
+ ILaunchConfigurationTab[] tabs2 = i.next().createTabs();
+ for( int j = 0; j < tabs2.length; j++ ) {
+ tabs2[j].setLaunchConfigurationDialog(dialog);
+ tabs.add(tabs2[j]);
+ }
+ }
+ setTabs(tabs.toArray(new ILaunchConfigurationTab[tabs.size()]));
}
public static Composite createComposite(Composite parent, Font font, int columns, int
hspan, int fill) {
@@ -79,7 +115,7 @@
}
- public class JavaMainTabExtension extends JavaMainTabClone {
+ public static class JavaMainTabExtension extends JavaMainTabClone {
public void createControl(Composite parent) {
Composite comp = createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_BOTH);
((GridLayout)comp.getLayout()).verticalSpacing = 0;
@@ -114,7 +150,7 @@
}
- public class JavaArgumentsTabExtension extends JavaArgumentsTab {
+ public static class JavaArgumentsTabExtension extends JavaArgumentsTab {
private String originalHost=null;
private String originalConf=null;
public void initializeFrom(ILaunchConfiguration configuration) {