JBoss Tools SVN: r26092 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-10-27 16:39:39 -0400 (Wed, 27 Oct 2010)
New Revision: 26092
Modified:
trunk/build/target-platform/build.xml
Log:
revert to using eclipse 3.6.1 instead of broken 3.6.2M build
Modified: trunk/build/target-platform/build.xml
===================================================================
--- trunk/build/target-platform/build.xml 2010-10-27 15:08:32 UTC (rev 26091)
+++ trunk/build/target-platform/build.xml 2010-10-27 20:39:39 UTC (rev 26092)
@@ -81,10 +81,10 @@
<!-- TODO: make this work on Mac and Windows? Currently only meant to work with linux 32- and 64-bit slaves -->
<target name="get.eclipse">
<!-- NOTE: must use same platform (50M) or SDK (103M - 168M) version as feature version on target platform, or will get install/update conflicts -->
- <property name="eclipse.version" value="M20101020-0925" />
+ <property name="eclipse.version" value="3.6.1" />
+ <property name="eclipse.version" value="M20101013-0800" />
+ <property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
<property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
- <!--<property name="eclipse.URL" value="http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl..." />
- <property name="eclipse.version" value="eclipse-SDK-3.6.1" /> -->
<if>
<equals arg1="${arch}" arg2="x86" />
<then>
14 years, 1 month
JBoss Tools SVN: r26091 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-10-27 11:08:32 -0400 (Wed, 27 Oct 2010)
New Revision: 26091
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
Log:
JBIDE-7319
https://jira.jboss.org/browse/JBIDE-7319
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2010-10-27 14:28:07 UTC (rev 26090)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2010-10-27 15:08:32 UTC (rev 26091)
@@ -138,17 +138,40 @@
runCheckerOnLoad();
}
}
- WorkspaceJob checkerOnLoad = new WorkspaceJob("Checking on load...") { //$NON-NLS-1$
+
+ static class CheckerJob extends WorkspaceJob {
+ List<AbstractExtendedXMLFileImpl> files = new ArrayList<AbstractExtendedXMLFileImpl>();
- @Override
+ public CheckerJob() {
+ super("Checking constraints on load..."); //$NON-NLS-1$
+ }
+
+ public void add(AbstractExtendedXMLFileImpl file) {
+ synchronized (files) {
+ files.add(file);
+ }
+ schedule();
+ }
+
+ @Override
public IStatus runInWorkspace(IProgressMonitor monitor)
throws CoreException {
- getResourceMarkers().clear();
- constraintChecker.check();
+ while(true) {
+ AbstractExtendedXMLFileImpl file = null;
+ synchronized (files) {
+ if(files.isEmpty()) break;
+ file = files.remove(0);
+ }
+ file.getResourceMarkers().clear();
+ file.constraintChecker.check();
+ }
+
return Status.OK_STATUS;
}
- };
+ }
+ static CheckerJob checkerOnLoad = new CheckerJob();
+
void runCheckerOnLoad() {
if(!isActive()) return;
XModelObject s = getParent();
@@ -163,7 +186,7 @@
}
};
Display.getDefault().asyncExec(r);*/
- checkerOnLoad.schedule();
+ checkerOnLoad.add(this);
}
public void set(String name, String value) {
14 years, 1 month
JBoss Tools SVN: r26090 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-27 10:28:07 -0400 (Wed, 27 Oct 2010)
New Revision: 26090
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
[JBIDE-7321] refactored and commented client code #createKey
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-10-27 13:23:24 UTC (rev 26089)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-27 14:28:07 UTC (rev 26090)
@@ -28,6 +28,7 @@
import javax.xml.bind.JAXB;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
@@ -50,9 +51,11 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
public class DeltaCloudClient implements API {
+ private static final String PEM_FILE_SUFFIX = "pem";
private static final int HTTP_STATUSCODE_NOTFOUND = 404;
private static final int HTTP_STATUSCODE_FORBIDDEN = 403;
private static final String DOCUMENT_ELEMENT_DRIVER = "driver"; //$NON-NLS-1$
@@ -342,37 +345,68 @@
return JAXB.unmarshal(new StringReader(sendRequest(DCNS.REALMS + "/" + realmId, RequestType.GET)), Realm.class);
}
+ /**
+ * Retrieves a key for a given name on the deltacloud server and stores it
+ * in the file at the given path. The file gets created if the file path does not exist yet.
+ *
+ * @param keyname
+ * the name of the key to retrieve from the server
+ * @param keyStoreLocation
+ * the path to the file to store the key in
+ * @throws DeltaCloudClientException
+ * the delta cloud client exception
+ */
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 = Path.fromOSString(keyStoreLocation).append(keyname + ".pem").toFile(); //$NON-NLS-1$
- if (!keyFile.exists())
- keyFile.createNewFile();
- keyFile.setReadable(false, false);
- keyFile.setWritable(true, true);
- keyFile.setReadable(true, true);
- StringBuffer sb = new StringBuffer();
- String line;
- BufferedReader reader = new BufferedReader(new StringReader(keyText.get(0)));
- while ((line = reader.readLine()) != null) {
- // We must trim off the white-space from the xml
- // Complete white-space lines are to be ignored.
- String trimmedLine = line.trim();
- if (trimmedLine.length() > 0)
- sb.append(trimmedLine).append("\n");
- }
- FileWriter w = new FileWriter(keyFile);
- w.write(sb.toString());
- w.close();
+ String key = trimKey(getKey(xml));
+ File keyFile = createKeyFile(keyname, keyStoreLocation);
+ storeKey(key, keyFile);
} catch (Exception e) {
throw new DeltaCloudClientException(e);
}
}
+ private void storeKey(String key, File keyFile) throws IOException {
+ FileWriter w = new FileWriter(keyFile);
+ w.write(key);
+ w.close();
+ }
+
+ private String trimKey(List<String> keyText) throws IOException {
+ StringBuffer sb = new StringBuffer();
+ String line;
+ BufferedReader reader = new BufferedReader(new StringReader(keyText.get(0)));
+ while ((line = reader.readLine()) != null) {
+ // We must trim off the white-space from the xml
+ // Complete white-space lines are to be ignored.
+ String trimmedLine = line.trim();
+ if (trimmedLine.length() > 0) {
+ sb.append(trimmedLine).append("\n");
+ }
+ }
+ return sb.toString();
+ }
+
+ private List<String> getKey(String xml) throws ParserConfigurationException, SAXException, IOException {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ Document document = db.parse(new InputSource(new StringReader(xml)));
+ List<String> keyText = getElementText(document, PEM_FILE_SUFFIX); //$NON-NLS-1$
+ return keyText;
+ }
+
+ private File createKeyFile(String keyname, String keyStoreLocation) throws IOException {
+ File keyFile = Path.fromOSString(keyStoreLocation).append(keyname + "." + PEM_FILE_SUFFIX).toFile(); //$NON-NLS-1$
+ if (!keyFile.exists()) {
+ keyFile.createNewFile();
+ }
+ keyFile.setReadable(false, false);
+ keyFile.setWritable(true, true);
+ keyFile.setReadable(true, true);
+ return keyFile;
+ }
+
public void deleteKey(String keyname) throws DeltaCloudClientException {
sendRequest(DCNS.KEYS + "/" + keyname, RequestType.DELETE);
}
14 years, 1 month
JBoss Tools SVN: r26089 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-27 09:23:24 -0400 (Wed, 27 Oct 2010)
New Revision: 26089
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
Log:
[JBIDE-7431] cleanup: corrected imports
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-27 13:18:27 UTC (rev 26088)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-27 13:23:24 UTC (rev 26089)
@@ -13,7 +13,6 @@
import java.net.MalformedURLException;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
import org.eclipse.jface.dialogs.ErrorDialog;
14 years, 1 month
JBoss Tools SVN: r26088 - in trunk/deltacloud: plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-27 09:18:27 -0400 (Wed, 27 Oct 2010)
New Revision: 26088
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudNotFoundException.java
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/client/DeltaCloudClient.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
Log:
[JBIDE-7431] catched only DeltaCloudNotFoundException (== only case that indicates auth succeeded), added error reporting dialog for all other errors in the UI, added tests
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-10-27 12:45:49 UTC (rev 26087)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-10-27 13:18:27 UTC (rev 26088)
@@ -28,16 +28,17 @@
import org.jboss.tools.deltacloud.core.client.DeltaCloudAuthException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudNotFoundException;
import org.jboss.tools.deltacloud.core.client.HardwareProfile;
import org.jboss.tools.deltacloud.core.client.Image;
import org.jboss.tools.deltacloud.core.client.Instance;
import org.jboss.tools.deltacloud.core.client.Realm;
public class DeltaCloud {
-
+
public final static String MOCK_TYPE = "MOCK"; //$NON-NLS-1$
public final static String EC2_TYPE = "EC2"; //$NON-NLS-1$
-
+
private String name;
private String username;
private String url;
@@ -53,21 +54,21 @@
private Object imageLock = new Object();
private Object instanceLock = new Object();
private Object actionLock = new Object();
-
+
ListenerList instanceListeners = new ListenerList();
ListenerList imageListeners = new ListenerList();
-
+
public DeltaCloud(String name, String url, String username, String passwd) throws MalformedURLException {
this(name, url, username, passwd, null, false, IImageFilter.ALL_STRING, IInstanceFilter.ALL_STRING);
}
- public DeltaCloud(String name, String url, String username, String passwd,
+ public DeltaCloud(String name, String url, String username, String passwd,
String type, boolean persistent) throws MalformedURLException {
this(name, url, username, passwd, type, persistent, IImageFilter.ALL_STRING, IInstanceFilter.ALL_STRING);
}
- public DeltaCloud(String name, String url, String username, String passwd,
- String type, boolean persistent,
+ public DeltaCloud(String name, String url, String username, String passwd,
+ String type, boolean persistent,
String imageFilterRules, String instanceFilterRules) throws MalformedURLException {
this.client = new DeltaCloudClient(new URL(url), username, passwd); //$NON-NLS-1$
this.url = url;
@@ -90,8 +91,9 @@
storePassword(url, username, passwd);
}
}
-
- public void editCloud(String name, String url, String username, String passwd, String type) throws MalformedURLException {
+
+ public void editCloud(String name, String url, String username, String passwd, String type)
+ throws MalformedURLException {
this.client = new DeltaCloudClient(new URL(url + "/api"), username, passwd); //$NON-NLS-1$
this.url = url;
this.name = name;
@@ -105,7 +107,7 @@
String key = DeltaCloud.getPreferencesKey(url, username);
ISecurePreferences node = root.node(key);
try {
- node.put("password", passwd, true /*encrypt*/);
+ node.put("password", passwd, true /* encrypt */);
} catch (StorageException e) {
e.printStackTrace();
}
@@ -116,43 +118,43 @@
key += url + "/" + username; //$NON-NLS-1$
return EncodingUtils.encodeSlashes(key);
}
-
+
public String getName() {
return name;
}
-
+
public String getURL() {
return url;
}
-
+
public String getUsername() {
return username;
}
-
+
public String getType() {
return type;
}
-
+
public String getLastImageId() {
return lastImageId;
}
-
+
public void setLastImageId(String lastImageId) {
this.lastImageId = lastImageId;
}
-
+
public String getLastKeyname() {
return lastKeyname;
}
-
+
public void setLastKeyname(String lastKeyname) {
this.lastKeyname = lastKeyname;
}
-
+
public IInstanceFilter getInstanceFilter() {
return instanceFilter;
}
-
+
public void createInstanceFilter(String ruleString) {
String rules = getInstanceFilter().toString();
if (IInstanceFilter.ALL_STRING.equals(ruleString))
@@ -166,11 +168,11 @@
notifyInstanceListListeners(getCurrInstances());
}
}
-
+
public IImageFilter getImageFilter() {
return imageFilter;
}
-
+
public void createImageFilter(String ruleString) {
String rules = getImageFilter().toString();
if (IImageFilter.ALL_STRING.equals(ruleString))
@@ -184,7 +186,7 @@
notifyImageListListeners(getCurrImages());
}
}
-
+
public void loadChildren() {
Thread t = new Thread(new Runnable() {
@@ -193,20 +195,20 @@
getImages();
getInstances();
}
-
+
});
t.start();
}
-
+
public void save() {
// Currently we have to save all clouds instead of just this one
DeltaCloudManager.getDefault().saveClouds();
}
-
+
public void addInstanceListListener(IInstanceListListener listener) {
instanceListeners.add(listener);
}
-
+
public void removeInstanceListListener(IInstanceListListener listener) {
instanceListeners.remove(listener);
}
@@ -214,21 +216,21 @@
public void notifyInstanceListListeners(DeltaCloudInstance[] array) {
Object[] listeners = instanceListeners.getListeners();
for (int i = 0; i < listeners.length; ++i)
- ((IInstanceListListener)listeners[i]).listChanged(this, array);
+ ((IInstanceListListener) listeners[i]).listChanged(this, array);
}
-
+
public void addImageListListener(IImageListListener listener) {
imageListeners.add(listener);
}
-
+
public void removeImageListListener(IImageListListener listener) {
imageListeners.remove(listener);
}
-
+
public void notifyImageListListeners(DeltaCloudImage[] array) {
Object[] listeners = imageListeners.getListeners();
for (int i = 0; i < listeners.length; ++i)
- ((IImageListListener)listeners[i]).listChanged(this, array);
+ ((IImageListListener) listeners[i]).listChanged(this, array);
}
public Job getActionJob(String id) {
@@ -255,7 +257,7 @@
actionJobs.remove(id);
}
}
-
+
public DeltaCloudInstance[] getInstances() {
synchronized (instanceLock) {
instances = new ArrayList<DeltaCloudInstance>();
@@ -274,7 +276,7 @@
return instanceArray;
}
}
-
+
public DeltaCloudInstance[] getCurrInstances() {
synchronized (instanceLock) {
if (instances == null)
@@ -284,7 +286,7 @@
return instanceArray;
}
}
-
+
public DeltaCloudInstance[] destroyInstance(String instanceId) {
try {
client.destroyInstance(instanceId);
@@ -311,7 +313,7 @@
throw new DeltaCloudException(e);
}
}
-
+
public void deleteKey(String keyname) throws DeltaCloudException {
try {
client.deleteKey(keyname);
@@ -339,7 +341,7 @@
notifyInstanceListListeners(instanceArray);
}
}
-
+
public DeltaCloudInstance refreshInstance(String instanceId) {
DeltaCloudInstance retVal = null;
try {
@@ -348,8 +350,10 @@
for (int i = 0; i < instances.size(); ++i) {
DeltaCloudInstance inst = instances.get(i);
if (inst.getId().equals(instanceId)) {
- // FIXME: remove BOGUS state when server fixes state problems
- if (!(retVal.getState().equals(DeltaCloudInstance.BOGUS)) && !(inst.getState().equals(retVal.getState()))) {
+ // FIXME: remove BOGUS state when server fixes state
+ // problems
+ if (!(retVal.getState().equals(DeltaCloudInstance.BOGUS))
+ && !(inst.getState().equals(retVal.getState()))) {
instances.set(i, retVal);
DeltaCloudInstance[] instanceArray = new DeltaCloudInstance[instances.size()];
instanceArray = instances.toArray(instanceArray);
@@ -363,7 +367,7 @@
}
return retVal;
}
-
+
public boolean performInstanceAction(String instanceId, String action) throws DeltaCloudException {
try {
return client.performInstanceAction(instanceId, action);
@@ -387,7 +391,7 @@
profileArray = profiles.toArray(profileArray);
return profileArray;
}
-
+
public DeltaCloudImage[] getImages() {
synchronized (imageLock) {
images = new ArrayList<DeltaCloudImage>();
@@ -408,7 +412,7 @@
}
public DeltaCloudImage[] getCurrImages() {
- synchronized(imageLock) {
+ synchronized (imageLock) {
if (images == null)
return getImages();
DeltaCloudImage[] imageArray = new DeltaCloudImage[images.size()];
@@ -416,7 +420,7 @@
return imageArray;
}
}
-
+
public DeltaCloudImage getImage(String imageId) {
DeltaCloudImage retVal = null;
try {
@@ -428,15 +432,17 @@
}
return retVal;
}
-
+
public boolean testConnection() throws DeltaCloudClientException {
- String instanceId = "madeupValue"; //$NON-NLS-1$
+ String instanceId = "nonexistingInstance"; //$NON-NLS-1$
try {
client.listInstances(instanceId);
return true;
+ } catch( DeltaCloudNotFoundException e) {
+ return true;
} catch (DeltaCloudAuthException e) {
return false;
- }
+ }
}
public DeltaCloudRealm[] getRealms() {
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-10-27 12:45:49 UTC (rev 26087)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-27 13:18:27 UTC (rev 26088)
@@ -53,6 +53,8 @@
public class DeltaCloudClient implements API {
+ private static final int HTTP_STATUSCODE_NOTFOUND = 404;
+ private static final int HTTP_STATUSCODE_FORBIDDEN = 403;
private static final String DOCUMENT_ELEMENT_DRIVER = "driver"; //$NON-NLS-1$
private static final String DOCUMENT_ELEMENT_API = "api"; //$NON-NLS-1$
private static final int HTTP_STATUSCODE_SERVERERROR = 500;
@@ -142,17 +144,24 @@
int statusCode = httpResponse.getStatusLine().getStatusCode();
if (isHttpForbiddenError(statusCode)) {
throw new DeltaCloudAuthException(
- MessageFormat.format("the server reported an authorization error \"{0}\" on requesting \"{1}\"",
+ MessageFormat.format("The server reported an authorization error \"{0}\" on requesting \"{1}\"",
httpResponse.getStatusLine().getReasonPhrase(), requestUrl));
+ } else if (isHttpNotFoundError(statusCode)) {
+ throw new DeltaCloudNotFoundException(
+ MessageFormat.format("The server could not find the resource \"{0}\"", requestUrl));
} else if (isHttpClientError(statusCode) || isHttpServerError(statusCode)) {
throw new DeltaCloudClientException(
- MessageFormat.format("the server reported an error \"{0}\" on requesting \"{1}\"",
+ MessageFormat.format("The server reported an error \"{0}\" on requesting \"{1}\"",
httpResponse.getStatusLine().getReasonPhrase(), requestUrl));
}
}
+ private boolean isHttpNotFoundError(int statusCode) {
+ return statusCode == HTTP_STATUSCODE_NOTFOUND;
+ }
+
private boolean isHttpForbiddenError(int statusCode) {
- return statusCode == 403;
+ return statusCode == HTTP_STATUSCODE_FORBIDDEN;
}
private boolean isHttpClientError(int statusCode) {
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudNotFoundException.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudNotFoundException.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudNotFoundException.java 2010-10-27 13:18:27 UTC (rev 26088)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.core.client;
+
+public class DeltaCloudNotFoundException extends DeltaCloudClientException {
+
+ private static final long serialVersionUID = 1L;
+
+ public DeltaCloudNotFoundException(String message, Throwable clause)
+ {
+ super(message, clause);
+ }
+
+ public DeltaCloudNotFoundException(Throwable clause)
+ {
+ super(clause);
+ }
+
+ public DeltaCloudNotFoundException(String message)
+ {
+ super(message);
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudNotFoundException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-27 12:45:49 UTC (rev 26087)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-27 13:18:27 UTC (rev 26088)
@@ -51,7 +51,7 @@
cloud.getType(), this);
addPage(mainPage);
} catch (MalformedURLException e) {
- Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e);
+ IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
ErrorDialog.openError(getShell(), WizardMessages.getString("EditCloudConnectionError.title"),
WizardMessages.getString("EditCloudConnectionError.message"), status);
}
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2010-10-27 12:45:49 UTC (rev 26087)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2010-10-27 13:18:27 UTC (rev 26088)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.test.core;
+import static org.junit.Assert.assertFalse;
+
import java.io.IOException;
import java.net.MalformedURLException;
@@ -45,21 +47,23 @@
}
@Test
- public void testConnectionDoesNotThrowOnForbidden() throws MalformedURLException, DeltaCloudClientException {
+ public void testConnectionReportsFalseOnAuthFailure() throws MalformedURLException, DeltaCloudClientException {
ServerFake serverFake = setupServerFake("HTTP/1.1 403 Forbidden\n\n\n");
try {
- DeltaCloud deltaCloud = new DeltaCloud("aName", "http://localhost:" + ServerFake.DEFAULT_PORT, "badUser", "badPassword");
- deltaCloud.testConnection();
+ DeltaCloud deltaCloud = new DeltaCloud("aName", "http://localhost:" + ServerFake.DEFAULT_PORT, "badUser",
+ "badPassword");
+ assertFalse(deltaCloud.testConnection());
} finally {
serverFake.stop();
}
}
- @Test(expected=DeltaCloudClientException.class)
- public void testConnectionDoesThrowOnGeneralError() throws MalformedURLException, DeltaCloudClientException {
+ @Test(expected = DeltaCloudClientException.class)
+ public void testConnectionThrowsOnGeneralFailure() throws MalformedURLException, DeltaCloudClientException {
ServerFake serverFake = setupServerFake("HTTP/1.1 501 Some Error\ndummy dummy dummy\n\n");
try {
- DeltaCloud deltaCloud = new DeltaCloud("aName", "http://localhost:" + ServerFake.DEFAULT_PORT, "badUser", "badPassword");
+ DeltaCloud deltaCloud = new DeltaCloud("aName", "http://localhost:" + ServerFake.DEFAULT_PORT, "badUser",
+ "badPassword");
deltaCloud.testConnection();
} finally {
serverFake.stop();
14 years, 1 month
JBoss Tools SVN: r26087 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp: messages and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-10-27 08:45:49 -0400 (Wed, 27 Oct 2010)
New Revision: 26087
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsContributionItem.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-7381 , "..." was added to the popup menu title.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsContributionItem.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsContributionItem.java 2010-10-27 12:34:30 UTC (rev 26086)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsContributionItem.java 2010-10-27 12:45:49 UTC (rev 26087)
@@ -30,7 +30,7 @@
/*
* Simply sets the title
*/
- getAction().setText(JstUIMessages.EXTERNALIZE_STRINGS);
+ getAction().setText(JstUIMessages.EXTERNALIZE_STRINGS_POPUP_MENU_TITLE);
super.fill(parent, index);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2010-10-27 12:34:30 UTC (rev 26086)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2010-10-27 12:45:49 UTC (rev 26087)
@@ -130,6 +130,7 @@
public static String HIDE_SELECTION_BAR;
public static String EXTERNALIZE_STRINGS;
+ public static String EXTERNALIZE_STRINGS_POPUP_MENU_TITLE;
public static String EXTERNALIZE_STRINGS_DIALOG_TITLE;
public static String EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION;
public static String EXTERNALIZE_STRINGS_DIALOG_TEXT_STRING;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2010-10-27 12:34:30 UTC (rev 26086)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2010-10-27 12:45:49 UTC (rev 26087)
@@ -109,6 +109,7 @@
# Externalize Strings Dialog
EXTERNALIZE_STRINGS=Externalize strings
+EXTERNALIZE_STRINGS_POPUP_MENU_TITLE=Externalize strings...
EXTERNALIZE_STRINGS_DIALOG_TITLE=Externalize Strings
EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION=Externalize your strings via properties file
EXTERNALIZE_STRINGS_DIALOG_TEXT_STRING=Text string:
14 years, 1 month
JBoss Tools SVN: r26086 - in trunk/deltacloud: plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-27 08:34:30 -0400 (Wed, 27 Oct 2010)
New Revision: 26086
Added:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/DeltacloudIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ImageMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ServerTypeMockIntegrationTest.java
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltacloudIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
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
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java
Log:
[JBIDE-7407] catched only DeltaCloudAuthException, added error reporting dialog for all other errors in the UI, added tests
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 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2010-10-27 12:34:30 UTC (rev 26086)
@@ -10,9 +10,9 @@
org.jboss.tools.usage;bundle-version="1.0.0";resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
-Export-Package: org.jboss.tools.deltacloud.core;x-friends:="org.jboss.tools.deltacloud.ui",
- org.jboss.tools.deltacloud.core.client,
- org.apache.http.client.methods;x-friends:="org.jboss.tools.deltacloud.test"
+Export-Package: org.apache.http.client.methods;x-friends:="org.jboss.tools.deltacloud.test",
+ org.jboss.tools.deltacloud.core;x-friends:="org.jboss.tools.deltacloud.ui,org.jboss.tools.deltacloud.test",
+ org.jboss.tools.deltacloud.core.client
Bundle-ClassPath: .,
lib/apache-mime4j-0.6.jar,
lib/commons-codec-1.3.jar,
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-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -429,15 +429,13 @@
return retVal;
}
- public boolean testConnection() {
+ public boolean testConnection() throws DeltaCloudClientException {
String instanceId = "madeupValue"; //$NON-NLS-1$
try {
client.listInstances(instanceId);
return true;
} catch (DeltaCloudAuthException e) {
return false;
- } catch (DeltaCloudClientException e) {
- return false;
}
}
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-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -124,11 +124,7 @@
try {
HttpUriRequest request = getRequest(requestType, requestUrl);
HttpResponse httpResponse = httpClient.execute(request);
- if (isHttpError(httpResponse.getStatusLine().getStatusCode())) {
- throw new DeltaCloudClientException(
- MessageFormat.format("the server reported an error \"{0}\" on requesting \"{1}\"",
- httpResponse.getStatusLine().getReasonPhrase(),requestUrl));
- }
+ throwOnHttpErrors(requestUrl, httpResponse);
return getResponse(httpResponse.getEntity());
} catch (DeltaCloudClientException e) {
throw e;
@@ -142,19 +138,21 @@
}
}
- private String getResponse(HttpEntity entity) throws IOException,
- DeltaCloudClientException {
- if (entity == null) {
- return null;
+ private void throwOnHttpErrors(String requestUrl, HttpResponse httpResponse) throws DeltaCloudClientException {
+ int statusCode = httpResponse.getStatusLine().getStatusCode();
+ if (isHttpForbiddenError(statusCode)) {
+ throw new DeltaCloudAuthException(
+ MessageFormat.format("the server reported an authorization error \"{0}\" on requesting \"{1}\"",
+ httpResponse.getStatusLine().getReasonPhrase(), requestUrl));
+ } else if (isHttpClientError(statusCode) || isHttpServerError(statusCode)) {
+ throw new DeltaCloudClientException(
+ MessageFormat.format("the server reported an error \"{0}\" on requesting \"{1}\"",
+ httpResponse.getStatusLine().getReasonPhrase(), requestUrl));
}
- String xml = readInputStreamToString(entity.getContent());
- logger.debug("Response\n" + xml);
- return xml;
}
- private boolean isHttpError(int statusCode) throws DeltaCloudClientException {
- return isHttpServerError(statusCode)
- || isHttpClientError(statusCode);
+ private boolean isHttpForbiddenError(int statusCode) {
+ return statusCode == 403;
}
private boolean isHttpClientError(int statusCode) {
@@ -167,6 +165,16 @@
&& (statusCode - HTTP_STATUSCODE_SERVERERROR) < 100;
}
+ private String getResponse(HttpEntity entity) throws IOException,
+ DeltaCloudClientException {
+ if (entity == null) {
+ return null;
+ }
+ String xml = readInputStreamToString(entity.getContent());
+ logger.debug("Response\n" + xml);
+ return xml;
+ }
+
/**
* Returns a request instance for the given request type and url.
*
@@ -389,22 +397,24 @@
sendRequest(DCNS.INSTANCES + "/" + instanceId, RequestType.DELETE);
}
-// private void checkForErrors(Document d) throws DeltaCloudClientException {
-// NodeList n = d.getElementsByTagName("error");
-// for (int i = 0; i < n.getLength(); ++i) {
-// Node node = n.item(i);
-// Node statusNode = node.getAttributes().getNamedItem("status");
-// if (statusNode != null) {
-// String status = node.getAttributes().getNamedItem("status").getNodeValue();
-// if (status.equals("403"))
-// throw new DeltaCloudAuthException("Authorization error");
-// else if (status.equals("404"))
-// throw new DeltaCloudClientException("Not found");
-// else
-// throw new DeltaCloudClientException("Connection error");
-// }
-// }
-// }
+ // private void checkForErrors(Document d) throws DeltaCloudClientException
+ // {
+ // NodeList n = d.getElementsByTagName("error");
+ // for (int i = 0; i < n.getLength(); ++i) {
+ // Node node = n.item(i);
+ // Node statusNode = node.getAttributes().getNamedItem("status");
+ // if (statusNode != null) {
+ // String status =
+ // node.getAttributes().getNamedItem("status").getNodeValue();
+ // if (status.equals("403"))
+ // throw new DeltaCloudAuthException("Authorization error");
+ // else if (status.equals("404"))
+ // throw new DeltaCloudClientException("Not found");
+ // else
+ // throw new DeltaCloudClientException("Connection error");
+ // }
+ // }
+ // }
private Instance buildInstance(String xml) throws DeltaCloudClientException {
try {
@@ -414,7 +424,7 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
-// checkForErrors(document);
+ // checkForErrors(document);
instance.setImageId(getIdFromHref(getAttributeValues(document, "image", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
instance.setProfileId(getIdFromHref(getAttributeValues(document, "hardware_profile", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
@@ -431,8 +441,8 @@
instance.setActions(actions);
return instance;
-// } catch (DeltaCloudClientException e) {
-// throw e;
+ // } catch (DeltaCloudClientException e) {
+ // throw e;
} catch (Exception e) {
DeltaCloudClientException newException = new DeltaCloudClientException(e.getLocalizedMessage());
throw newException;
@@ -447,7 +457,7 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
-// checkForErrors(document);
+ // checkForErrors(document);
List<Node> nodes = getPropertyNodes(document, "hardware_profile"); //$NON-NLS-1$
@@ -588,7 +598,7 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(is);
-// checkForErrors(document);
+ // checkForErrors(document);
document.getElementsByTagName(path).toString();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-10-27 12:34:30 UTC (rev 26086)
@@ -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="org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.swt@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.core.runtime.compatibility@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.osgi@-1:true,org.eclipse.core.net@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.core.runtime@default:true,org.jbos!
s.tools.common@default:default,org.eclipse.wst.common.core@default:default,javax.servlet@default:default,org.eclipse.debug.ui@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.runtime.compatibility.auth@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,javax.servlet.jsp@default:default,org.eclipse.ui.navigator@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.databinding@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.apache.xerces@default:default,org.apache.ant@default:default,org.hamcrest.core@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.resources@default:default,org.eclipse.equinox.prefere!
nces@default:default,org.eclipse.jface.databinding@default:def!
ault,com
.instantiations.designer.jdt.fragment@default:false,org.eclipse.emf.ecore@default:default,org.eclipse.help.base@default:default,javax.xml@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.help.webapp@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.help.ui@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.jface.text@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.registry@default:default,com.ibm.icu@default:default,org.eclipse.search@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jdt.core@default:default,org.eclipse.core.filebuffers@default:default,org.junit4@default:default,org.apache.lucene.analysis@default:default,org.mortbay.jetty.!
util@default:default,org.eclipse.compare@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ui.views@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jem.util@default:default,org.eclipse.sdk@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.validation@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.security@default:default,org.apache.lucene@default:default,o!
rg.eclipse.jdt.debug@default:default,org.eclipse.ui.forms@defa!
ult:defa
ult,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.ecf@default:default,org.eclipse.team.ui@default:default,org.eclipse.help.appserver@default:default,org.eclipse.osgi.util@default:default,org.apache.jasper@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.update.configurator@3:true,org.eclipse.help@default:default,org.eclipse.ui.navigator.resources@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.app@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui@default:default,org.apache.xml.resolver@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.ui.console@default:default,org.eclipse.rse!
.core@default:default,org.eclipse.text@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.team.core@default:default,org.eclipse.compare.core@default:default,org.apache.commons.el@default:default,org.apache.xml.serializer@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jdt.launching@default:default,org.eclipse.ui.editors@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.debug.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.usage@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.help@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.common@default:default,org.eclipse.jface@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.ui@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ant.core@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.jboss.tools.common@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,javax.servlet.jsp@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.text@default:default,org.eclipse.wst.validation@default:def!
ault,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.debug@default:default,org.eclipse.core.databinding.property@default:default,org.mortbay.jetty.server@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.expressions@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.forms@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ecf.ssl@default:false,org.apache.xml.resolver@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jem.util@default:default,org.apache.lucene.analysis@defau!
lt:default,org.eclipse.ecf.identity@default:default,org.eclips!
e.help.a
ppserver@default:default,org.hamcrest.core@default:default,com.ibm.icu@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.databinding@default:default,org.eclipse.swt@default:default,org.apache.xerces@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.editors@default:default,org.apache.xml.serializer@default:default,org.eclipse.search@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.comm!
on.project.facet.core@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.sdk@default:default,org.eclipse.core.resources@default:default,org.eclipse.ecf@default:default,org.apache.ant@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.junit4@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.team.core@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.rse.core@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.net@default:default,org.eclipse.jface.text@default:default,org.eclipse.help.webapp@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.wst.common.emf@default:default,org.apache.jasper@default:default,org.eclipse.update.configurator@3:true,org.eclipse.ui.views.proper!
ties.tabbed@default:default,javax.servlet@default:default,org.!
eclipse.
compare@default:default,org.apache.commons.el@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.views@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.debug.ui@default:default,org.eclipse.osgi@-1:true,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui.ide@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runtime.!
compatibility.registry@default:false,org.eclipse.equinox.p2.repository@default:default,javax.xml@default:default,org.eclipse.equinox.http.registry@default:default,org.apache.lucene@default:default,org.eclipse.help.base@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.rse.services@default:default,org.eclipse.core.variables@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.core@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.deltacloud.core@default:default,org.jruby.jruby@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/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -21,8 +21,10 @@
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.ui.Activator;
public class EditCloudConnection extends Wizard implements INewWizard, CloudConnection {
@@ -84,6 +86,15 @@
} catch (MalformedURLException e) {
Activator.log(e);
return false;
+ } catch (DeltaCloudClientException e) {
+ IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ Activator.log(status);
+ ErrorDialog.openError(
+ getShell(),
+ WizardMessages.getString("CloudConnectionAuthError.title"),
+ WizardMessages.getFormattedString("CloudConnectionAuthError.message", url),
+ status);
+ return true;
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -12,23 +12,27 @@
import java.net.MalformedURLException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.ui.Activator;
public class NewCloudConnection extends Wizard implements INewWizard, CloudConnection {
private static final String MAINPAGE_NAME = "NewCloudConnection.name"; //$NON-NLS-1$
private CloudConnectionPage mainPage;
-
+
public NewCloudConnection() {
super();
}
-
+
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
}
@@ -55,9 +59,18 @@
} catch (MalformedURLException e) {
Activator.log(e);
return false;
+ } catch (DeltaCloudClientException e) {
+ IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ Activator.log(status);
+ ErrorDialog.openError(
+ getShell(),
+ WizardMessages.getString("CloudConnectionAuthError.title"),
+ WizardMessages.getFormattedString("CloudConnectionAuthError.message", url),
+ status);
+ return true;
}
}
-
+
@Override
public boolean performFinish() {
String name = mainPage.getModel().getName();
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-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-27 12:34:30 UTC (rev 26086)
@@ -18,6 +18,9 @@
EditCloudConnectionError.title=Error Editing Cloud Connection
EditCloudConnectionError.message=Could not open connection wizard
+CloudConnectionAuthError.title=Error when authorizing
+CloudConnectionAuthError.message=Could not authorize to the cloud on url {0}
+
Url.label=URL:
Name.label=Name:
Type.label=Type:
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.gathering,org.mozilla.xulrunner.cocoa.macosx,org.jboss.tools.common,org.jboss.tools.deltacloud.docs,org.mozilla.xulrunner.gtk.linux.x86_64,org.jboss.tools.usage,org.mozilla.xulrunner.win32.win32.x86,com.jboss.jbds.usage.branding,org.jboss.tools.usage.test,org.mozilla.xulrunner.gtk.linux.x86,org.eclipse.epp.usagedata.ui,org.mozilla.xulrunner.carbon.macosx,org.mozilla.xpcom,org.jboss.tools.tests,org.jboss.tools.deltacloud.ui,org.jruby.jruby"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.core.DeltaCloudMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<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"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.help@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.common@default:default,org.eclipse.jface@default:default,org.eclipse.ui@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.text@default:default,org.eclipse.wst.validation@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.debug@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.app@defau!
lt:default,org.eclipse.core.runtime@default:true,org.eclipse.core.expressions@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.forms@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ecf.ssl@default:false,org.apache.xml.resolver@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jem.util@default:default,org.eclipse.ecf.identity@default:default,org.hamcrest.core@default:default,com.ibm.icu@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.databinding@default:default,org.eclipse.swt@default:default,org.apache.xerces@default:default,org.eclipse.equinox.concurrent@defau!
lt:default,org.eclipse.core.filebuffers@default:default,org.ec!
lipse.em
f.ecore@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.editors@default:default,org.apache.xml.serializer@default:default,org.eclipse.search@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.ecf@default:default,org.eclipse.jdt.compiler.apt@default:false,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.team.core@default:default,org.eclipse.jdt.core.manipulation@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.net@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.wst.common.emf@default:default,org.eclip!
se.ui.views.properties.tabbed@default:default,javax.servlet@default:default,org.eclipse.compare@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.views@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.debug.ui@default:default,org.eclipse.osgi@-1:true,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui.ide@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runt!
ime.compatibility.registry@default:false,org.eclipse.equinox.p!
2.reposi
tory@default:default,javax.xml@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.compare.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.variables@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.core@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudMockIntegrationTest.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ImageMockIntegrationTest.launch 2010-10-27 12:34:30 UTC (rev 26086)
@@ -16,7 +16,7 @@
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java"/>
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ImageMockIntegrationTest.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -29,7 +29,7 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.ImageMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.core.client.ImageMockIntegrationTest"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -37,7 +37,7 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.runtime@default:true,org.eclipse.debug.core@default:default,org.eclipse.ecf.identity@default:default,org.apache.xml.resolver@default:default,org.eclipse.compare@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.ecore.xmi@default:default,com.ibm.icu@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.osgi.util@default:default,org.eclipse.wst.validation@default:default,org.eclipse.equinox.p2.repository@default:default,org.ecli!
pse.search@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.console@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf@default:default,org.eclipse.jface@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.common@2:true,org.apache.xml.serializer@default:default,org.apache.xerces@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ec!
f.filetransfer@default:default,org.eclipse.jdt.compiler.apt@de!
fault:fa
lse,org.eclipse.compare.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swt@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.variables@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.text@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.ide@default!
:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.ui.editors@default:default,org.eclipse.team.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.jdt.debug@default:default,javax.xml@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.navigator.resources@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.jobs@de!
fault:default,org.eclipse.core.commands@default:default,org.ec!
lipse.os
gi@-1:true,org.eclipse.wst.sse.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jdt.core@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.jface.text@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.filesystem@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.help@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.common@default:default,org.eclipse.jface@default:default,org.eclipse.ui@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.text@default:default,org.eclipse.wst.validation@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.debug@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.app@defau!
lt:default,org.eclipse.core.runtime@default:true,org.eclipse.core.expressions@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.forms@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ecf.ssl@default:false,org.apache.xml.resolver@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jem.util@default:default,org.eclipse.ecf.identity@default:default,org.hamcrest.core@default:default,com.ibm.icu@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.databinding@default:default,org.eclipse.swt@default:default,org.apache.xerces@default:default,org.eclipse.equinox.concurrent@defau!
lt:default,org.eclipse.core.filebuffers@default:default,org.ec!
lipse.em
f.ecore@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.editors@default:default,org.apache.xml.serializer@default:default,org.eclipse.search@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.ecf@default:default,org.eclipse.jdt.compiler.apt@default:false,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.team.core@default:default,org.eclipse.jdt.core.manipulation@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.net@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.wst.common.emf@default:default,org.eclip!
se.ui.views.properties.tabbed@default:default,javax.servlet@default:default,org.eclipse.compare@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.views@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.debug.ui@default:default,org.eclipse.osgi@-1:true,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui.ide@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runt!
ime.compatibility.registry@default:false,org.eclipse.equinox.p!
2.reposi
tory@default:default,javax.xml@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.compare.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.variables@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.core@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/InstanceMockIntegrationTest.launch 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
@@ -16,7 +15,7 @@
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java"/>
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -29,7 +28,7 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.InstanceMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.core.client.InstanceMockIntegrationTest"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -37,7 +36,7 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,javax.servlet.jsp@default:default,org.eclipse.help.base@default:default,org.eclipse.core.runtime@default:true,org.eclipse.debug.core@default:default,org.eclipse.ecf.identity@default:default,org.apache.xml.resolver@default:default,org.eclipse.compare@default:default,javax.servlet@default:default,org.eclipse.ui@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.ecore.xmi@default:default,com.ibm.icu@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.osgi.util@default:d!
efault,org.apache.lucene.analysis@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.validation@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.repository@default:default,org.eclipse.search@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.console@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf@default:default,org.eclipse.jface@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.jem.util@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.common@2:true,org.apache.xml.seria!
lizer@default:default,org.apache.xerces@default:default,org.ec!
lipse.eq
uinox.security@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ecf.filetransfer@default:default,org.apache.ant@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.compare.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swt@default:default,org.eclipse.osgi.services@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.variables@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.swtbot.ant.optional.junit3@!
default:false,org.eclipse.equinox.p2.metadata@default:default,org.apache.lucene@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.text@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.help@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.ide@default:default,org.junit4@default:default,org.apache.commons.el@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.ui.editors@default:default,org.eclipse.team.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.ui@default:default,org.ecl!
ipse.ant.core@default:default,org.eclipse.jdt.debug@default:de!
fault,or
g.mortbay.jetty.util@default:default,javax.xml@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.sdk@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.navigator.resources@default:default,com.instantiations.designer.jdt.fragment@default:false,org.apache.jasper@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.commands@default:default,org.eclipse.osgi@-1:true,org.eclipse.wst.sse.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jdt.core@default:d!
efault,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.jface.text@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.filesystem@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.help@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.common@default:default,org.eclipse.jface@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.ui@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ant.core@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui.workbench@default:default,javax.servlet.jsp@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.text@default:default,org.eclipse.wst.validation@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.jdt.debug@default:default,!
org.eclipse.core.databinding.property@default:default,org.mortbay.jetty.server@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.expressions@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.forms@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ecf.ssl@default:false,org.apache.xml.resolver@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jem.util@default:default,org.apache.lucene.analysis@default:default,org.eclipse.ecf.identity@default:default,org.hamcrest.core@default:default,com.ibm.icu@default:default,org.eclipse.equinox.preferenc!
es@default:default,org.eclipse.equinox.p2.engine@default:defau!
lt,org.e
clipse.core.databinding@default:default,org.eclipse.swt@default:default,org.apache.xerces@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.editors@default:default,org.apache.xml.serializer@default:default,org.eclipse.search@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.sdk@default:default,org.eclipse.core.resources@default:default,org.eclipse.ecf@defa!
ult:default,org.apache.ant@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.junit4@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.team.core@default:default,org.eclipse.jdt.core.manipulation@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.core.net@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.wst.common.emf@default:default,org.apache.jasper@default:default,org.eclipse.update.configurator@3:true,org.eclipse.ui.views.properties.tabbed@default:default,javax.servlet@default:default,org.eclipse.compare@default:default,org.apache.commons.el@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@d!
efault:default,org.eclipse.ui.console@default:default,org.ecli!
pse.equi
nox.registry@default:default,org.eclipse.ui.views@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.debug.ui@default:default,org.eclipse.osgi@-1:true,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui.ide@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.jdt.compiler.tool@default:false,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.repository@default:default,javax.xml@default:default,org.apache.lucene@default:default,org.eclipse.help.base@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.compare.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default!
,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.variables@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.core@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.core@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/ServerTypeMockIntegrationTest.launch 2010-10-27 12:34:30 UTC (rev 26086)
@@ -16,7 +16,7 @@
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java"/>
+<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ServerTypeMockIntegrationTest.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -29,7 +29,7 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.ServerTypeMockIntegrationTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.core.client.ServerTypeMockIntegrationTest"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test;
+
+import org.jboss.tools.internal.deltacloud.test.core.DeltaCloudMockIntegrationTest;
+import org.jboss.tools.internal.deltacloud.test.core.client.ImageMockIntegrationTest;
+import org.jboss.tools.internal.deltacloud.test.core.client.InstanceMockIntegrationTest;
+import org.jboss.tools.internal.deltacloud.test.core.client.KeyMockIntegrationTest;
+import org.jboss.tools.internal.deltacloud.test.core.client.ServerTypeMockIntegrationTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * @author Andre Dietisheim
+ */
+(a)RunWith(Suite.class)
+(a)Suite.SuiteClasses({
+ DeltaCloudMockIntegrationTest.class,
+ ImageMockIntegrationTest.class,
+ InstanceMockIntegrationTest.class,
+ KeyMockIntegrationTest.class,
+ ServerTypeMockIntegrationTest.class
+})
+public class DeltaCloudIntegrationTestSuite {
+
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudIntegrationTestSuite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltacloudIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltacloudIntegrationTest.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltacloudIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,34 +0,0 @@
-package org.jboss.tools.internal.deltacloud.test;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Collections;
-
-import org.jruby.Ruby;
-import org.jruby.RubyInstanceConfig;
-import org.jruby.javasupport.JavaEmbedUtils;
-
-public class DeltacloudIntegrationTest {
-
- public void runDeltaCloud() throws IOException {
-
- RubyInstanceConfig config = new RubyInstanceConfig();
- Ruby ruby = JavaEmbedUtils.initialize(Collections.EMPTY_LIST, config);
- try {
- ruby.executeScript(readScript("/bootstrap-deltacloud.rb"), "/bootstrap-deltacloud.rb");
- } finally {
- JavaEmbedUtils.terminate(ruby);
- }
- }
-
- private String readScript(String script) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(script)));
- StringWriter writer = new StringWriter();
- while (reader.ready())
- new PrintWriter(writer).println(reader.readLine());
- return writer.toString();
- }
-}
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.List;
-
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.core.client.Image;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ImageMockIntegrationTest {
-
- private MockIntegrationTestSetup testSetup;
-
- @Before
- public void setUp() throws IOException, DeltaCloudClientException {
- this.testSetup = new MockIntegrationTestSetup();
- testSetup.setUp();
- }
-
- @After
- public void tearDown() {
- testSetup.tearDown();
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void cannotListIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
- DeltaCloudClient client = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL, "badUser", "badPassword");
- client.listImages();
- }
-
- @Test
- public void throwsDeltaCloudClientExceptionOnUnknownResource() {
- try {
- DeltaCloudClient errorClient = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL) {
- @Override
- protected HttpUriRequest getRequest(RequestType requestType, String requestUrl) {
- return new HttpGet(MockIntegrationTestSetup.DELTACLOUD_URL + "/DUMMY");
- }
- };
- errorClient.listImages();
- fail("no exception catched");
- } catch (Exception e) {
- assertEquals(DeltaCloudClientException.class, e.getClass());
- }
- }
-
- @Test
- public void assertImagesFromWebUI() throws DeltaCloudClientException {
- List<Image> images = testSetup.getClient().listImages();
- assertEquals(3, images.size());
- assertImage("img2", "Fedora 10", "fedoraproject", "Fedora 10", "i386", images.get(0));
- assertImage("img1", "Fedora 10", "fedoraproject", "Fedora 10", "x86_64", images.get(1));
- assertImage("img3", "JBoss", "mockuser", "JBoss", "i386", images.get(2));
- }
-
- private void assertImage(String id, String name, String owner, String description, String architecture, Image image) {
- assertEquals(id, image.getId());
- assertEquals(name, image.getName());
- assertEquals(owner, image.getOwnerId());
- assertEquals(architecture, image.getArchitecture());
- assertEquals(description, image.getDescription());
- }
-}
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.List;
-
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.core.client.Image;
-import org.jboss.tools.deltacloud.core.client.Instance;
-import org.jboss.tools.deltacloud.core.client.Instance.State;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Integration tests for instance related methods in {@link DeltaCloudClient}.
- *
- * @see DeltaCloudClient#listInstances()
- * @see DeltaCloudClient#createInstance(String)
- * @see DeltaCloudClient#destroyInstance(String)
- * @see DeltaCloudClient#startInstance(String)
- */
-public class InstanceMockIntegrationTest {
-
- private MockIntegrationTestSetup testSetup;
-
- @Before
- public void setUp() throws IOException, DeltaCloudClientException {
- this.testSetup = new MockIntegrationTestSetup();
- testSetup.setUp();
- }
-
- @After
- public void tearDown() {
- testSetup.tearDown();
- }
-
- /**
- * #listInstance contains the test instance created in {@link #setUp()}
- *
- * @throws DeltaCloudClientException
- * the delta cloud client exception
- */
- @Test
- public void listContainsTestInstance() throws DeltaCloudClientException {
- DeltaCloudClient client = testSetup.getClient();
- List<Instance> instances = client.listInstances();
- assertTrue(instances.size() > 0);
- Instance testInstance = testSetup.getTestInstance();
- assertNotNull(testSetup.getInstanceById(testInstance.getId(), client));
- }
-
- @Test
- public void listTestInstance() throws DeltaCloudClientException {
- Instance instance = testSetup.getClient().listInstances(testSetup.getTestInstance().getId());
- assertNotNull(instance);
- Instance testInstance = testSetup.getTestInstance();
- assertEquals(testInstance.getId(), instance.getId());
- assertInstance(
- testInstance.getName()
- , testInstance.getOwnerId()
- , testInstance.getImageId()
- , testInstance.getRealmId()
- , testInstance.getProfileId()
- , testInstance.getMemory()
- , testInstance.getPrivateAddresses()
- , testInstance.getPublicAddresses()
- , instance);
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void listDestroyedInstanceThrowsException() throws DeltaCloudClientException {
- Instance testInstance = testSetup.getTestInstance();
- testSetup.quietlyDestroyInstance(testInstance);
- testSetup.getClient().listInstances(testInstance.getId());
- }
-
- private void assertInstance(String name, String owner, String ImageId, String realmId, String profile,
- String memory, List<String> privateAddresses, List<String> publicAddresses, Instance instance) {
- assertNotNull(instance);
- assertEquals(name, instance.getName());
- assertEquals(owner, instance.getOwnerId());
- assertEquals(realmId, instance.getRealmId());
- assertEquals(profile, instance.getProfileId());
- assertEquals(memory, instance.getMemory());
- assertTrue(privateAddresses.equals(instance.getPrivateAddresses()));
- assertTrue(publicAddresses.equals(instance.getPublicAddresses()));
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void cannotDestroyIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
- DeltaCloudClient unauthenticatedClient = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL,
- "badUser", "badPassword");
- Image image = testSetup.getFirstImage(unauthenticatedClient);
- unauthenticatedClient.createInstance(image.getId());
- }
-
- @Test
- public void canCreateInstance() throws DeltaCloudClientException {
- Instance instance = null;
- try {
- Image image = testSetup.getFirstImage(testSetup.getClient());
- instance = testSetup.getClient().createInstance(image.getId());
- assertTrue(instance != null);
- assertEquals(image.getId(), instance.getImageId());
- assertEquals(State.RUNNING, instance.getState());
- } finally {
- testSetup.quietlyDestroyInstance(instance);
- }
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void cannotDestroyUnknownImageId() throws DeltaCloudClientException {
- testSetup.getClient().createInstance("dummy");
- }
-
- @Test
- public void canDestroy() throws DeltaCloudClientException {
- Image image = testSetup.getFirstImage(testSetup.getClient());
- Instance instance = testSetup.getClient().createInstance(image.getId());
- testSetup.getClient().destroyInstance(instance.getId());
- assertNull(testSetup.getInstanceById(instance.getId(), testSetup.getClient()));
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void destroyThrowExceptionOnUnknowInstanceId() throws DeltaCloudClientException {
- testSetup.getClient().destroyInstance("dummy");
- }
-
- @Test
- public void canShutdownInstance() throws DeltaCloudClientException {
- Instance testInstance = testSetup.getTestInstance();
- DeltaCloudClient client = testSetup.getClient();
- client.shutdownInstance(testInstance.getId());
- testInstance = client.listInstances(testInstance.getId()); // reload!
- assertEquals(State.STOPPED, testInstance.getState());
- }
-
- @Test
- public void canStartInstance() throws DeltaCloudClientException {
- Instance testInstance = testSetup.getTestInstance();
- DeltaCloudClient client = testSetup.getClient();
- if (testInstance.getState() == State.RUNNING) {
- client.shutdownInstance(testInstance.getId());
- }
- client.startInstance(testInstance.getId());
- testInstance = client.listInstances(testInstance.getId()); // reload!
- assertEquals(State.RUNNING, testInstance.getState());
- }
-}
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test;
-
-import java.io.IOException;
-
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.junit.After;
-import org.junit.Before;
-
-/**
- * Integration tests for key related operations in delta cloud client.
- *
- * @see DeltaCloudClient#createKey(String, String)
- * @see DeltaCloudClient#deleteKey(String)
- */
-public class KeyMockIntegrationTest {
-
- private MockIntegrationTestSetup testSetup;
-
- @Before
- public void setUp() throws IOException, DeltaCloudClientException {
- this.testSetup = new MockIntegrationTestSetup();
- testSetup.setUp();
- }
-
- @After
- public void tearDown() {
- testSetup.tearDown();
- }
-}
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.List;
-
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.core.client.Image;
-import org.jboss.tools.deltacloud.core.client.Instance;
-
-public class MockIntegrationTestSetup {
-
- public static final String DELTACLOUD_URL = "http://localhost:3001";
- public static final String SERVERFAKE_URL = "http://localhost:3002";
- public static final String DELTACLOUD_USER = "mockuser";
- public static final String DELTACLOUD_PASSWORD = "mockpassword";
-
- private DeltaCloudClient client;
- private Instance testInstance;
-
- public void setUp() throws IOException, DeltaCloudClientException {
- ensureDeltaCloudIsRunning();
- this.client = new DeltaCloudClient(DELTACLOUD_URL, DELTACLOUD_USER, DELTACLOUD_PASSWORD);
- Image image = getFirstImage(client);
- this.testInstance = createTestInstance(image);
- }
-
- private Instance createTestInstance(Image image) throws DeltaCloudClientException {
- assertNotNull(image);
- Instance instance = client.createInstance(image.getId());
- return instance;
- }
-
- public void ensureDeltaCloudIsRunning() throws IOException {
- try {
- URLConnection connection = new URL(DELTACLOUD_URL).openConnection();
- connection.connect();
- } catch (ConnectException e) {
- fail("Local DeltaCloud instance is not running. Please start a DeltaCloud instance before running these tests.");
- }
- }
-
- public DeltaCloudClient getClient() {
- return client;
- }
-
- public Instance getTestInstance() {
- return testInstance;
- }
-
- public Image getFirstImage(DeltaCloudClient client) throws DeltaCloudClientException {
- List<Image> images = client.listImages();
- assertTrue(images.size() >= 1);
- Image image = images.get(0);
- return image;
- }
-
-
- public Instance getInstanceById(String id, DeltaCloudClient client) throws DeltaCloudClientException {
- for (Instance availableInstance : client.listInstances()) {
- if (id.equals(availableInstance.getId())) {
- return availableInstance;
- }
- }
- return null;
- }
-
- public void tearDown() {
- quietlyDestroyInstance(testInstance);
- }
-
- public void quietlyDestroyInstance(Instance instance) {
- if (instance != null) {
- try {
- client.destroyInstance(instance.getId());
- } catch (Exception e) {
- // ignore
- }
- }
- }
-}
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
-import org.jboss.tools.internal.deltacloud.test.fakes.ServerFake;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Integration tests for {@link DeltaCloudClient#getServerType()}.
- */
-public class ServerTypeMockIntegrationTest {
-
- private MockIntegrationTestSetup testSetup;
-
- @Before
- public void setUp() throws IOException, DeltaCloudClientException {
- this.testSetup = new MockIntegrationTestSetup();
- testSetup.setUp();
- }
-
- @After
- public void tearDown() {
- testSetup.tearDown();
- }
-
- @Test
- public void recognizesDeltaCloud() throws IOException {
- assertEquals(DeltaCloudClient.DeltaCloudType.MOCK,testSetup.getClient().getServerType());
- }
-
- /**
- *
- * #getServerType reports {@link DeltaCloudClient.DeltaCloudType#UNKNOWN) if it queries a fake server that responds with a unknown answer.
- *
- * @throws IOException
- * Signals that an I/O exception has occurred.
- */
- @Test
- public void reportsUnknownUrl() throws IOException {
- ServerFake serverFake = new ServerFake(new URL(MockIntegrationTestSetup.SERVERFAKE_URL).getPort(), "<dummy></dummy>");
- serverFake.start();
- try {
- assertEquals(DeltaCloudClient.DeltaCloudType.UNKNOWN, new DeltaCloudClient(MockIntegrationTestSetup.SERVERFAKE_URL, MockIntegrationTestSetup.DELTACLOUD_USER,
- MockIntegrationTestSetup.DELTACLOUD_PASSWORD).getServerType());
- } finally {
- serverFake.stop();
- }
- }
-
- @Test(expected = DeltaCloudClientException.class)
- public void listImages_cannotListIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
- DeltaCloudClient client = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL, "badUser", "badPassword");
- client.listImages();
- }
-
- @Test
- public void throwsDeltaCloudClientExceptionOnUnknownResource() {
- try {
- DeltaCloudClient errorClient = new DeltaCloudClient(MockIntegrationTestSetup.DELTACLOUD_URL) {
- @Override
- protected HttpUriRequest getRequest(RequestType requestType, String requestUrl) {
- return new HttpGet(MockIntegrationTestSetup.DELTACLOUD_URL + "/DUMMY");
- }
- };
- errorClient.listImages();
- fail("no exception catched");
- } catch (Exception e) {
- assertEquals(DeltaCloudClientException.class, e.getClass());
- }
- }
-}
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java (from rev 26012, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/MockIntegrationTestSetup.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test.context;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.List;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.Image;
+import org.jboss.tools.deltacloud.core.client.Instance;
+
+/**
+ * A class that holds the integration test context
+ *
+ * @author Andre Dietisheim
+ *
+ */
+public class MockIntegrationTestContext {
+
+ public static final String DELTACLOUD_URL = "http://localhost:3001";
+ public static final String SERVERFAKE_URL = "http://localhost:3002";
+ public static final String DELTACLOUD_USER = "mockuser";
+ public static final String DELTACLOUD_PASSWORD = "mockpassword";
+
+ private DeltaCloudClient client;
+ private Instance testInstance;
+
+ public void setUp() throws IOException, DeltaCloudClientException {
+ ensureDeltaCloudIsRunning();
+ this.client = new DeltaCloudClient(DELTACLOUD_URL, DELTACLOUD_USER, DELTACLOUD_PASSWORD);
+ Image image = getFirstImage(client);
+ this.testInstance = createTestInstance(image);
+ }
+
+ private Instance createTestInstance(Image image) throws DeltaCloudClientException {
+ assertNotNull(image);
+ Instance instance = client.createInstance(image.getId());
+ return instance;
+ }
+
+ public void ensureDeltaCloudIsRunning() throws IOException {
+ try {
+ URLConnection connection = new URL(DELTACLOUD_URL).openConnection();
+ connection.connect();
+ } catch (ConnectException e) {
+ fail("Local DeltaCloud instance is not running. Please start a DeltaCloud instance before running these tests.");
+ }
+ }
+
+ public DeltaCloudClient getClient() {
+ return client;
+ }
+
+ public Instance getTestInstance() {
+ return testInstance;
+ }
+
+ public Image getFirstImage(DeltaCloudClient client) throws DeltaCloudClientException {
+ List<Image> images = client.listImages();
+ assertTrue(images.size() >= 1);
+ Image image = images.get(0);
+ return image;
+ }
+
+
+ public Instance getInstanceById(String id, DeltaCloudClient client) throws DeltaCloudClientException {
+ for (Instance availableInstance : client.listInstances()) {
+ if (id.equals(availableInstance.getId())) {
+ return availableInstance;
+ }
+ }
+ return null;
+ }
+
+ public void tearDown() {
+ quietlyDestroyInstance(testInstance);
+ }
+
+ public void quietlyDestroyInstance(Instance instance) {
+ if (instance != null) {
+ try {
+ client.destroyInstance(instance.getId());
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test.core;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
+import org.jboss.tools.internal.deltacloud.test.fakes.ServerFake;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * An integration test that test the connection test method in DeltaCloud
+ *
+ * @author Andre Dietisheim
+ *
+ * @see DeltaCloud#testConnection()
+ *
+ */
+public class DeltaCloudMockIntegrationTest {
+
+ private MockIntegrationTestContext testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestContext();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ @Test
+ public void testConnectionDoesNotThrowOnForbidden() throws MalformedURLException, DeltaCloudClientException {
+ ServerFake serverFake = setupServerFake("HTTP/1.1 403 Forbidden\n\n\n");
+ try {
+ DeltaCloud deltaCloud = new DeltaCloud("aName", "http://localhost:" + ServerFake.DEFAULT_PORT, "badUser", "badPassword");
+ deltaCloud.testConnection();
+ } finally {
+ serverFake.stop();
+ }
+ }
+
+ @Test(expected=DeltaCloudClientException.class)
+ public void testConnectionDoesThrowOnGeneralError() throws MalformedURLException, DeltaCloudClientException {
+ ServerFake serverFake = setupServerFake("HTTP/1.1 501 Some Error\ndummy dummy dummy\n\n");
+ try {
+ DeltaCloud deltaCloud = new DeltaCloud("aName", "http://localhost:" + ServerFake.DEFAULT_PORT, "badUser", "badPassword");
+ deltaCloud.testConnection();
+ } finally {
+ serverFake.stop();
+ }
+ }
+
+ private ServerFake setupServerFake(String response) throws MalformedURLException {
+ ServerFake serverFake = new ServerFake(response);
+ serverFake.start();
+ return serverFake;
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/DeltacloudIntegrationTest.java (from rev 25937, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltacloudIntegrationTest.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/DeltacloudIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/DeltacloudIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,34 @@
+package org.jboss.tools.internal.deltacloud.test.core.client;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Collections;
+
+import org.jruby.Ruby;
+import org.jruby.RubyInstanceConfig;
+import org.jruby.javasupport.JavaEmbedUtils;
+
+public class DeltacloudIntegrationTest {
+
+ public void runDeltaCloud() throws IOException {
+
+ RubyInstanceConfig config = new RubyInstanceConfig();
+ Ruby ruby = JavaEmbedUtils.initialize(Collections.EMPTY_LIST, config);
+ try {
+ ruby.executeScript(readScript("/bootstrap-deltacloud.rb"), "/bootstrap-deltacloud.rb");
+ } finally {
+ JavaEmbedUtils.terminate(ruby);
+ }
+ }
+
+ private String readScript(String script) throws IOException {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(script)));
+ StringWriter writer = new StringWriter();
+ while (reader.ready())
+ new PrintWriter(writer).println(reader.readLine());
+ return writer.toString();
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/DeltacloudIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ImageMockIntegrationTest.java (from rev 25998, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ImageMockIntegrationTest.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ImageMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ImageMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test.core.client;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.Image;
+import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * An integration test that test various image related operations in DeltaCloudClient
+ *
+ * @author Andre Dietisheim
+ *
+ * @see DeltaCloudClient#listImages()
+ * @see DeltaCloudClient#listImages(String)
+ *
+ */
+public class ImageMockIntegrationTest {
+
+ private MockIntegrationTestContext testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestContext();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void cannotListIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
+ DeltaCloudClient client = new DeltaCloudClient(MockIntegrationTestContext.DELTACLOUD_URL, "badUser", "badPassword");
+ client.listImages();
+ }
+
+ @Test
+ public void assertImagesFromWebUI() throws DeltaCloudClientException {
+ List<Image> images = testSetup.getClient().listImages();
+ assertEquals(3, images.size());
+ assertImage("img2", "Fedora 10", "fedoraproject", "Fedora 10", "i386", images.get(0));
+ assertImage("img1", "Fedora 10", "fedoraproject", "Fedora 10", "x86_64", images.get(1));
+ assertImage("img3", "JBoss", "mockuser", "JBoss", "i386", images.get(2));
+ }
+
+ private void assertImage(String id, String name, String owner, String description, String architecture, Image image) {
+ assertEquals(id, image.getId());
+ assertEquals(name, image.getName());
+ assertEquals(owner, image.getOwnerId());
+ assertEquals(architecture, image.getArchitecture());
+ assertEquals(description, image.getDescription());
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ImageMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java (from rev 26018, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test.core.client;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.Image;
+import org.jboss.tools.deltacloud.core.client.Instance;
+import org.jboss.tools.deltacloud.core.client.Instance.State;
+import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Integration tests for instance related methods in {@link DeltaCloudClient}.
+ *
+ * @author Andre Dietisheim
+ *
+ * @see DeltaCloudClient#listInstances()
+ * @see DeltaCloudClient#createInstance(String)
+ * @see DeltaCloudClient#destroyInstance(String)
+ * @see DeltaCloudClient#startInstance(String)
+ * @see DeltaCloudClient#shutdownInstance(String)
+ */
+public class InstanceMockIntegrationTest {
+
+ private MockIntegrationTestContext testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestContext();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ /**
+ * #listInstance contains the test instance created in {@link #setUp()}
+ *
+ * @throws DeltaCloudClientException
+ * the delta cloud client exception
+ */
+ @Test
+ public void listContainsTestInstance() throws DeltaCloudClientException {
+ DeltaCloudClient client = testSetup.getClient();
+ List<Instance> instances = client.listInstances();
+ assertTrue(instances.size() > 0);
+ Instance testInstance = testSetup.getTestInstance();
+ assertNotNull(testSetup.getInstanceById(testInstance.getId(), client));
+ }
+
+ @Test
+ public void listTestInstance() throws DeltaCloudClientException {
+ Instance instance = testSetup.getClient().listInstances(testSetup.getTestInstance().getId());
+ assertNotNull(instance);
+ Instance testInstance = testSetup.getTestInstance();
+ assertEquals(testInstance.getId(), instance.getId());
+ assertInstance(
+ testInstance.getName()
+ , testInstance.getOwnerId()
+ , testInstance.getImageId()
+ , testInstance.getRealmId()
+ , testInstance.getProfileId()
+ , testInstance.getMemory()
+ , testInstance.getPrivateAddresses()
+ , testInstance.getPublicAddresses()
+ , instance);
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void listDestroyedInstanceThrowsException() throws DeltaCloudClientException {
+ Instance testInstance = testSetup.getTestInstance();
+ testSetup.quietlyDestroyInstance(testInstance);
+ testSetup.getClient().listInstances(testInstance.getId());
+ }
+
+ private void assertInstance(String name, String owner, String ImageId, String realmId, String profile,
+ String memory, List<String> privateAddresses, List<String> publicAddresses, Instance instance) {
+ assertNotNull(instance);
+ assertEquals(name, instance.getName());
+ assertEquals(owner, instance.getOwnerId());
+ assertEquals(realmId, instance.getRealmId());
+ assertEquals(profile, instance.getProfileId());
+ assertEquals(memory, instance.getMemory());
+ assertTrue(privateAddresses.equals(instance.getPrivateAddresses()));
+ assertTrue(publicAddresses.equals(instance.getPublicAddresses()));
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void cannotDestroyIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
+ DeltaCloudClient unauthenticatedClient = new DeltaCloudClient(MockIntegrationTestContext.DELTACLOUD_URL,
+ "badUser", "badPassword");
+ Image image = testSetup.getFirstImage(unauthenticatedClient);
+ unauthenticatedClient.createInstance(image.getId());
+ }
+
+ @Test
+ public void canCreateInstance() throws DeltaCloudClientException {
+ Instance instance = null;
+ try {
+ Image image = testSetup.getFirstImage(testSetup.getClient());
+ instance = testSetup.getClient().createInstance(image.getId());
+ assertTrue(instance != null);
+ assertEquals(image.getId(), instance.getImageId());
+ assertEquals(State.RUNNING, instance.getState());
+ } finally {
+ testSetup.quietlyDestroyInstance(instance);
+ }
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void cannotDestroyUnknownImageId() throws DeltaCloudClientException {
+ testSetup.getClient().createInstance("dummy");
+ }
+
+ @Test
+ public void canDestroy() throws DeltaCloudClientException {
+ Image image = testSetup.getFirstImage(testSetup.getClient());
+ Instance instance = testSetup.getClient().createInstance(image.getId());
+ testSetup.getClient().destroyInstance(instance.getId());
+ assertNull(testSetup.getInstanceById(instance.getId(), testSetup.getClient()));
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void destroyThrowExceptionOnUnknowInstanceId() throws DeltaCloudClientException {
+ testSetup.getClient().destroyInstance("dummy");
+ }
+
+ @Test
+ public void canShutdownInstance() throws DeltaCloudClientException {
+ Instance testInstance = testSetup.getTestInstance();
+ DeltaCloudClient client = testSetup.getClient();
+ client.shutdownInstance(testInstance.getId());
+ testInstance = client.listInstances(testInstance.getId()); // reload!
+ assertEquals(State.STOPPED, testInstance.getState());
+ }
+
+ @Test
+ public void canStartInstance() throws DeltaCloudClientException {
+ Instance testInstance = testSetup.getTestInstance();
+ DeltaCloudClient client = testSetup.getClient();
+ if (testInstance.getState() == State.RUNNING) {
+ client.shutdownInstance(testInstance.getId());
+ }
+ client.startInstance(testInstance.getId());
+ testInstance = client.listInstances(testInstance.getId()); // reload!
+ assertEquals(State.RUNNING, testInstance.getState());
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/InstanceMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java (from rev 25998, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/KeyMockIntegrationTest.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test.core.client;
+
+import java.io.IOException;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
+import org.junit.After;
+import org.junit.Before;
+
+/**
+ * Integration tests for key related operations in delta cloud client.
+ *
+ * @author Andre Dietisheim
+ *
+ * @see DeltaCloudClient#createKey(String, String)
+ * @see DeltaCloudClient#deleteKey(String)
+ */
+public class KeyMockIntegrationTest {
+
+ private MockIntegrationTestContext testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestContext();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ServerTypeMockIntegrationTest.java (from rev 25998, trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ServerTypeMockIntegrationTest.java)
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ServerTypeMockIntegrationTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ServerTypeMockIntegrationTest.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.test.core.client;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
+import org.jboss.tools.internal.deltacloud.test.fakes.ServerFake;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Integration tests for {@link DeltaCloudClient#getServerType()}.
+ *
+ * @author Andre Dietisheim
+ *
+ * @see DeltaCloudClient#getServerType()
+ */
+public class ServerTypeMockIntegrationTest {
+
+ private MockIntegrationTestContext testSetup;
+
+ @Before
+ public void setUp() throws IOException, DeltaCloudClientException {
+ this.testSetup = new MockIntegrationTestContext();
+ testSetup.setUp();
+ }
+
+ @After
+ public void tearDown() {
+ testSetup.tearDown();
+ }
+
+ @Test
+ public void recognizesDeltaCloud() throws IOException {
+ assertEquals(DeltaCloudClient.DeltaCloudType.MOCK,testSetup.getClient().getServerType());
+ }
+
+ /**
+ *
+ * #getServerType reports {@link DeltaCloudClient.DeltaCloudType#UNKNOWN) if it queries a fake server that responds with a unknown answer.
+ *
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ @Test
+ public void reportsUnknownUrl() throws IOException {
+ ServerFake serverFake = new ServerFake(new URL(MockIntegrationTestContext.SERVERFAKE_URL).getPort(), "<dummy></dummy>");
+ serverFake.start();
+ try {
+ assertEquals(DeltaCloudClient.DeltaCloudType.UNKNOWN, new DeltaCloudClient(MockIntegrationTestContext.SERVERFAKE_URL, MockIntegrationTestContext.DELTACLOUD_USER,
+ MockIntegrationTestContext.DELTACLOUD_PASSWORD).getServerType());
+ } finally {
+ serverFake.stop();
+ }
+ }
+
+ @Test(expected = DeltaCloudClientException.class)
+ public void listImages_cannotListIfNotAuthenticated() throws MalformedURLException, DeltaCloudClientException {
+ DeltaCloudClient client = new DeltaCloudClient(MockIntegrationTestContext.DELTACLOUD_URL, "badUser", "badPassword");
+ client.listImages();
+ }
+
+ @Test
+ public void throwsDeltaCloudClientExceptionOnUnknownResource() {
+ try {
+ DeltaCloudClient errorClient = new DeltaCloudClient(MockIntegrationTestContext.DELTACLOUD_URL) {
+ @Override
+ protected HttpUriRequest getRequest(RequestType requestType, String requestUrl) {
+ return new HttpGet(MockIntegrationTestContext.DELTACLOUD_URL + "/DUMMY");
+ }
+ };
+ errorClient.listImages();
+ fail("no exception catched");
+ } catch (Exception e) {
+ assertEquals(DeltaCloudClientException.class, e.getClass());
+ }
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/ServerTypeMockIntegrationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java 2010-10-27 12:20:13 UTC (rev 26085)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerFake.java 2010-10-27 12:34:30 UTC (rev 26086)
@@ -19,10 +19,16 @@
public class ServerFake {
+ public static final int DEFAULT_PORT = 3002;
private ExecutorService executor;
private int port;
private String response;
+ private ServerFakeSocket serverSocket;
+ public ServerFake(String response) {
+ this(DEFAULT_PORT, response);
+ }
+
public ServerFake(int port, String response) {
this.port = port;
this.response = response;
@@ -30,11 +36,13 @@
public void start() {
executor = Executors.newFixedThreadPool(1);
- executor.submit(new ServerFakeSocket(port, response));
+ this.serverSocket = new ServerFakeSocket(port, response);
+ executor.submit(serverSocket);
}
public void stop() {
executor.shutdownNow();
+ serverSocket.shutdown();
}
private class ServerFakeSocket implements Runnable {
@@ -52,6 +60,14 @@
}
}
+ public void shutdown() {
+ try {
+ this.serverSocket.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
@Override
public void run() {
Socket socket;
@@ -60,6 +76,7 @@
OutputStream outputStream = socket.getOutputStream();
outputStream.write(response.getBytes());
outputStream.flush();
+ outputStream.close();
socket.close();
} catch (IOException e) {
e.printStackTrace();
14 years, 1 month
JBoss Tools SVN: r26085 - in trunk/seam/tests: org.jboss.tools.seam212GA.core.test and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-27 08:20:13 -0400 (Wed, 27 Oct 2010)
New Revision: 26085
Modified:
trunk/seam/tests/org.jboss.tools.seam211GA.core.test/
trunk/seam/tests/org.jboss.tools.seam212GA.core.test/
trunk/seam/tests/org.jboss.tools.seam212GA.ui.test/
trunk/seam/tests/org.jboss.tools.seam220CR1.core.test/
trunk/seam/tests/org.jboss.tools.seam220GA.core.test/
trunk/seam/tests/org.jboss.tools.seam221CR1.core.test/
trunk/seam/tests/org.jboss.tools.seam221CR1.ui.test/
trunk/seam/tests/org.jboss.tools.seam221CR2.core.test/
trunk/seam/tests/org.jboss.tools.seam221CR2.ui.test/
Log:
added target folders to svn:ignore
Property changes on: trunk/seam/tests/org.jboss.tools.seam211GA.core.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam212GA.core.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam212GA.ui.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam220CR1.core.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam220GA.core.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam221CR1.core.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam221CR1.ui.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam221CR2.core.test
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/seam/tests/org.jboss.tools.seam221CR2.ui.test
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 1 month
JBoss Tools SVN: r26084 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-27 07:57:58 -0400 (Wed, 27 Oct 2010)
New Revision: 26084
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java
Log:
Fixed compilation problems
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java 2010-10-27 11:24:44 UTC (rev 26083)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/RotateEditorsHandler.java 2010-10-27 11:57:58 UTC (rev 26084)
@@ -119,7 +119,6 @@
return null;
}
- @Override
public void updateElement(UIElement element, Map parameters) {
IPreferenceStore preferences = JspEditorPlugin.getDefault()
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java 2010-10-27 11:24:44 UTC (rev 26083)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBorderHandler.java 2010-10-27 11:57:58 UTC (rev 26084)
@@ -62,7 +62,6 @@
return null;
}
- @Override
public void updateElement(UIElement element, Map parameters) {
IEditorPart activeEditor = PlatformUI.getWorkbench()
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java 2010-10-27 11:24:44 UTC (rev 26083)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowBundleAsELHandler.java 2010-10-27 11:57:58 UTC (rev 26084)
@@ -63,7 +63,6 @@
return null;
}
- @Override
public void updateElement(UIElement element, Map parameters) {
IEditorPart activeEditor = PlatformUI.getWorkbench()
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java 2010-10-27 11:24:44 UTC (rev 26083)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowNonVisualTagsHandler.java 2010-10-27 11:57:58 UTC (rev 26084)
@@ -62,7 +62,6 @@
return null;
}
- @Override
public void updateElement(UIElement element, Map parameters) {
IEditorPart activeEditor = PlatformUI.getWorkbench()
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java 2010-10-27 11:24:44 UTC (rev 26083)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/ShowTextFormattingHandler.java 2010-10-27 11:57:58 UTC (rev 26084)
@@ -73,7 +73,6 @@
return null;
}
- @Override
public void updateElement(UIElement element, Map parameters) {
boolean toggleState = JspEditorPlugin.getDefault().getPreferenceStore()
14 years, 1 month
JBoss Tools SVN: r26083 - in trunk: vpe/plugins/org.jboss.tools.vpe and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-10-27 07:24:44 -0400 (Wed, 27 Oct 2010)
New Revision: 26083
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
Log:
added name for Visual Toolbar Icons Group, and fixed tooltip for 'Show bundle's messages as EL expression' button
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2010-10-27 08:43:44 UTC (rev 26082)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.properties 2010-10-27 11:24:44 UTC (rev 26083)
@@ -19,3 +19,5 @@
Toggle.Selection.Bar=Toggle Selection Bar
Externalize.Selected.Property=Externalize Strings...
+vpe.toolbar.name=VPE Toolbar
+
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2010-10-27 08:43:44 UTC (rev 26082)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2010-10-27 11:24:44 UTC (rev 26083)
@@ -401,7 +401,7 @@
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
- <toolbar
+ <toolbar label="%vpe.toolbar.name"
id="org.jboss.tools.jst.jsp.toolbars.sampleToolbar">
<command
commandId="org.jboss.tools.jst.jsp.commands.i18"
@@ -548,6 +548,9 @@
<with variable="activeEditorId">
<equals value="org.jboss.tools.jst.jsp.jspeditor.HTMLTextEditor"/>
</with>
+ <with variable="activeEditorId">
+ <equals value="org.jboss.tools.jst.jsp.jspeditor.DocBookEditor"/>
+ </with>
</or>
</and>
</definition>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-27 08:43:44 UTC (rev 26082)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-10-27 11:24:44 UTC (rev 26083)
@@ -307,7 +307,7 @@
icon="icons/bundle-as-el.gif"
style="toggle"
id="org.jboss.tools.vpe.toolbars.showBundleAsELCommand"
- tooltip="%vpe.toolbar.show_text_formatting">
+ tooltip="%vpe.toolbar.show_bundle_as_el">
<visibleWhen checkEnabled="false">
<reference definitionId="org.jboss.tools.ui.structuredEditor"/>
</visibleWhen>
14 years, 1 month