JBoss Tools SVN: r29759 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views/cloud and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 09:38:01 -0400 (Mon, 14 Mar 2011)
New Revision: 29759
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
Log:
[JBIDE-8584] ensured updates to widgets happens in display thread
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-03-14 12:50:30 UTC (rev 29758)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-03-14 13:38:01 UTC (rev 29759)
@@ -1,3 +1,9 @@
+2011-03-14 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java (updateCloudSelector):
+ * src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java (propertyChange):
+ [JBIDE-8584] ensured updates to widgets happens in display thread
+
2011-03-09 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/ui/views/cloud/property/CVPropertySheetPage.java (selectionChanged):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java 2011-03-14 12:50:30 UTC (rev 29758)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/CloudItem.java 2011-03-14 13:38:01 UTC (rev 29759)
@@ -14,6 +14,7 @@
import java.beans.PropertyChangeListener;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.ui.views.cloud.property.CloudPropertySource;
@@ -59,6 +60,12 @@
@Override
public void propertyChange(PropertyChangeEvent event) {
- viewer.update(this, new String[] { DeltaCloud.PROP_NAME });
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ viewer.update(CloudItem.this, new String[] { DeltaCloud.PROP_NAME });
+ }
+ });
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2011-03-14 12:50:30 UTC (rev 29758)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2011-03-14 13:38:01 UTC (rev 29759)
@@ -361,17 +361,24 @@
}
}
- private void updateCloudSelector(DeltaCloud cloud) {
+ private void updateCloudSelector(final DeltaCloud cloud) {
DeltaCloud[] clouds = getClouds();
- int index = getCloudIndex(cloud, clouds);
- if (index >= 0) {
- int selectionIndex = currentCloudSelector.getSelectionIndex();
- currentCloudSelector.removeModifyListener(currentCloudModifyListener);
- currentCloudSelector.setItem(index, cloud.getName());
- currentCloudSelector.select(selectionIndex);
- currentCloudSelector.addModifyListener(currentCloudModifyListener);
- }
- container.layout(true, true);
+ final int index = getCloudIndex(cloud, clouds);
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (index >= 0) {
+ int selectionIndex = currentCloudSelector.getSelectionIndex();
+ currentCloudSelector.removeModifyListener(currentCloudModifyListener);
+ currentCloudSelector.setItem(index, cloud.getName());
+ currentCloudSelector.select(selectionIndex);
+ currentCloudSelector.addModifyListener(currentCloudModifyListener);
+ }
+ container.layout(true, true);
+
+ }
+ });
}
public void cloudsChanged(final int type, final DeltaCloud cloud) {
13 years, 8 months
JBoss Tools SVN: r29758 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:50:30 -0400 (Mon, 14 Mar 2011)
New Revision: 29758
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-03-14 12:50:15 UTC (rev 29757)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-03-14 12:50:30 UTC (rev 29758)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: DeltaCloud UI
Bundle-SymbolicName: org.jboss.tools.deltacloud.ui; singleton:=true
-Bundle-Version: 0.1.0.qualifier
+Bundle-Version: 0.2.0.qualifier
Bundle-Activator: org.jboss.tools.deltacloud.ui.Activator
Bundle-Vendor: JBoss by Red Hat
Require-Bundle: org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml 2011-03-14 12:50:15 UTC (rev 29757)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml 2011-03-14 12:50:30 UTC (rev 29758)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.ui</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <version>0.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r29757 - trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:50:15 -0400 (Mon, 14 Mar 2011)
New Revision: 29757
Modified:
trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/
trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/feature.xml
trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Property changes on: trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature
___________________________________________________________________
Added: svn:ignore
+ target
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/feature.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/feature.xml 2011-03-14 12:50:00 UTC (rev 29756)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/feature.xml 2011-03-14 12:50:15 UTC (rev 29757)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.deltacloud.test.feature"
label="JBoss Tools Deltacloud Test Feature"
- version="1.0.0.qualifier">
+ version="1.0.1.qualifier">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml 2011-03-14 12:50:00 UTC (rev 29756)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml 2011-03-14 12:50:15 UTC (rev 29757)
@@ -9,6 +9,6 @@
<groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.test.feature</artifactId>
<name>org.jboss.tools.deltacloud.test.feature</name>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r29756 - in trunk/deltacloud/tests/org.jboss.tools.deltacloud.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:50:00 -0400 (Mon, 14 Mar 2011)
New Revision: 29756
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-03-14 12:49:43 UTC (rev 29755)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-03-14 12:50:00 UTC (rev 29756)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Test
Bundle-SymbolicName: org.jboss.tools.deltacloud.test
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/pom.xml
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/pom.xml 2011-03-14 12:49:43 UTC (rev 29755)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/pom.xml 2011-03-14 12:50:00 UTC (rev 29756)
@@ -8,7 +8,7 @@
</parent>
<groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.test</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<emma.filter/>
13 years, 8 months
JBoss Tools SVN: r29755 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:49:43 -0400 (Mon, 14 Mar 2011)
New Revision: 29755
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF 2011-03-14 12:49:30 UTC (rev 29754)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF 2011-03-14 12:49:43 UTC (rev 29755)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: DeltaCloud Integration (Experimental)
Bundle-SymbolicName: org.jboss.tools.deltacloud.integration;singleton:=true
-Bundle-Version: 0.0.1.qualifier
+Bundle-Version: 0.2.0.qualifier
Bundle-Vendor: Red Hat Inc.
Bundle-Activator: org.jboss.tools.deltacloud.integration.DeltaCloudIntegrationPlugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/pom.xml 2011-03-14 12:49:30 UTC (rev 29754)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/pom.xml 2011-03-14 12:49:43 UTC (rev 29755)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.deltacloud.plugins</groupId>
<artifactId>org.jboss.tools.deltacloud.integration</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r29754 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:49:30 -0400 (Mon, 14 Mar 2011)
New Revision: 29754
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2011-03-14 12:48:41 UTC (rev 29753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2011-03-14 12:49:30 UTC (rev 29754)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: DeltaCloud Core
Bundle-SymbolicName: org.jboss.tools.deltacloud.core; singleton:=true
-Bundle-Version: 0.1.0.qualifier
+Bundle-Version: 0.2.0.qualifier
Bundle-Activator: org.jboss.tools.deltacloud.core.Activator
Bundle-Vendor: JBoss by Red Hat
Require-Bundle: org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml 2011-03-14 12:48:41 UTC (rev 29753)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml 2011-03-14 12:49:30 UTC (rev 29754)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.core</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <version>0.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r29753 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:48:41 -0400 (Mon, 14 Mar 2011)
New Revision: 29753
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF 2011-03-14 12:48:27 UTC (rev 29752)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF 2011-03-14 12:48:41 UTC (rev 29753)
@@ -3,7 +3,7 @@
Bundle-Name: DeltaCloud Client
Bundle-Vendor: JBoss by Red Hat
Bundle-SymbolicName: org.jboss.tools.deltacloud.client
-Bundle-Version: 0.1.0.qualifier
+Bundle-Version: 0.2.0.qualifier
Bundle-Activator: org.jboss.tools.deltacloud.client.DeltaCloudClientBundle
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/pom.xml 2011-03-14 12:48:27 UTC (rev 29752)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/pom.xml 2011-03-14 12:48:41 UTC (rev 29753)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.client</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <version>0.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r29752 - trunk/deltacloud/features/org.jboss.tools.deltacloud.feature.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 08:48:27 -0400 (Mon, 14 Mar 2011)
New Revision: 29752
Modified:
trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml
trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml
Log:
[JBIDE-8579] increased version for trunk
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml 2011-03-14 12:00:55 UTC (rev 29751)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml 2011-03-14 12:48:27 UTC (rev 29752)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.deltacloud.feature"
label="%featureName"
- version="0.0.1.qualifier"
+ version="0.2.0.qualifier"
provider-name="%providerName">
<description>
@@ -29,7 +29,6 @@
version="0.0.0"
unpack="false"/>
-
<plugin
id="org.jboss.tools.deltacloud.core"
download-size="0"
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml 2011-03-14 12:00:55 UTC (rev 29751)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml 2011-03-14 12:48:27 UTC (rev 29752)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.feature</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.2.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r29751 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-14 08:00:55 -0400 (Mon, 14 Mar 2011)
New Revision: 29751
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java
Log:
JBIDE-8582
Compilation error: Invalid character constant in org.jboss.tools.jst.jsp.contentassist.AutoELContentAssistantProposal
Issue is fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java 2011-03-14 11:20:37 UTC (rev 29750)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java 2011-03-14 12:00:55 UTC (rev 29751)
@@ -82,7 +82,7 @@
if (elements[i] instanceof IMember ||
elements[i].getElementType() == IJavaElement.LOCAL_VARIABLE ||
elements[i].getElementType() == IJavaElement.TYPE_PARAMETER) {
- buffer.append('�').append(' ').append(getInfoText(elements[i]));
+ buffer.append('\uE467').append(' ').append(getInfoText(elements[i]));
hasContents= true;
}
buffer.append("<br/>"); //$NON-NLS-1$
13 years, 8 months
JBoss Tools SVN: r29750 - in branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-14 07:20:37 -0400 (Mon, 14 Mar 2011)
New Revision: 29750
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/ShowInRemoteSystemExplorerHandler.java
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java
Log:
[JBIDE-8372]
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-03-14 09:57:27 UTC (rev 29749)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-03-14 11:20:37 UTC (rev 29750)
@@ -77,11 +77,6 @@
return connectionName;
}
- @Deprecated
- public static String createHostName(DeltaCloudInstance instance) {
- return createRSEHostName(instance);
- }
-
/**
* Returns the RSE host name for the given instance. Returns
* <code>null</code> if the instance is <code>null</null>.
@@ -97,12 +92,6 @@
return instance.getHostName();
}
- @Deprecated
- public static IHost createHost(String connectionName, String hostname, IRSESystemType systemType,
- ISystemRegistry systemRegistry) throws Exception {
- return createHost("jboss", connectionName, hostname, systemType, systemRegistry);
- }
-
public static IHost createHost(String username, String connectionName, String hostname, IRSESystemType systemType,
ISystemRegistry systemRegistry) throws Exception {
// TODO: Internationalize strings
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/ShowInRemoteSystemExplorerHandler.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/ShowInRemoteSystemExplorerHandler.java 2011-03-14 09:57:27 UTC (rev 29749)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/ShowInRemoteSystemExplorerHandler.java 2011-03-14 11:20:37 UTC (rev 29750)
@@ -24,7 +24,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.integration.DeltaCloudIntegrationPlugin;
import org.jboss.tools.deltacloud.integration.Messages;
-import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
/**
* @author Andre Dietisheim
@@ -35,11 +35,13 @@
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
- DeltaCloudInstance instance = UIUtils.getFirstAdaptedElement(selection, DeltaCloudInstance.class);
+ DeltaCloudInstance instance = WorkbenchUtils.getFirstAdaptedElement(selection, DeltaCloudInstance.class);
try {
String connectionName = RSEUtils.createConnectionName(instance);
- IHost host = RSEUtils.createHost(connectionName,
- RSEUtils.createHostName(instance),
+ IHost host = RSEUtils.createHost(
+ "jboss",
+ connectionName,
+ RSEUtils.createRSEHostName(instance),
RSEUtils.getSSHOnlySystemType(),
RSEUtils.getSystemRegistry());
Job connectJob = RSEUtils.connect(connectionName, RSEUtils.getConnectorService(host));
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java 2011-03-14 09:57:27 UTC (rev 29749)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateRSEFromInstanceJob.java 2011-03-14 11:20:37 UTC (rev 29750)
@@ -10,15 +10,19 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.integration.wizard;
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.job.AbstractInstanceJob;
@@ -29,33 +33,40 @@
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.osgi.service.prefs.Preferences;
+import com.jcraft.jsch.JSchException;
+
public class CreateRSEFromInstanceJob extends AbstractInstanceJob {
+ /** the timeout for trying to connect to the new instance */
+ private static final long CONNECT_TIMEOUT = 3 * 60 * 1000;
+
private Job nextJob2 = null;
+
public CreateRSEFromInstanceJob(DeltaCloudInstance instance, String family) {
- super("Create RSE Host from DeltaCloud Instance", instance, family);
+ super(MessageFormat.format("Create RSE {0}", instance.getAlias()), instance, family);
}
- public IStatus doRun(IProgressMonitor monitor) {
+
+ public IStatus doRun(IProgressMonitor monitor) throws CoreException {
return runRSEJob(getInstance(), monitor);
}
-
+
public void setNextJob(Job job) {
super.setNextJob(job);
this.nextJob2 = job;
}
-
- private IStatus runRSEJob(DeltaCloudInstance instance, IProgressMonitor monitor) {
+
+ private IStatus runRSEJob(DeltaCloudInstance instance, IProgressMonitor monitor) throws CoreException {
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
-
+
String hostname = RSEUtils.createRSEHostName(instance);
if (hostname == null || hostname.length() <= 0) {
return Status.CANCEL_STATUS;
}
-
+
if (isAutoconnect()) {
try {
- monitor.beginTask("Create RSE Server", 100);
+ monitor.beginTask(MessageFormat.format("Create RSE to server {0}", hostname), 100);
String connectionName = RSEUtils.createConnectionName(instance);
IHost host = RSEUtils.createHost(
"jboss",
@@ -63,31 +74,47 @@
RSEUtils.createRSEHostName(instance),
RSEUtils.getSSHOnlySystemType(),
RSEUtils.getSystemRegistry());
- if( nextJob2 != null && nextJob2 instanceof CreateServerFromRSEJob) {
- ((CreateServerFromRSEJob)nextJob2).setHost(host);
+ if (nextJob2 != null && nextJob2 instanceof CreateServerFromRSEJob) {
+ ((CreateServerFromRSEJob) nextJob2).setHost(host);
}
monitor.worked(10);
-
- SubProgressMonitor submon = new SubProgressMonitor(monitor, 90);
- initialConnect(host);
- return RSEUtils.connect(RSEUtils.getConnectorService(host), 90000, submon);
+ IStatus credentials =
+ triggerCredentialsDialog(host, new SubProgressMonitor(monitor, 10));
+ if (credentials.isOK())
+ return RSEUtils.connect(RSEUtils.getConnectorService(host), CONNECT_TIMEOUT,
+ new SubProgressMonitor(monitor, 80));
+ return credentials;
} catch (Exception e) {
- return new Status(IStatus.ERROR, DeltaCloudIntegrationPlugin.PLUGIN_ID,
- NLS.bind(Messages.COULD_NOT_LAUNCH_RSE_EXPLORER2, instance.getName()), e);
+ throw new CoreException(
+ new Status(IStatus.ERROR, DeltaCloudIntegrationPlugin.PLUGIN_ID,
+ NLS.bind(Messages.COULD_NOT_LAUNCH_RSE_EXPLORER2, instance.getName())));
}
}
return Status.OK_STATUS;
}
-
- private void initialConnect(IHost host) {
+
+ private IStatus triggerCredentialsDialog(IHost host, IProgressMonitor monitor) {
try {
+ monitor.setTaskName(MessageFormat.format("Initiating connection to {0}...", host.getName()));
IRemoteFileSubSystem system = RSEUtils.findRemoteFileSubSystem(host);
- system.connect(new NullProgressMonitor(), true);
- } catch(Exception e) {
- // ignore, expected, the server probably isn't up yet.
+ system.connect(monitor, true /* force credentials dialog */);
+ } catch (Exception e) {
+ if (e instanceof OperationCanceledException)
+ return Status.CANCEL_STATUS;
+ if (e instanceof SystemOperationFailedException) {
+ Exception f = ((SystemOperationFailedException) e).getRemoteException();
+ if (f != null && f instanceof JSchException) {
+ // User selected No on accept hostkey
+ if (f.getMessage().contains("reject HostKey:"))
+ return Status.CANCEL_STATUS;
+ }
+ }
+ } finally {
+ monitor.done();
}
+ return Status.OK_STATUS;
}
-
+
private boolean isAutoconnect() {
Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
boolean autoConnect = prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
Modified: branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java
===================================================================
--- branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java 2011-03-14 09:57:27 UTC (rev 29749)
+++ branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java 2011-03-14 11:20:37 UTC (rev 29750)
@@ -17,6 +17,7 @@
import java.io.Reader;
import java.io.StringWriter;
import java.io.Writer;
+import java.text.MessageFormat;
import java.util.Iterator;
import java.util.Properties;
@@ -81,6 +82,7 @@
public void setHost(IHost host) {
this.host = host;
+ setName(MessageFormat.format("Create Server {0} From RSE Host", host.getName()));
}
protected IStatus run(IProgressMonitor monitor) {
13 years, 8 months