Author: adietish
Date: 2010-12-29 09:40:18 -0500 (Wed, 29 Dec 2010)
New Revision: 27801
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
removed JAXB for unmarshalling HardwareProfiles and Realms
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -15,6 +15,8 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@@ -36,6 +38,8 @@
*/
public class DeltaCloudManager {
+ private static final String USERNAME_ENCODING = "UTF8";
+
private static final DeltaCloudManager INSTANCE = new DeltaCloudManager();
public final static String CLOUDFILE_NAME = "clouds.xml"; //$NON-NLS-1$
@@ -83,7 +87,7 @@
NamedNodeMap attrs = n.getAttributes();
name = attrs.getNamedItem("name").getNodeValue(); // $NON-NLS-1$
String url = attrs.getNamedItem("url").getNodeValue(); // $NON-NLS-1$
- String username = attrs.getNamedItem("username").getNodeValue(); //
$NON-NLS-1$
+ String username =
URLEncoder.encode(attrs.getNamedItem("username").getNodeValue(),
USERNAME_ENCODING); // $NON-NLS-1$
Driver driver =
Driver.checkedValueOf(attrs.getNamedItem("type").getNodeValue()); //
$NON-NLS-1$
String imageFilterRules =
getImageFilterRules(attrs.getNamedItem("imagefilter")); // $NON-NLS-1$
String instanceFilterRules =
getInstanceFilterRules(attrs.getNamedItem("instancefilter")); // $NON-NLS-1$
@@ -145,9 +149,11 @@
}
}
- private String createCloudXML(DeltaCloud d) {
- return "<cloud name=\"" + d.getName() + "\"
url=\"" //$NON-NLS-1$ //$NON-NLS-2$
- + d.getURL() + "\" username=\"" + d.getUsername() + //$NON-NLS-1$
//$NON-NLS-2$
+ private String createCloudXML(DeltaCloud d) throws UnsupportedEncodingException {
+ String username = URLEncoder.encode(d.getUsername(), USERNAME_ENCODING);
+ return "<cloud name=\"" + d.getName() + //$NON-NLS-1$
+ "\" url=\"" + d.getURL() + //$NON-NLS-2$
+ "\" username=\"" + username + //$NON-NLS-1$ //$NON-NLS-2$
"\" type=\"" + d.getDriver() + //$NON-NLS-1$ //$NON-NLS-2$
"\" imagefilter=\"" + d.getImageFilter() + //$NON-NLS-1$
//$NON-NLS-2$
"\" instancefilter=\"" + d.getInstanceFilter() + //$NON-NLS-1$
//$NON-NLS-2$
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudPasswordStorageKey.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -26,8 +26,8 @@
private String userName;
public DeltaCloudPasswordStorageKey(String cloudName, String userName) {
- this.userName = userName;
- this.cloudName = cloudName;
+ this.userName = EncodingUtils.encodeBase64(userName.getBytes());
+ this.cloudName = EncodingUtils.encodeBase64(cloudName.getBytes());
}
@Override
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -44,6 +44,8 @@
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DefaultHttpClient;
+import org.eclipse.core.runtime.Assert;
+import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProperty.Kind;
import org.jboss.tools.deltacloud.core.client.request.AbstractListObjectsRequest;
import org.jboss.tools.deltacloud.core.client.request.CreateInstanceRequest;
import org.jboss.tools.deltacloud.core.client.request.CreateKeyRequest;
@@ -64,6 +66,7 @@
import org.jboss.tools.deltacloud.core.client.unmarshal.KeyUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.KeysUnmarshaller;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -239,8 +242,7 @@
StringBuilder sb = new StringBuilder();
String line = null;
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(is, "UTF-8"));
+ BufferedReader reader = new BufferedReader(new InputStreamReader(is,
"UTF-8"));
while ((line = reader.readLine()) != null) {
sb.append(line).append("\n");
}
@@ -335,10 +337,90 @@
@Override
public List<HardwareProfile> listProfiles() throws DeltaCloudClientException {
- return listDeltaCloudObjects(HardwareProfile.class,
- new ListHardwareProfilesRequest(baseUrl), "hardware_profile");
+ try {
+ return buildProfiles(request(new ListHardwareProfilesRequest(baseUrl)));
+ } catch (Exception e) {
+ throw new DeltaCloudClientException(MessageFormat.format("could not get realms on
cloud at \"{0}\"",
+ baseUrl), e);
+ }
}
+ private List<HardwareProfile> buildProfiles(InputStream inputStream)
+ throws ParserConfigurationException, SAXException, IOException,
DeltaCloudClientException {
+ Document document = getDocument(getResponse(inputStream));
+ List<HardwareProfile> profiles = new ArrayList<HardwareProfile>();
+ NodeList elements = document.getElementsByTagName("hardware_profile");
+ for (int i = 0; i < elements.getLength(); i++) {
+ HardwareProfile profile = createProfile(elements.item(i));
+ profiles.add(profile);
+ }
+ return profiles;
+ }
+
+ private HardwareProfile createProfile(Node node) {
+ Assert.isLegal(node instanceof Element);
+ Element element = (Element) node;
+ HardwareProfile profile = new HardwareProfile();
+ profile.setId(element.getAttribute("id"));
+ profile.setProperties(createProperties(element.getElementsByTagName("property")));
+ return profile;
+ }
+
+ private List<Property> createProperties(NodeList propertiesList) {
+ List<Property> properties = new ArrayList<Property>();
+ for (int i = 0; i < propertiesList.getLength(); i++) {
+ Property property = createProperty(propertiesList.item(i));
+ properties.add(property);
+ }
+ return properties;
+ }
+
+ private Property createProperty(Node node) {
+ Assert.isTrue(node instanceof Element);
+ Element element = (Element) node;
+ Property property = new Property();
+ property.setName(element.getAttribute("name"));
+ property.setId(element.getAttribute("id"));
+ property.setUnit(element.getAttribute("unit"));
+ property.setValue(element.getAttribute("value"));
+ String kind = element.getAttribute("kind");
+ Assert.isTrue(kind != null);
+ kind = kind.toUpperCase();
+ property.setKind(kind);
+ if (Kind.RANGE.toString().equals(property.getKind())) {
+ setRange(element, property);
+ }
+ else if (Kind.ENUM.toString().equals(property.getKind())) {
+ setEnum(element, property);
+ }
+ else if (Kind.FIXED.toString().equals(property.getKind())) {
+ // no special treatement
+ }
+ return property;
+ }
+
+ private void setRange(Element propertyElement, Property property) {
+ Node node = propertyElement.getElementsByTagName("range").item(0);
+ Assert.isLegal(node instanceof Element);
+ Element rangeElement = (Element) node;
+ property.setRange(rangeElement.getAttribute("first"),
rangeElement.getAttribute("last"));
+ }
+
+ private void setEnum(Element propertyElement, Property property) {
+ Node node = propertyElement.getElementsByTagName("enum").item(0);
+ Assert.isLegal(node instanceof Element);
+ Element enumElement = (Element) node;
+ NodeList nodeList = enumElement.getElementsByTagName("entry");
+ ArrayList<String> enumValues = new ArrayList<String>();
+ for (int i = 0; i< nodeList.getLength(); i++) {
+ Node entryNode = nodeList.item(i);
+ Assert.isTrue(entryNode instanceof Element);
+ Element entryElement = (Element) entryNode;
+ enumValues.add(entryElement.getAttribute("value"));
+ }
+ property.setEnums(enumValues);
+ }
+
@Override
public List<Image> listImages() throws DeltaCloudClientException {
return listDeltaCloudObjects(Image.class,
@@ -359,10 +441,7 @@
}
@Override
- public Instance listInstances(String instanceId)
- throws DeltaCloudClientException {
- // return JAXB.unmarshal(new StringReader(request(new
- // ListInstanceRequest(baseUrl, instanceId))), Instance.class);
+ public Instance listInstances(String instanceId) throws DeltaCloudClientException {
try {
return buildInstance(requestStringResponse(new ListInstanceRequest(baseUrl,
instanceId)));
} catch (DeltaCloudClientException e) {
@@ -374,14 +453,51 @@
@Override
public List<Realm> listRealms() throws DeltaCloudClientException {
- return listDeltaCloudObjects(Realm.class, new ListRealmsRequest(baseUrl),
"realm");
+ try {
+ return buildRealms(request(new ListRealmsRequest(baseUrl)));
+ } catch (Exception e) {
+ throw new DeltaCloudClientException(MessageFormat.format("could not get realms on
cloud at \"{0}\"",
+ baseUrl), e);
+ }
}
+ private List<Realm> buildRealms(InputStream inputStream)
+ throws ParserConfigurationException, SAXException, IOException,
DeltaCloudClientException {
+ Document document = getDocument(getResponse(inputStream));
+ List<Realm> realms = new ArrayList<Realm>();
+ NodeList elements = document.getElementsByTagName("realms");
+ for (int i = 0; i < elements.getLength(); i++) {
+ Realm realm = createRealm((Element) elements.item(i));
+ realms.add(realm);
+ }
+ return realms;
+ }
+
+ private Realm createRealm(Node node) {
+ Assert.isLegal(node instanceof Element);
+ Realm realm = new Realm();
+ updateRealm(realm, (Element) node);
+ return realm;
+ }
+
+ private Realm updateRealm(Realm realm, Element element) {
+ realm.setId(element.getAttribute("id"));
+ realm.setName(element.getElementsByTagName("name").item(0).getTextContent());
+ realm.setLimit(element.getElementsByTagName("limit").item(0).getTextContent());
+ realm.setState(element.getElementsByTagName("state").item(0).getTextContent());
+
+ return realm;
+ }
+
@Override
public Realm listRealms(String realmId) throws DeltaCloudClientException {
- return JAXB.unmarshal(new StringReader(
- requestStringResponse(new ListRealmRequest(baseUrl, realmId))),
- Realm.class);
+ try {
+ Document document = getDocument(getResponse(request(new ListRealmRequest(baseUrl,
realmId))));
+ return createRealm((Element)
document.getElementsByTagName("realm").item(0));
+ } catch (Exception e) {
+ throw new DeltaCloudClientException(
+ MessageFormat.format("could not get realms on cloud at \"{0}\"",
baseUrl), e);
+ }
}
public Key createKey(String keyname) throws DeltaCloudClientException {
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/HardwareProfile.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -22,10 +22,14 @@
private List<Property> properties;
- private HardwareProfile()
+ protected HardwareProfile()
{
}
+ protected void setProperties(List<Property> properties) {
+ this.properties = properties;
+ }
+
public List<Property> getProperties() {
if (properties == null)
properties = new ArrayList<Property>();
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Realm.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -15,36 +15,30 @@
/**
* @author Martyn Taylor
*/
-public class Realm extends AbstractDeltaCloudObject
-{
+public class Realm extends AbstractDeltaCloudObject {
private static final long serialVersionUID = 1L;
public static enum RealmState {
AVAILABLE, UNAVAILABLE, UNKNOWN
}
-
+
@XmlElement
private String name;
-
+
@XmlElement
private RealmState state;
-
+
@XmlElement
private int limit;
-
- private Realm()
- {
+
+ protected Realm() {
}
- @SuppressWarnings("unused")
- private void setName(String name)
- {
+ protected void setName(String name) {
this.name = name;
}
- @SuppressWarnings("unused")
- private void setState(String state)
- {
+ protected void setState(String state) {
try {
this.state = RealmState.valueOf(state);
} catch (Exception e) {
@@ -52,38 +46,39 @@
}
}
- @SuppressWarnings("unused")
- private void setLimit(int limit)
- {
+ protected void setLimit(int limit) {
this.limit = limit;
}
- public static long getSerialversionuid()
- {
+ protected void setLimit(String limit) {
+ try {
+ this.limit = Integer.parseInt(limit);
+ } catch (Exception e) {
+ this.limit = -1;
+ }
+ }
+
+ public static long getSerialversionuid() {
return serialVersionUID;
}
- public String getName()
- {
+ public String getName() {
return name;
}
- public RealmState getState()
- {
+ public RealmState getState() {
return state;
}
-
- public int getLimit()
- {
+
+ public int getLimit() {
return limit;
}
-
+
@Override
- public String toString()
- {
+ public String toString() {
String s = "";
s += "Realm:\t\t" + getId() + "\n";
- s += "Name\t\t" + getName()+ "\n";
+ s += "Name\t\t" + getName() + "\n";
s += "State:\t\t" + getState() + "\n";
s += "Limit:\t\t" + getLimit() + "\n";
return s;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud
Tools.launch 2010-12-29 14:31:43 UTC (rev 27800)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud
Tools.launch 2010-12-29 14:40:18 UTC (rev 27801)
@@ -23,8 +23,8 @@
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS"
value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m
-Xmx1024m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="selected_target_plugins"
value="javax.xml@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jface@default:default,org.eclipse.debug.core@default:default,org.eclipse.jst.common.ui@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.jem.util@default:default,org.eclipse.pde.core@default:default,org.eclipse.jst.server.ui@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.jst.j2ee.jca@default:default,org.eclipse.wst.server.ui@default:default,org.eclipse.ecf.filetransf!
er@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.update.configurator@3:true,org.eclipse.jface.databinding@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.help@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.common.emf@default:default,org.apache.xml.serializer@default:default,org.eclipse.search@default:default,org.eclipse.equinox.simpleconfigurator@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.core.expressions@default:default,org.eclipse.tm.terminal.view@default:default,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.rse.services@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.equinox.concurrent@default:d!
efault,org.eclipse.rse.subsystems.files.core@default:default,o!
rg.eclip
se.swtbot.ant.optional.junit4@default:false,org.eclipse.equinox.p2.director@default:default,org.apache.lucene@default:default,org.eclipse.swt@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.junit4@default:default,org.eclipse.core.databinding@default:default,org.eclipse.tm.terminal.ssh@default:default,org.eclipse.jface.text@default:default,org.eclipse.help.base@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.security@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.common@2:true,org.eclipse.text@default:default,org.eclipse.jem@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.osgi@-1:true,!
org.eclipse.core.databinding.beans@default:default,org.eclipse.team.core@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.ui.console@default:default,org.eclipse.jst.jee.ui@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.rse.core@default:default,org.sat4j.core@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.core.jobs@default:default,org.eclipse.help.ui@default:default,org.eclipse.core.commands@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.pde.build@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.wst.server.ui.!
doc.user@default:default,org.eclipse.wst.web@default:default,o!
rg.apach
e.xerces@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.wst.common.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.emf.ecore.change@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.ui.intro@default:default,org.eclipse.jst.j2ee.jca.ui@default:default,org.eclipse.compare.core@default:default,org.apache.jasper@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.jst.server.core@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.p2.core@default:default,org.mortbay.jetty.server@default:!
default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.wst.validation@default:default,org.eclipse.compare@default:default,org.apache.xml.resolver@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,com.jcraft.jsch@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jst.common.frameworks@default:default,org.eclipse.rse.services.local@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,javax.servlet@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.tm.terminal.telnet@default:default,org.eclipse.jst.j2ee.ejb@default:default,org.!
eclipse.rse.services.files.ftp@default:default,org.eclipse.wst!
.common.
project.facet.ui@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.ui.ide@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.rse.services.ssh@default:default,com.ibm.icu@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.jsch.core@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.emf.ecore@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ant.core@default:default,org.apache.lucene.analysis@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.ui.views@default!
:default,org.eclipse.sdk@default:default,org.eclipse.wst.server.discovery@default:default,org.eclipse.update.core@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.jst.common.project.facet.ui@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.ui.browser@default:default,org.eclipse.jst.j2ee.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.jst.servlet.ui@default:default,org.eclipse.jem.proxy@default:default,org.eclipse.wst.css.core@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.team.ui@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.p2.!
updatesite@default:default,org.eclipse.jst.jee@default:default!
,org.ecl
ipse.ui@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.rse.ui@default:default,javax.servlet.jsp@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.emf.edit@default:default,org.eclipse.osgi.services@default:default,org.apache.ant@default:default,org.eclipse.wst.web.ui@default:default,org.apache.commons.net@default:default,org.eclipse.wst.common.ui@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,!
org.eclipse.ui.ide.application@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.jdt.junit.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins"
value="org.jboss.tools.deltacloud.integration@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.jboss.tools.common@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.ide.eclipse.as.rse.core@default:default,org.jboss.tools.usage@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<stringAttribute key="selected_target_plugins"
value="org.eclipse.pde.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.rse.subsystems.files.ssh@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.jdt.ui@default:default,org.eclipse.jst.common.ui@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.tm.terminal.ssh@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.search@default:default,org.eclipse.ui.browser@default:default,org.mortbay.jetty.server@default:default,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.jst.common.project.facet!
.ui@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.resources@default:default,org.eclipse.osgi.util@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.junit4@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.mortbay.jetty.util@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.wst.server.ui@default:default,org.apache.lucene.analysis@default:default,org.eclipse.team.core@default:default,org.sat4j.pb@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.core.variables@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.text@default:default,org.apache.commons.el@default:default,org.eclipse.ecf@default:default,org.apache.commons.net@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.core.expressions@default:default,org.eclipse.j!
dt.core@default:default,org.eclipse.core.filesystem@default:de!
fault,or
g.eclipse.emf.ecore.xmi@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.equinox.security@default:default,org.eclipse.tm.terminal.telnet@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.jobs@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.jem.proxy@default:default,org.eclipse.wst.server.discovery@default:default,javax.xml@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.compare.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.hamcrest.core@default:default,org.eclipse.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.debug.core@default:default,org.eclipse.core!
.filebuffers@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.jsch.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.jst.jee@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.emf.edit@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jem@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.wst.web@default:defaul!
t,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.he!
lp.ui@de
fault:default,org.apache.jasper@default:default,org.eclipse.update.configurator@3:true,org.eclipse.jst.j2ee.ejb@default:default,org.eclipse.ecf.ssl@default:false,javax.servlet@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.jsch.ui@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ui.forms@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.eclipse.rse.subsystems.terminals.ssh@default:default,org.eclipse.ui.editors@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.jst.j2ee.ui@default:default,org.eclipse.wst.common.ui@default:defaul!
t,org.eclipse.emf.common@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.jst.server.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.sdk@default:default,org.eclipse.rse.connectorservice.ssh@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.jst.j2ee.jca.ui@default:default,org.eclipse.equinox.common@2:true,org.eclipse.core.runtime.compatibility.registry@default:false,javax.servlet.jsp@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.jst.servlet.ui@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.ui.console@default:default,org.eclipse.jface@default:default,org.eclipse.ui.workbench.texteditor@default:de!
fault,org.eclipse.core.runtime.compatibility@default:default,o!
rg.eclip
se.ui.views.log@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.rse.services@default:default,org.eclipse.core.commands@default:default,org.eclipse.rse.services.files.ftp@default:default,org.eclipse.equinox.app@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.pde.build@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.core.databinding@default:default,org.eclipse.compare@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.apache.xml.serializer@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.team.ui@default:default,org.eclipse.help!
@default:default,org.eclipse.help.base@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.update.core@default:default,org.eclipse.swt@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.rse.services.local@default:default,org.apache.xml.resolver@default:default,org.eclipse.wst.server.ui.doc.user@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.osgi@-1:true,org.eclipse.jst.server.ui@default:default,org.eclipse.rse.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.wst.common.project.facet.ui@default:default,org.apache.lucene@default:default,org.eclipse.jst.common.frameworks@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.navigator.resource!
s@default:default,org.eclipse.rse.core@default:default,org.ecl!
ipse.tm.
terminal.view@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.validation@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.ant@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.wst.css.core@default:default,org.apache.xerces@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ant.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.jst.!
jee.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.wst.web.ui@default:default,org.eclipse.rse.subsystems.files.core@default:default,org.eclipse.jst.j2ee.jca@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.jdt@default:default"/>
+<stringAttribute key="selected_workspace_plugins"
value="org.jboss.ide.eclipse.archives.ui@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.jboss.ide.eclipse.as.rse.ui@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.tools.common@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.integration@default:default,org.jboss.ide.eclipse.as.rse.core@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig"
value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/DeltaCloudViewItem.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -60,9 +60,9 @@
@Override
public void run() {
viewer.remove(children.toArray());
+ children.clear();
}
});
- children.clear();
}
public boolean hasChildren() {
@@ -74,32 +74,29 @@
}
public void addChild(final DeltaCloudViewItem<?> element) {
- children.add(element);
-
- getDisplay().asyncExec(new Runnable() {
+ getDisplay().syncExec(new Runnable() {
@Override
public void run() {
viewer.add(DeltaCloudViewItem.this, element);
+ children.add(element);
}
});
}
public void addChildren(final DeltaCloudViewItem<?>[] elements) {
- for (DeltaCloudViewItem<?> element : elements) {
- children.add(element);
- }
-
- getDisplay().asyncExec(new Runnable() {
+ getDisplay().syncExec(new Runnable() {
@Override
public void run() {
viewer.add(DeltaCloudViewItem.this, elements);
+ for (DeltaCloudViewItem<?> element : elements) {
+ children.add(element);
+ }
}
});
}
public void removeChild(final DeltaCloudViewItem<?> element) {
-
- getDisplay().asyncExec(new Runnable() {
+ getDisplay().syncExec(new Runnable() {
@Override
public void run() {
if (element != null) {
@@ -111,7 +108,7 @@
}
protected void expand() {
- getDisplay().asyncExec(new Runnable() {
+ getDisplay().syncExec(new Runnable() {
@Override
public void run() {
@@ -138,7 +135,7 @@
private void initDisposeListener(Viewer viewer) {
final Control control = viewer.getControl();
- control.getDisplay().asyncExec(new Runnable() {
+ control.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-29
14:31:43 UTC (rev 27800)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-29
14:40:18 UTC (rev 27801)
@@ -376,8 +376,7 @@
dbc.bindValue(
passwordTextObservable,
BeanProperties.value(CloudConnectionPageModel.class,
CloudConnectionPageModel.PROPERTY_PASSWORD)
- .observe(
- connectionModel));
+ .observe(connectionModel));
// test button
final Button testButton = new Button(container, SWT.NULL);
testButton.setText(WizardMessages.getString(TESTBUTTON_LABEL));