JBoss Tools SVN: r24638 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-09-02 05:04:29 -0400 (Thu, 02 Sep 2010)
New Revision: 24638
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-6973 - http poller added! :D
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/WebPortPoller.java 2010-09-02 09:04:29 UTC (rev 24638)
@@ -0,0 +1,103 @@
+package org.jboss.ide.eclipse.as.core.extensions.polling;
+
+import java.io.FileNotFoundException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+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.ServerStatePollerType;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+
+public class WebPortPoller implements IServerStatePoller {
+
+ private IServer server;
+ private ServerStatePollerType type;
+ private boolean canceled, done;
+ private boolean state;
+
+
+ public void beginPolling(IServer server, boolean expectedState,
+ PollThread pt) {
+ this.server = server;
+ canceled = done = false;
+ state = SERVER_DOWN;
+ launchThread();
+ }
+
+ protected void launchThread() {
+ Thread t = new Thread(new Runnable(){
+ public void run() {
+ pollerRun();
+ }
+ }, "Web Poller"); //$NON-NLS-1$
+ t.start();
+ }
+
+ public void pollerRun() {
+ done = false;
+ String url = "http://"+getServer().getHost(); //$NON-NLS-1$
+ JBossServer jbs = ServerConverter.getJBossServer(server);
+ int port = jbs.getJBossWebPort();
+ url += ":" + port; //$NON-NLS-1$
+
+ while(!canceled && !done) {
+ try {
+ URL pingUrl = new URL(url);
+ URLConnection conn = pingUrl.openConnection();
+ ((HttpURLConnection)conn).getResponseCode();
+ done = true;
+ state = SERVER_UP;
+ } catch( FileNotFoundException fnfe ) {
+ done = true;
+ state = SERVER_UP;
+ } catch( Exception e) {
+ }
+ }
+ }
+
+ public ServerStatePollerType getPollerType() {
+ return type;
+ }
+
+ public void setPollerType(ServerStatePollerType type) {
+ this.type = type;
+ }
+
+ public IServer getServer() {
+ return server;
+ }
+
+ public boolean isComplete() throws PollingException, RequiresInfoException {
+ return done;
+ }
+
+ public boolean getState() throws PollingException, RequiresInfoException {
+ return state;
+ }
+
+ public void cleanup() {
+ }
+
+ public List<String> getRequiredProperties() {
+ return new ArrayList<String>();
+ }
+
+ public void failureHandled(Properties properties) {
+ }
+
+ public void cancel(int type) {
+ canceled = true;
+ }
+
+ public int getTimeoutBehavior() {
+ return TIMEOUT_BEHAVIOR_FAIL;
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-09-02 05:40:58 UTC (rev 24637)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-09-02 09:04:29 UTC (rev 24638)
@@ -590,7 +590,7 @@
id="org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller"
name="JMX Poller"
supportsStartup="true"
- supportsShutdown="false"/>
+ supportsShutdown="true"/>
<serverPoller
class="org.jboss.ide.eclipse.as.core.extensions.polling.ProcessTerminatedPoller"
id="org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller"
@@ -598,6 +598,13 @@
supportsShutdown="true"
supportsStartup="false">
</serverPoller>
+ <serverPoller
+ class="org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller"
+ id="org.jboss.ide.eclipse.as.core.runtime.server.WebPoller"
+ name="Web Port Poller"
+ supportsShutdown="true"
+ supportsStartup="true">
+ </serverPoller>
</extension>
15 years, 1 month
JBoss Tools SVN: r24637 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-09-02 01:40:58 -0400 (Thu, 02 Sep 2010)
New Revision: 24637
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.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
Log:
JBDS-1103 - item 3) update folder timestamp if descriptor does not exist
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 05:34:36 UTC (rev 24636)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-09-02 05:40:58 UTC (rev 24637)
@@ -434,8 +434,9 @@
public IStatus[] touchResource(IPath path) {
File tmp = deployRootFolder.append(path).toFile();
- if( tmp.exists())
- tmp.setLastModified(new Date().getTime());
+ if( !tmp.exists())
+ tmp = deployRootFolder.toFile();
+ tmp.setLastModified(new Date().getTime());
return null;
}
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 05:34:36 UTC (rev 24636)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2010-09-02 05:40:58 UTC (rev 24637)
@@ -91,6 +91,9 @@
IPath file = root.append(path);
try {
IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
+ if( !rf.exists()) {
+ rf = method.getFileServiceSubSystem().getRemoteFileObject(root.toString(), new NullProgressMonitor());
+ }
method.getFileServiceSubSystem().setLastModified(rf, new Date().getTime(), null);
} catch(SystemMessageException sme) {
}
15 years, 1 month
JBoss Tools SVN: r24636 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 33 other directories.
by jbosstools-commits@lists.jboss.org
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) {
15 years, 1 month
JBoss Tools SVN: r24635 - in trunk/documentation/whatsnew: teiid and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-09-01 20:58:45 -0400 (Wed, 01 Sep 2010)
New Revision: 24635
Modified:
trunk/documentation/whatsnew/index.html
trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.M2.html
Log:
https://jira.jboss.org/browse/JBIDE-6886 Create "New and Noteworthy" for 3.2.0.M2
added modeshape news in index.html
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2010-09-02 00:14:10 UTC (rev 24634)
+++ trunk/documentation/whatsnew/index.html 2010-09-02 00:58:45 UTC (rev 24635)
@@ -41,6 +41,7 @@
<!--p><a href="deltacloud/deltacloud-news-1.0.0.M2.html">Deltacloud Development Tools</a></p-->
<p><a href="gwt/gwt-news-1.0.0.M2.html">GWT Integration</a></p>
<p><a href="teiid/teiid-news-7.1.0.M2.html">Teiid Tools</a></p>
+ <p><a href="modeshape/modeshape-news-7.1.0.M2.html">Modeshape</a></p>
</td>
</tr>
Modified: trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.M2.html
===================================================================
--- trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.M2.html 2010-09-02 00:14:10 UTC (rev 24634)
+++ trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.M2.html 2010-09-02 00:58:45 UTC (rev 24635)
@@ -10,7 +10,7 @@
</head>
<body>
<h1>Teiid Designer 7.1.0 M2 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../modeshape/modeshape-news-7.1.0.M2.html">Modeshape ></a></p>
<p>Last revised August 26, 2010</p>
<p><b>Teiid Designer</b>, which is new to JBoss Tools,
is a graphical data modeling tool that enables rapid definition, integration, management and testing of data services without
15 years, 1 month
JBoss Tools SVN: r24634 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-09-01 20:14:10 -0400 (Wed, 01 Sep 2010)
New Revision: 24634
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
2010-09-01 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java: New file.
* src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java: Add a constant
for default key directory.
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (..run): Fix to getInstances,
not getImages.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (.widgetSelected):
Open ManageKeysDialog when Manage button is pressed.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new
messages.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-09-02 00:12:04 UTC (rev 24633)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-09-02 00:14:10 UTC (rev 24634)
@@ -1,3 +1,17 @@
+2010-09-01 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java: New file.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java: New file.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java: New file.
+ * src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java: Add a constant
+ for default key directory.
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (..run): Fix to getInstances,
+ not getImages.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (.widgetSelected):
+ Open ManageKeysDialog when Manage button is pressed.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new
+ messages.
+
2010-08-30 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/Activator.java: Add Copyright and License info.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java 2010-09-02 00:12:04 UTC (rev 24633)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java 2010-09-02 00:14:10 UTC (rev 24634)
@@ -14,5 +14,6 @@
public final static String DONT_CONFIRM_CREATE_INSTANCE = "dont_confirm_create_instance"; //$NON-NLS-1$
public final static String LAST_EC2_KEYNAME = "last_ec2_keyname"; //$NON-NLS-1$
+ public final static String DEFAULT_KEY_DIR = "default_key_directory"; //$NON-NLS-1$
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-09-02 00:12:04 UTC (rev 24633)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-09-02 00:14:10 UTC (rev 24634)
@@ -411,7 +411,7 @@
@Override
public void run() {
if (currCloud != null) {
- currCloud.getImages();
+ currCloud.getInstances();
}
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java 2010-09-02 00:14:10 UTC (rev 24634)
@@ -0,0 +1,27 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+public class CustomWizardDialog extends WizardDialog {
+
+ private String finishText;
+
+ public CustomWizardDialog(Shell parentShell, IWizard newWizard, String finishText) {
+ super(parentShell, newWizard);
+ this.finishText = finishText;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+ // All we want to do is override the text for the finish button
+ Button finishButton = getButton(IDialogConstants.FINISH_ID);
+ finishButton.setText(finishText);
+ }
+
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeys.java 2010-09-02 00:14:10 UTC (rev 24634)
@@ -0,0 +1,43 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+
+public class ManageKeys extends Wizard {
+
+ private DeltaCloud cloud;
+ private String fileExtension;
+ private ManageKeysPage mainPage;
+ private String keyname;
+
+ public ManageKeys(DeltaCloud cloud, String fileExtension) {
+ this.cloud = cloud;
+ this.fileExtension = fileExtension;
+ }
+
+ public String getKeyName() {
+ return keyname;
+ }
+
+ @Override
+ public void addPages() {
+ // TODO Auto-generated method stub
+ mainPage = new ManageKeysPage(cloud, fileExtension);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ String currFile = mainPage.getCurrFile();
+ keyname = currFile.substring(0,
+ currFile.length() - fileExtension.length());
+ // TODO Auto-generated method stub
+ return true;
+ }
+
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2010-09-02 00:14:10 UTC (rev 24634)
@@ -0,0 +1,275 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.ui.Activator;
+import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
+import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+import org.osgi.service.prefs.Preferences;
+
+public class ManageKeysPage extends WizardPage {
+
+ private final static String NAME = "ManageKeys.name"; //$NON-NLS-1$
+ private final static String TITLE = "ManageKeys.title"; //$NON-NLS-1$
+ private final static String DESC = "ManageKeys.desc"; //$NON-NLS-1$
+ private final static String DIR_LABEL = "Directory.label"; //$NON-NLS-1$
+ private final static String BROWSE_LABEL = "BrowseButton.label"; //$NON-NLS-1$
+ private final static String NEW = "NewButton.label"; //$NON-NLS-1$
+ private final static String DELETE = "DeleteButton.label"; //$NON-NLS-1$
+ private final static String CREATE_KEY_TITLE = "CreateKey.title"; //$NON-NLS-1$
+ private final static String CREATE_KEY_MSG = "CreateKey.msg"; //$NON-NLS-1$
+ private final static String CONFIRM_KEY_DELETE_TITLE = "ConfirmKeyDelete.title"; //$NON-NLS-1$
+ private final static String CONFIRM_KEY_DELETE_MSG = "ConfirmKeyDelete.msg"; //$NON-NLS-1$
+
+ private final static String INVALID_DIRECTORY = "ErrorInvalidDirectory.text"; //$NON-NLS-1$
+
+ private DeltaCloud cloud;
+ private String fileExtension;
+ private String currFile;
+
+ private Text directory;
+ private List fileList;
+
+ private ModifyListener dirListener = new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ // TODO Auto-generated method stub
+ validate();
+ }
+
+ };
+
+ private SelectionListener browseButtonListener = new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Display display = Display.getDefault();
+ Shell shell = new Shell(display);
+ DirectoryDialog d = new DirectoryDialog(shell);
+ String text = d.open();
+ if (text != null)
+ directory.setText(text);
+ }
+
+ };
+
+ private SelectionListener createButtonListener = new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Display display = Display.getDefault();
+ Shell shell = new Shell(display);
+ String directoryText = directory.getText();
+ InputDialog d = new InputDialog(shell, WizardMessages.getString(CREATE_KEY_TITLE),
+ WizardMessages.getString(CREATE_KEY_MSG),
+ "",
+ null);
+ d.setBlockOnOpen(true);
+ d.create();
+ int retcode = d.open();
+ if (retcode == InputDialog.OK) {
+ String keyname = d.getValue();
+ try {
+ cloud.createKey(keyname, directoryText);
+ loadFileList();
+ } catch (DeltaCloudException dce) {
+ MessageDialog.openError(getShell(), null, dce.getLocalizedMessage());
+ }
+ }
+ }
+
+ };
+
+ private SelectionListener fileListListener = new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ currFile = fileList.getSelection()[0];
+ }
+
+ };
+
+ private FilenameFilter extensionFilter = new FilenameFilter() {
+
+ @Override
+ public boolean accept(File arg0, String arg1) {
+ if (arg1.endsWith(fileExtension))
+ return true;
+ return false;
+ }
+
+ };
+
+ public ManageKeysPage(DeltaCloud cloud, String fileExtension) {
+ super(WizardMessages.getString(NAME));
+ this.cloud = cloud;
+ this.fileExtension = fileExtension;
+ setDescription(WizardMessages.getString(DESC));
+ setTitle(WizardMessages.getString(TITLE));
+ setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
+ setPageComplete(false);
+ }
+
+ public String getCurrFile() {
+ return currFile;
+ }
+
+ private void validate() {
+ boolean hasError = false;
+ boolean isComplete = true;
+
+ if (directory.getText().length() == 0)
+ isComplete = false;
+ else {
+ File f = new File(directory.getText());
+ if (!f.exists() || !f.isDirectory()) {
+ hasError = true;
+ setErrorMessage(WizardMessages.getString(INVALID_DIRECTORY));
+ } else {
+ loadFileList();
+ }
+ }
+ if (!hasError)
+ setErrorMessage(null);
+ setPageComplete(isComplete && !hasError);
+ }
+
+ private void loadFileList() {
+ File dir = new File(directory.getText());
+ if (dir.exists() && dir.isDirectory()) {
+ File[] files = dir.listFiles(extensionFilter);
+ fileList.removeAll();
+ for (File f : files) {
+ fileList.add(f.getName());
+ }
+ }
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ // TODO Auto-generated method stub
+ final Composite container = new Composite(parent, SWT.NULL);
+ FormLayout layout = new FormLayout();
+ layout.marginHeight = 5;
+ layout.marginWidth = 5;
+ container.setLayout(layout);
+
+ Label dirLabel = new Label(container, SWT.NULL);
+ dirLabel.setText(WizardMessages.getString(DIR_LABEL));
+
+ directory = new Text(container, SWT.BORDER | SWT.SINGLE);
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ String defaultDir = prefs.get(IDeltaCloudPreferenceConstants.DEFAULT_KEY_DIR, System.getProperty("user.home"));
+ directory.setText(defaultDir);
+ directory.addModifyListener(dirListener);
+
+ Button browseButton = new Button(container, SWT.NULL);
+ browseButton.setText(WizardMessages.getString(BROWSE_LABEL));
+ browseButton.addSelectionListener(browseButtonListener);
+
+ fileList = new List(container, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL);
+ fileList.addSelectionListener(fileListListener);
+
+ Button createButton = new Button(container, SWT.NULL);
+ createButton.setText(WizardMessages.getString(NEW));
+ createButton.addSelectionListener(createButtonListener);
+
+ Button deleteButton = new Button(container, SWT.NULL);
+ deleteButton.setText(WizardMessages.getString(DELETE));
+ deleteButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ final String keyName = fileList.getSelection()[0];
+ boolean confirmed = MessageDialog.openConfirm(getShell(),
+ WizardMessages.getString(CONFIRM_KEY_DELETE_TITLE),
+ WizardMessages.getFormattedString(CONFIRM_KEY_DELETE_MSG, keyName));
+ if (confirmed) {
+ try {
+ cloud.deleteKey(keyName.substring(0, keyName.length() - fileExtension.length()));
+ File f = new File(directory.getText());
+ File[] files = f.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.equals(keyName);
+ }
+ });
+ if (files.length == 1) {
+ if (files[0].delete())
+ fileList.remove(fileList.getSelectionIndex());
+ }
+ } catch (DeltaCloudException dce) {
+ MessageDialog.openError(getShell(), null, dce.getLocalizedMessage());
+ }
+ }
+ }
+ });
+
+ FormData f = new FormData();
+ f.left = new FormAttachment(0, 5);
+ f.top = new FormAttachment(0, 8);
+ dirLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.right = new FormAttachment(100, -10);
+ f.top = new FormAttachment(0, 5);
+ browseButton.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(dirLabel, 5);
+ f.top = new FormAttachment(0, 5);
+ f.right = new FormAttachment(browseButton, -10);
+ directory.setLayoutData(f);
+
+ f = new FormData();
+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ Point minSize = deleteButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ f.width = Math.max(widthHint, minSize.x);
+ f.right = new FormAttachment(100, -20);
+ f.bottom = new FormAttachment(100, -10);
+ deleteButton.setLayoutData(f);
+
+ f = new FormData();
+ minSize = deleteButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ f.width = Math.max(widthHint, minSize.x);
+ f.right = new FormAttachment(deleteButton, -10);
+ f.bottom = new FormAttachment(100, -10);
+ createButton.setLayoutData(f);
+
+ f = new FormData();
+ f.top = new FormAttachment(directory, 10);
+ f.left = new FormAttachment(0, 0);
+ f.right = new FormAttachment(100, 0);
+ f.bottom = new FormAttachment(createButton, -10);
+ fileList.setLayoutData(f);
+
+ setControl(container);
+ }
+
+}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-09-02 00:12:04 UTC (rev 24633)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-09-02 00:14:10 UTC (rev 24634)
@@ -14,6 +14,9 @@
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -29,8 +32,6 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
@@ -103,16 +104,15 @@
private SelectionListener manageListener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
- Display d = Display.getDefault();
- Shell shell = new Shell(d);
- FileDialog f = new FileDialog(shell, SWT.NULL);
- f.setFilterNames(new String[] {WizardMessages.getString(PEM_NAME)});
- f.setFilterExtensions(new String[] {"*.pem"}); //$NON-NLS-1$
- String keyname = f.open();
- if (keyname != null && keyname.length() > 0) {
- keyname = keyname.substring(0, keyname.length() - 4);
+ Shell shell = getShell();
+ ManageKeys wizard = new ManageKeys(cloud, ".pem"); //$NON-NLS-1$
+ WizardDialog dialog = new CustomWizardDialog(shell, wizard,
+ IDialogConstants.OK_LABEL);
+ dialog.create();
+ dialog.open();
+ String keyname = wizard.getKeyName();
+ if (keyname != null)
keyText.setText(keyname);
- }
}
};
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-09-02 00:12:04 UTC (rev 24633)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-09-02 00:14:10 UTC (rev 24634)
@@ -32,6 +32,8 @@
Key.label=Key Name:
BrowseButton.label=Browse...
ManageButton.label=Manage...
+NewButton.label=New...
+DeleteButton.label=Delete
Pem.name=PEM file (*.pem)
@@ -62,5 +64,17 @@
NewInstance.title=Launch Instance
NewInstance.name=Launch Instance
+ManageKeys.desc=Select a physical key to use when creating an instance so that it may be accessed remotely.
+ManageKeys.title=Manage Keys
+ManageKeys.name=Manage Keys
+
+ErrorInvalidDirectory.text=Specified directory is not a valid existing directory
+Directory.label=Directory
+
+CreateKey.title=Create Key
+CreateKey.msg=Specify a unique name for a new key:
+ConfirmKeyDelete.title=Confirm Key Delete
+ConfirmKeyDelete.msg=Confirm deletion of key: {0}
+
StartingInstance.title=Starting Instance
StartingInstance.msg=Starting Instance: {0}
\ No newline at end of file
15 years, 1 month
JBoss Tools SVN: r24633 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-09-01 20:12:04 -0400 (Wed, 01 Sep 2010)
New Revision: 24633
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
2010-09-01 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (deleteKey): Change
arguments to just the key name is given. Don't delete any file.
(createKey): Change the directory argument to just be a String instead of an IPath.
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (deleteKey): New method.
(createKey): Ditto.
(refreshInstance): Remove stack trace on error since a pending cloud start will
result in not found until the cloud actually is running.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-09-01 21:48:21 UTC (rev 24632)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-09-02 00:12:04 UTC (rev 24633)
@@ -1,3 +1,13 @@
+2010-09-01 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (deleteKey): Change
+ arguments to just the key name is given. Don't delete any file.
+ (createKey): Change the directory argument to just be a String instead of an IPath.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (deleteKey): New method.
+ (createKey): Ditto.
+ (refreshInstance): Remove stack trace on error since a pending cloud start will
+ result in not found until the cloud actually is running.
+
2010-08-30 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/Activator.java: Add Copyright and License info.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-09-01 21:48:21 UTC (rev 24632)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-09-02 00:12:04 UTC (rev 24633)
@@ -16,6 +16,7 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.equinox.security.storage.EncodingUtils;
import org.eclipse.equinox.security.storage.ISecurePreferences;
@@ -176,7 +177,23 @@
notifyInstanceListListeners(instanceArray);
return instanceArray;
}
+
+ public void createKey(String keyname, String keystoreLocation) throws DeltaCloudException {
+ try {
+ client.createKey(keyname, keystoreLocation);
+ } catch (DeltaCloudClientException e) {
+ throw new DeltaCloudException(e);
+ }
+ }
+ public void deleteKey(String keyname) throws DeltaCloudException {
+ try {
+ client.deleteKey(keyname);
+ } catch (DeltaCloudClientException e) {
+ throw new DeltaCloudException(e);
+ }
+ }
+
public DeltaCloudInstance refreshInstance(String instanceId) {
DeltaCloudInstance retVal = null;
try {
@@ -196,7 +213,7 @@
}
}
} catch (DeltaCloudClientException e) {
- e.printStackTrace();
+ // will get here when a pending instance is being checked
}
return retVal;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-09-01 21:48:21 UTC (rev 24632)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-09-02 00:12:04 UTC (rev 24633)
@@ -43,7 +43,7 @@
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.log4j.Logger;
-import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -247,14 +247,14 @@
return JAXB.unmarshal(sendRequest(DCNS.REALMS + "/" + realmId, RequestType.GET), Realm.class);
}
- public void createKey(String keyname, IPath keyStoreLocation) throws DeltaCloudClientException {
+ public void createKey(String keyname, String keyStoreLocation) throws DeltaCloudClientException {
String xml = sendRequest(DCNS.KEYS + "?name=" + keyname, RequestType.POST);
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
List<String> keyText = getElementText(document, "pem"); //$NON-NLS-1$
- File keyFile = keyStoreLocation.append(keyname + ".pem").toFile(); //$NON-NLS-1$
+ File keyFile = Path.fromOSString(keyStoreLocation).append(keyname + ".pem").toFile(); //$NON-NLS-1$
if (!keyFile.exists())
keyFile.createNewFile();
keyFile.setReadable(false, false);
@@ -279,14 +279,8 @@
}
}
- public void deleteKey(String keyname, IPath keyStoreLocation) throws DeltaCloudClientException {
- try {
- File keyFile = keyStoreLocation.append(keyname + ".pem").toFile(); //$NON-NLS-1$
- if (keyFile.exists())
- keyFile.delete();
- } finally {
- sendRequest(DCNS.KEYS + "/" + keyname, RequestType.DELETE);
- }
+ public void deleteKey(String keyname) throws DeltaCloudClientException {
+ sendRequest(DCNS.KEYS + "/" + keyname, RequestType.DELETE);
}
@Override
15 years, 1 month
JBoss Tools SVN: r24632 - trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/dialogs.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2010-09-01 17:48:21 -0400 (Wed, 01 Sep 2010)
New Revision: 24632
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/dialogs/PublishedLocationsDialog.java
Log:
JBIDE-6970 IllegalArgumentException When Clicking Copy Url In PublishedLocationsDialog: Disable the "Copy URL" button when it is constructed. Once the user selects a row then it enables.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/dialogs/PublishedLocationsDialog.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/dialogs/PublishedLocationsDialog.java 2010-09-01 20:54:12 UTC (rev 24631)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/dialogs/PublishedLocationsDialog.java 2010-09-01 21:48:21 UTC (rev 24632)
@@ -148,7 +148,8 @@
ServerManager serverManager,
IFile file,
Collection<Workspace> workspaces ) {
- super(parentShell, RestClientI18n.publishedLocationsDialogTitle.text(), Activator.getDefault().getImage(ModeShape_IMAGE_16x),
+ super(parentShell, RestClientI18n.publishedLocationsDialogTitle.text(),
+ Activator.getDefault().getImage(ModeShape_IMAGE_16x),
RestClientI18n.publishedLocationsDialogMsg.text(file.getFullPath()), MessageDialog.INFORMATION,
new String[] {IDialogConstants.OK_LABEL}, 0);
@@ -244,6 +245,7 @@
this.btnCopy = new Button(panel, SWT.PUSH);
this.btnCopy.setText(RestClientI18n.publishedLocationsDialogCopyUrlButton.text());
this.btnCopy.setToolTipText(RestClientI18n.publishedLocationsDialogCopyUrlButtonToolTip.text());
+ this.btnCopy.setEnabled(false);
this.btnCopy.addSelectionListener(new SelectionAdapter() {
/**
* {@inheritDoc}
15 years, 1 month
JBoss Tools SVN: r24631 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-09-01 16:54:12 -0400 (Wed, 01 Sep 2010)
New Revision: 24631
Added:
trunk/build/.project
Log:
add .project file
Added: trunk/build/.project
===================================================================
--- trunk/build/.project (rev 0)
+++ trunk/build/.project 2010-09-01 20:54:12 UTC (rev 24631)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbosstools-trunk-build</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
15 years, 1 month
JBoss Tools SVN: r24630 - branches/jbosstools-3.2.0.M2/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-09-01 16:53:32 -0400 (Wed, 01 Sep 2010)
New Revision: 24630
Modified:
branches/jbosstools-3.2.0.M2/build/publish.sh
Log:
merge from trunk for JBIDE-6969
Modified: branches/jbosstools-3.2.0.M2/build/publish.sh
===================================================================
--- branches/jbosstools-3.2.0.M2/build/publish.sh 2010-09-01 20:52:32 UTC (rev 24629)
+++ branches/jbosstools-3.2.0.M2/build/publish.sh 2010-09-01 20:53:32 UTC (rev 24630)
@@ -2,13 +2,15 @@
# Hudson script used to publish Tycho-built p2 update sites
# NOTE: sources MUST be checked out into ${WORKSPACE}/sources
+# to use timestamp when naming dirs instead of ${BUILD_ID}-H${BUILD_NUMBER}, use:
+# BUILD_ID=2010-08-31_19-16-10; timestamp=$(echo $BUILD_ID | tr -d "_-"); timestamp=${timestamp:0:12}; echo $timestamp; # 201008311916
+
# where to create the stuff to publish
STAGINGDIR=${WORKSPACE}/results/${JOB_NAME}
# releases get named differently than snapshots
if [[ ${RELEASE} == "Yes" ]]; then
ZIPSUFFIX="${BUILD_ID}-H${BUILD_NUMBER}"
- STAGINGDIR=${WORKSPACE}/results/${JOB_NAME}-${ZIPSUFFIX}
else
ZIPSUFFIX="SNAPSHOT"
fi
@@ -161,10 +163,23 @@
if [[ $ec == "0" ]] && [[ $fc == "0" ]]; then
# publish build dir (including update sites/zips/logs/metadata
if [[ -d ${STAGINGDIR} ]]; then
- date; rsync -arzq --delete ${STAGINGDIR} $DESTINATION/builds/nightly/3.2.helios/; # create a new unique dir
- if [[ ${RELEASE} == "Yes" ]]; then
- date; rsync -arzq --delete ${STAGINGDIR} $DESTINATION/builds/nightly/3.2.helios/${JOB_NAME} # replace existing snapshot dir
+
+ # if an aggregate build, put output elsewhere on disk
+ if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then
+ if [[ $1 == "trunk" ]]; then
+ date; rsync -arzq --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/trunk/${BUILD_ID}-H${BUILD_NUMBER}/
+ else
+ date; rsync -arzq --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/${JOB_NAME/.aggregate}/${BUILD_ID}-H${BUILD_NUMBER}/
+ fi
+ else
+ # if a release build, create a named dir
+ if [[ ${RELEASE} == "Yes" ]]; then
+ date; rsync -arzq --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/3.2.helios/${JOB_NAME}-${ZIPSUFFIX}/
+ fi
fi
+
+ # and create/replace a snapshot dir w/ static URL
+ date; rsync -arzq --delete ${STAGINGDIR} $DESTINATION/builds/nightly/3.2.helios/
fi
# extra publish step for aggregate update sites ONLY
@@ -182,4 +197,3 @@
if [[ -d ${WORKSPACE}/m2-repo/org/jboss/tools ]]; then
rm -rf ${WORKSPACE}/m2-repo/org/jboss/tools
fi
-
15 years, 1 month
JBoss Tools SVN: r24629 - branches/jbosstools-3.2.0.M2/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-09-01 16:52:32 -0400 (Wed, 01 Sep 2010)
New Revision: 24629
Modified:
branches/jbosstools-3.2.0.M2/build/aggregate/site/pom.xml
Log:
rename build jobs per dgolovin's needs
Modified: branches/jbosstools-3.2.0.M2/build/aggregate/site/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.M2/build/aggregate/site/pom.xml 2010-09-01 20:52:20 UTC (rev 24628)
+++ branches/jbosstools-3.2.0.M2/build/aggregate/site/pom.xml 2010-09-01 20:52:32 UTC (rev 24629)
@@ -16,12 +16,11 @@
<properties>
<!-- add more inputRepo# here, then reference below; need variables so
that these can be referred to in Ant script later -->
- <inputRepo1>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo1>
- <inputRepo2>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo2>
- <inputRepo3>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo3>
- <inputRepo4>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo4>
- <inputRepo5>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo5>
- <inputRepos>1,2,3,4,5</inputRepos>
+ <inputRepo1>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo1>
+ <inputRepo2>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo3>
+ <inputRepo3>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo4>
+ <inputRepo4>http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...</inputRepo5>
+ <inputRepos>1,2,3,4</inputRepos>
</properties>
<build>
@@ -41,7 +40,6 @@
<property name="inputRepo2" value="${inputRepo2}" />
<property name="inputRepo3" value="${inputRepo3}" />
<property name="inputRepo4" value="${inputRepo4}" />
- <property name="inputRepo5" value="${inputRepo5}" />
<property name="inputRepos" value="${inputRepos}" />
<!-- called AFTER generating update site + zip to add in extra content -->
@@ -115,14 +113,6 @@
<enabled>true</enabled>
</snapshots>
</repository>
- <repository>
- <id>inputRepo5</id>
- <url>${inputRepo5}/all/repo/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
</repositories>
<profiles>
15 years, 1 month