JBoss Tools SVN: r27872 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-04 11:17:51 -0500 (Tue, 04 Jan 2011)
New Revision: 27872
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.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/DeltaCloudImagesRepository.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7294]
* added factory for DeltaCloudInstance instances, removed functionality from DeltaCloudInstanceRepository
* removed name parameter from request since DeltaCloud does not honor the name you choose
* added alias support to NewInstanceWizard
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 2011-01-04 16:17:20 UTC (rev 27871)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-01-04 16:17:51 UTC (rev 27872)
@@ -411,7 +411,8 @@
if (deltaCloudImage == null) {
try {
Image image = client.listImages(id);
- deltaCloudImage = images.add(image, this);
+ deltaCloudImage = DeltaCloudImageFactory.create(image, this);
+ images.add(deltaCloudImage);
} catch (DeltaCloudClientException e) {
throw new DeltaCloudException(MessageFormat.format("Cloud not find image with id \"{0}\"", id), e);
}
@@ -535,7 +536,8 @@
clearImages();
DeltaCloudImagesRepository repo = getImagesRepository();
DeltaCloudImage[] oldImages = repo.get();
- repo.add(client.listImages(), this);
+ Collection<DeltaCloudImage> deltaCloudImages = DeltaCloudImageFactory.create(client.listImages(), this);
+ repo.add(deltaCloudImages);
// TODO: remove notification with all instanceRepo, replace by
// notifying the changed instance
firePropertyChange(PROP_IMAGES, oldImages, repo.get());
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java 2011-01-04 16:17:51 UTC (rev 27872)
@@ -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.deltacloud.core;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.jboss.tools.deltacloud.core.client.Image;
+
+/**
+ * @author André Dietisheim
+ */
+public class DeltaCloudImageFactory {
+
+ public static DeltaCloudImage create(Image image, DeltaCloud cloud) {
+ Assert.isLegal(image != null);
+ Assert.isLegal(cloud != null);
+
+ return new DeltaCloudImage(image, cloud);
+ }
+
+ public static Collection<DeltaCloudImage> create(List<Image> images, DeltaCloud cloud) {
+ Assert.isLegal(images != null);
+ Assert.isLegal(cloud != null);
+
+ List<DeltaCloudImage> deltaCloudImages = new ArrayList<DeltaCloudImage>();
+ for(Image image : images) {
+ DeltaCloudImage deltaCloudImage = create(image, cloud);
+ deltaCloudImages.add(deltaCloudImage);
+ }
+ return deltaCloudImages;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImagesRepository.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImagesRepository.java 2011-01-04 16:17:20 UTC (rev 27871)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImagesRepository.java 2011-01-04 16:17:51 UTC (rev 27872)
@@ -10,12 +10,7 @@
******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.jboss.tools.deltacloud.core.client.Image;
-
/**
* @author André Dietisheim
*/
@@ -25,23 +20,6 @@
super(DeltaCloudImage.class);
}
- // TODO: move to DeltaCloudImageFactory
- public DeltaCloudImage add(Image image, DeltaCloud cloud) {
- DeltaCloudImage deltaCloudImage = new DeltaCloudImage(image, cloud);
- add(deltaCloudImage);
- return deltaCloudImage;
- }
-
- // TODO: move to DeltaCloudImageFactory
- public Collection<DeltaCloudImage> add(Collection<Image> imagesToAdd, DeltaCloud cloud) {
- List<DeltaCloudImage> deltaCloudImages = new ArrayList<DeltaCloudImage>();
- for (Image image : imagesToAdd) {
- DeltaCloudImage deltaCloudImage = add(image, cloud);
- deltaCloudImages.add(deltaCloudImage);
- }
- return deltaCloudImages;
- }
-
@Override
protected boolean matches(String id, DeltaCloudImage image) {
return image != null
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-04 16:17:20 UTC (rev 27871)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-04 16:17:51 UTC (rev 27872)
@@ -408,6 +408,7 @@
new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_KEYNAME)))
.setBeforeSetValidator(
new KeyValidator()),
+ // TODO: internationalize strings
null);
ControlDecorationSupport.create(textBinding, SWT.LEFT | SWT.TOP);
14 years
JBoss Tools SVN: r27871 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-04 11:17:20 -0500 (Tue, 04 Jan 2011)
New Revision: 27871
Modified:
trunk/build/publish.sh
Log:
fix rsync logic so we're not putting multiple files into a dir, but RENAMING them
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2011-01-04 16:11:58 UTC (rev 27870)
+++ trunk/build/publish.sh 2011-01-04 16:17:20 UTC (rev 27871)
@@ -96,7 +96,8 @@
for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
# copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}
+ rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
+ rsync -aq ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}.MD5
fi
z=""
@@ -113,7 +114,8 @@
# generate MD5 sum for zip (file contains only the hash, not the hash + filename)
for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
- rsync -aq $z ${z}.MD5 ${STAGINGDIR}/${y}${SUFFNAME}
+ rsync -aq $z ${STAGINGDIR}/${y}${SUFFNAME}
+ rsync -aq ${z}.MD5 ${STAGINGDIR}/${y}${SUFFNAME}.MD5
fi
done
@@ -128,7 +130,8 @@
# generate MD5 sum for zip (file contains only the hash, not the hash + filename)
for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
- rsync -aq $z ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}
+ rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
+ rsync -aq ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}.MD5
fi
done
fi
14 years
JBoss Tools SVN: r27870 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-04 11:11:58 -0500 (Tue, 04 Jan 2011)
New Revision: 27870
Modified:
trunk/build/target-platform/publish.sh
Log:
remove '' from include and add cmdline flags
Modified: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh 2011-01-04 16:06:23 UTC (rev 27869)
+++ trunk/build/target-platform/publish.sh 2011-01-04 16:11:58 UTC (rev 27870)
@@ -6,6 +6,7 @@
repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
destinationPath=/home/hudson/static_build_env/jbds/target-platform
DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
+include="*"
exclude="--exclude '.blobstore'" # exclude the .blobstore
while [ "$#" -gt 0 ]; do
@@ -14,13 +15,16 @@
'-repoPath') repoPath="$2"; shift 2;;
'-destinationPath') destinationPath="$2"; shift 2;;
'-DESTINATION') DESTINATION="$2"; shift 2;;
+ '-include') include="$2"; shift 2;;
+ '-exclude') exclude="$2"; shift 2;;
'-jbds')
# defaults for JBDS
targetFile=jbds400-e361-wtp322.target
repoPath=/home/hudson/static_build_env/jbds/tools/sources/JBDS-REPO
destinationPath=/home/hudson/static_build_env/jbds/jbds-target-platform
DESTINATION=/qa/services/http/binaries/RHDS/updates/jbds-target-platform
- exclude="'.blobstore'" # include the .blobstore
+ include=".blobstore *" # include the .blobstore
+ exclude=""
shift 1;;
esac
done
@@ -34,7 +38,7 @@
du -sh ${repoPath} ${destinationPath}/${targetFile}
# copy/update into central place for reuse by local downstream build jobs
- date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} * ${destinationPath}/${targetFile}/
+ date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} ${include} ${destinationPath}/${targetFile}/
du -sh ${repoPath} ${destinationPath}/${targetFile}
@@ -43,7 +47,7 @@
mkdir -p ${DESTINATION}/
fi
# if the following line fails, make sure that ${DESTINATION} is already created on target server
- date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} * ${DESTINATION}/latest/
+ date; rsync -arzqc --delete-after --delete-excluded --rsh=ssh ${exclude} ${include} ${DESTINATION}/latest/
targetZip=/tmp/${targetFile}.zip
14 years
JBoss Tools SVN: r27869 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-04 11:06:23 -0500 (Tue, 04 Jan 2011)
New Revision: 27869
Modified:
trunk/build/publish.sh
Log:
check if file exists before trying to unzip it
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2011-01-04 15:54:02 UTC (rev 27868)
+++ trunk/build/publish.sh 2011-01-04 16:06:23 UTC (rev 27869)
@@ -121,13 +121,15 @@
if [[ ! -f ${STAGINGDIR}/all/${SNAPNAME} ]]; then
for z in $(find ${WORKSPACE} -maxdepth 5 -mindepth 3 -name "*Update*.zip" | sort | tail -1); do
#echo "$z ..."
- mkdir -p ${STAGINGDIR}/all
- unzip -u -o -q -d ${STAGINGDIR}/all/ $z
+ if [[ -f $z ]]; then
+ mkdir -p ${STAGINGDIR}/all
+ unzip -u -o -q -d ${STAGINGDIR}/all/ $z
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+ # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
+ for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
- rsync -aq $z ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}
+ rsync -aq $z ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}
+ fi
done
fi
14 years
JBoss Tools SVN: r27868 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-04 10:54:02 -0500 (Tue, 04 Jan 2011)
New Revision: 27868
Modified:
trunk/build/target-platform/publish.sh
Log:
explicitly include .blobstore
Modified: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh 2011-01-04 15:51:47 UTC (rev 27867)
+++ trunk/build/target-platform/publish.sh 2011-01-04 15:54:02 UTC (rev 27868)
@@ -6,7 +6,7 @@
repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
destinationPath=/home/hudson/static_build_env/jbds/target-platform
DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
-exclude="--exclude '.blobstore'"
+exclude="--exclude '.blobstore'" # exclude the .blobstore
while [ "$#" -gt 0 ]; do
case $1 in
@@ -20,7 +20,7 @@
repoPath=/home/hudson/static_build_env/jbds/tools/sources/JBDS-REPO
destinationPath=/home/hudson/static_build_env/jbds/jbds-target-platform
DESTINATION=/qa/services/http/binaries/RHDS/updates/jbds-target-platform
- exclude=""
+ exclude="'.blobstore'" # include the .blobstore
shift 1;;
esac
done
14 years
JBoss Tools SVN: r27867 - in trunk/deltacloud: plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-01-04 10:51:47 -0500 (Tue, 04 Jan 2011)
New Revision: 27867
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceAliasMapping.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceAliasMapping.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/utils/StringUtils.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudObjectRepository.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java
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/DeltaCloudImagesRepository.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstancesRepository.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
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/NewInstancePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java
Log:
[JBIDE-7294]
* added factory for DeltaCloudInstance instances, removed functionality from DeltaCloudInstanceRepository
* removed name parameter from request since DeltaCloud does not honor the name you choose
* added alias support to NewInstanceWizard
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2011-01-04 15:51:47 UTC (rev 27867)
@@ -1,3 +1,18 @@
+2011-01-04 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudInstancesRepository.java:
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (loadInstances):
+ [JBIDE-7294] added factory for DeltaCloudInstance instances, removed functionality from DeltaCloudInstanceRepository
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (createInstance):
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java (createInstance):
+ * src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java (doCreateUrl):
+ [JBIDE-7294] removed name parameter from request since DeltaCloud does not honor the name you choose
+ * src/org/jboss/tools/deltacloud/core/IInstanceAliasMapping.java:
+ * src/org/jboss/tools/deltacloud/core/InstanceAliasMapping.java:
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
+ (setAlias):
+ (getAlias):
+
2011-01-03 adietisheim <adietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (createInstance):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudObjectRepository.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudObjectRepository.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractDeltaCloudObjectRepository.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -37,7 +37,7 @@
public E[] add(E object) {
try {
lock();
- objects.add(object);
+ this.objects.add(object);
return get();
} finally {
unlock();
@@ -48,7 +48,7 @@
try {
lock();
for (E object : objects) {
- objects.add(object);
+ this.objects.add(object);
}
return get();
} finally {
@@ -59,7 +59,7 @@
public E[] clear() {
try {
lock();
- objects.clear();
+ this.objects.clear();
return get();
} finally {
unlock();
@@ -70,7 +70,7 @@
try {
lock();
@SuppressWarnings("unchecked")
- E[] objectArray = (E[]) objects.toArray((E[]) Array.newInstance(typeClass, objects.size()));
+ E[] objectArray = (E[]) this.objects.toArray((E[]) Array.newInstance(typeClass, objects.size()));
return objectArray;
} finally {
unlock();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -49,6 +49,7 @@
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
+ DeltaCloudManager.getDefault().dispose();
plugin = null;
super.stop(context);
}
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 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -12,6 +12,7 @@
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.regex.PatternSyntaxException;
@@ -58,36 +59,40 @@
private IInstanceFilter instanceFilter;
private SecurePasswordStore passwordStore;
+ private Collection<IInstanceAliasMapping> instanceAliasMappings;
public static interface IInstanceStateMatcher {
public boolean matchesState(DeltaCloudInstance instance, DeltaCloudInstance.State instanceState);
}
-
+
public DeltaCloud(String name, String url, String username, String passwd) throws DeltaCloudException {
this(name, url, username, passwd, null);
}
public DeltaCloud(String name, String url, String username, String password, Driver driver)
throws DeltaCloudException {
- this(name, url, username, password, driver, IImageFilter.ALL_STRING, IInstanceFilter.ALL_STRING);
+ this(name, url, username, password, driver, IImageFilter.ALL_STRING, IInstanceFilter.ALL_STRING, null);
}
public DeltaCloud(String name, String url, String username, Driver driver, String imageFilterRules,
- String instanceFilterRules)
- throws DeltaCloudException {
- this(name, url, username, null, driver, imageFilterRules, instanceFilterRules);
+ String instanceFilterRules, Collection<IInstanceAliasMapping> instanceAliasMappings) throws DeltaCloudException {
+ this(name, url, username, null, driver, imageFilterRules, instanceFilterRules, instanceAliasMappings);
}
public DeltaCloud(String name, String url, String username, String password, Driver driver,
- String imageFilterRules, String instanceFilterRules) throws DeltaCloudException {
+ String imageFilterRules, String instanceFilterRules, Collection<IInstanceAliasMapping> instanceAliasMappings) throws DeltaCloudException {
this.url = url;
this.name = name;
this.username = username;
this.driver = driver;
this.passwordStore = createSecurePasswordStore(name, username, password);
this.client = createClient(url, username, passwordStore.getPassword());
- imageFilter = createImageFilter(imageFilterRules);
- instanceFilter = createInstanceFilter(instanceFilterRules);
+ this.imageFilter = createImageFilter(imageFilterRules);
+ this.instanceFilter = createInstanceFilter(instanceFilterRules);
+ if (instanceAliasMappings == null) {
+ instanceAliasMappings = new ArrayList<IInstanceAliasMapping>();
+ }
+ this.instanceAliasMappings = instanceAliasMappings;
}
public void update(String name, String url, String username, String password, Driver driver)
@@ -332,7 +337,9 @@
clearInstances();
DeltaCloudInstancesRepository repo = getInstancesRepository();
DeltaCloudInstance[] oldInstances = repo.get();
- repo.add(client.listInstances(), this);
+ List<Instance> instances = client.listInstances();
+ Collection<DeltaCloudInstance> deltaCloudInstances = DeltaCloudInstanceFactory.create(instances, this, instanceAliasMappings);
+ repo.add(deltaCloudInstances);
// TODO: remove notification with all instanceRepo, replace by
// notifying the changed instance
firePropertyChange(PROP_INSTANCES, oldInstances, repo.get());
@@ -559,15 +566,15 @@
try {
Instance instance = null;
if (keyId != null) {
- instance = client.createInstance(imageId, profileId, realmId, alias, keyId, memory, storage);
+ instance = client.createInstance(imageId, profileId, realmId, keyId, memory, storage);
} else {
- instance = client.createInstance(imageId, profileId, realmId, alias, memory, storage);
+ instance = client.createInstance(imageId, profileId, realmId, memory, storage);
}
if (instance != null) {
DeltaCloudInstancesRepository repo = getInstancesRepository();
DeltaCloudInstance[] instances = repo.get();
- DeltaCloudInstance deltaCloudInstance = repo.add(instance, this);
- deltaCloudInstance.setAlias(alias);
+ DeltaCloudInstance deltaCloudInstance = DeltaCloudInstanceFactory.create(instance, this, alias);
+ repo.add(deltaCloudInstance);
// TODO: remove notification with all instanceRepo, replace by
// notifying the changed instance
firePropertyChange(PROP_INSTANCES, instances, repo.get());
@@ -620,7 +627,8 @@
} catch (DeltaCloudAuthClientException e) {
return false;
} catch (DeltaCloudClientException e) {
- throw new DeltaCloudException(MessageFormat.format("Could not connection to cloud \"{0}\" at \"{1}\"", name, url), e);
+ throw new DeltaCloudException(MessageFormat.format("Could not connection to cloud \"{0}\" at \"{1}\"",
+ name, url), e);
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImagesRepository.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImagesRepository.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImagesRepository.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -25,12 +25,14 @@
super(DeltaCloudImage.class);
}
+ // TODO: move to DeltaCloudImageFactory
public DeltaCloudImage add(Image image, DeltaCloud cloud) {
DeltaCloudImage deltaCloudImage = new DeltaCloudImage(image, cloud);
add(deltaCloudImage);
return deltaCloudImage;
}
+ // TODO: move to DeltaCloudImageFactory
public Collection<DeltaCloudImage> add(Collection<Image> imagesToAdd, DeltaCloud cloud) {
List<DeltaCloudImage> deltaCloudImages = new ArrayList<DeltaCloudImage>();
for (Image image : imagesToAdd) {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -76,7 +76,7 @@
private Instance instance;
private String alias;
- public DeltaCloudInstance(DeltaCloud cloud, Instance instance) {
+ public DeltaCloudInstance(Instance instance, DeltaCloud cloud) {
super(cloud);
this.instance = instance;
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.deltacloud.core;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.jboss.tools.deltacloud.core.client.Instance;
+
+/**
+ * @author André Dietisheim
+ */
+public class DeltaCloudInstanceFactory {
+
+ public static DeltaCloudInstance create(Instance instance, DeltaCloud cloud, String alias) {
+ Assert.isLegal(instance != null);
+ Assert.isLegal(cloud != null);
+ Assert.isLegal(alias != null);
+
+ DeltaCloudInstance deltaCloudInstance = new DeltaCloudInstance(instance, cloud);
+ deltaCloudInstance.setAlias(alias);
+ return deltaCloudInstance;
+ }
+
+ public static DeltaCloudInstance create(Instance instance, DeltaCloud cloud, Collection<IInstanceAliasMapping> instanceMappigs) {
+ Assert.isLegal(instance != null);
+ Assert.isLegal(cloud != null);
+
+ DeltaCloudInstance deltaCloudInstance = new DeltaCloudInstance(instance, cloud);
+ setAlias(deltaCloudInstance, instanceMappigs);
+ return deltaCloudInstance;
+ }
+
+ public static Collection<DeltaCloudInstance> create(List<Instance> instances, DeltaCloud cloud, Collection<IInstanceAliasMapping> instanceMappings) {
+ Assert.isLegal(instances != null);
+ Assert.isLegal(cloud != null);
+
+ List<DeltaCloudInstance> deltaCloudInstances = new ArrayList<DeltaCloudInstance>();
+ for(Instance instance : instances) {
+ DeltaCloudInstance deltaCloudInstance = create(instance, cloud, instanceMappings);
+ deltaCloudInstances.add(deltaCloudInstance);
+ }
+ return deltaCloudInstances;
+ }
+
+ private static void setAlias(DeltaCloudInstance instance, Collection<IInstanceAliasMapping> instanceMappings) {
+ for (IInstanceAliasMapping aliasMapping : instanceMappings) {
+ if (aliasMapping.matches(instance)) {
+ instance.setAlias(aliasMapping.getAlias());
+ }
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstancesRepository.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstancesRepository.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstancesRepository.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -10,59 +10,19 @@
******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.jboss.tools.deltacloud.core.client.Instance;
-
/**
* @author André Dietisheim
*/
public class DeltaCloudInstancesRepository extends AbstractDeltaCloudObjectRepository<DeltaCloudInstance, String> {
- /**
- * Instantiates a new delta cloud instances.
- */
public DeltaCloudInstancesRepository() {
super(DeltaCloudInstance.class);
}
- /**
- * Adds the.
- *
- * @param instance the instance
- * @param cloud the cloud
- * @return the delta cloud instance
- */
- public DeltaCloudInstance add(Instance instance, DeltaCloud cloud) {
- DeltaCloudInstance deltaCloudInstance = new DeltaCloudInstance(cloud, instance);
- add(deltaCloudInstance);
- return deltaCloudInstance;
- }
-
- /**
- * Adds the.
- *
- * @param instancesToAdd the instances to add
- * @param cloud the cloud
- * @return the collection
- */
- public Collection<DeltaCloudInstance> add(Collection<Instance> instancesToAdd, DeltaCloud cloud) {
- List<DeltaCloudInstance> deltaCloudInstances = new ArrayList<DeltaCloudInstance>();
- for (Instance instance : instancesToAdd) {
- DeltaCloudInstance deltaCloudInstance = add(instance, cloud);
- deltaCloudInstances.add(deltaCloudInstance);
- }
- return deltaCloudInstances;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.deltacloud.core.AbstractDeltaCloudObjectRepository#matches(java.lang.Object, java.lang.Object)
- */
@Override
protected boolean matches(String id, DeltaCloudInstance instance) {
- return instance != null
+ return instance != null
&& id.equals(instance.getId());
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -19,13 +19,16 @@
import java.net.URLEncoder;
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.ListenerList;
+import org.jboss.tools.deltacloud.core.client.utils.StringUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -38,8 +41,6 @@
*/
public class DeltaCloudManager {
- private static final String USERNAME_ENCODING = "UTF8";
-
private static final DeltaCloudManager INSTANCE = new DeltaCloudManager();
public final static String CLOUDFILE_NAME = "clouds.xml"; //$NON-NLS-1$
@@ -61,7 +62,7 @@
Document d = db.parse(cloudFile);
Element element = d.getDocumentElement();
// Get the stored configuration data
- NodeList cloudNodes = element.getElementsByTagName("cloud"); // $NON-NLS-1$
+ NodeList cloudNodes = element.getElementsByTagName(DeltaCloudXMLBuilder.TAG_CLOUD); // $NON-NLS-1$
for (int x = 0; x < cloudNodes.getLength(); ++x) {
Node n = cloudNodes.item(x);
try {
@@ -80,20 +81,24 @@
}
}
+ // TODO: move to unmarshaler component
private DeltaCloud loadCloud(Node n, List<DeltaCloud> clouds) throws DeltaCloudException {
String name = "<UNKNOWN>";
try {
DeltaCloud cloud = null;
NamedNodeMap attrs = n.getAttributes();
- name = attrs.getNamedItem("name").getNodeValue(); // $NON-NLS-1$
- String url = attrs.getNamedItem("url").getNodeValue(); // $NON-NLS-1$
- String username = URLEncoder.encode(attrs.getNamedItem("username").getNodeValue(), USERNAME_ENCODING); // $NON-NLS-1$
- Driver driver = Driver.checkedValueOf(attrs.getNamedItem("type").getNodeValue()); // $NON-NLS-1$
+ name = attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_NAME).getNodeValue(); // $NON-NLS-1$
+ String url = getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_URL)); // $NON-NLS-1$
+ String username = URLEncoder.encode(
+ attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_USERNAME).getNodeValue(),
+ DeltaCloudXMLBuilder.ENCODING); // $NON-NLS-1$
+ Driver driver = Driver.checkedValueOf(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_TYPE).getNodeValue()); // $NON-NLS-1$
String imageFilterRules = getImageFilterRules(attrs.getNamedItem("imagefilter")); // $NON-NLS-1$
String instanceFilterRules = getInstanceFilterRules(attrs.getNamedItem("instancefilter")); // $NON-NLS-1$
- String lastKeyName = getLastKeyName(attrs.getNamedItem("lastkeyname")); // $NON-NLS-1$
- String lastImageId = getLastKeyName(attrs.getNamedItem("lastimage")); // $NON-NLS-1$
- cloud = new DeltaCloud(name, url, username, driver, imageFilterRules, instanceFilterRules);
+ String lastKeyName = getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_LASTKEYNAME)); // $NON-NLS-1$
+ String lastImageId = getNodeValue(attrs.getNamedItem(DeltaCloudXMLBuilder.ATTR_LASTIMAGE)); // $NON-NLS-1$
+ Collection<IInstanceAliasMapping> aliasMappings = getInstanceMappings(n);
+ cloud = new DeltaCloud(name, url, username, driver, imageFilterRules, instanceFilterRules, aliasMappings);
clouds.add(cloud);
cloud.setLastImageId(lastImageId);
cloud.setLastKeyname(lastKeyName);
@@ -106,14 +111,46 @@
}
}
- private String getLastKeyName(Node lastKeyNameNode) {
- String lastKeyName = "";
- if (lastKeyNameNode != null) {
- lastKeyName = lastKeyNameNode.getNodeValue();
+ // TODO: move to unmarshaler component
+ private Collection<IInstanceAliasMapping> getInstanceMappings(Node n) {
+ Assert.isLegal(n instanceof Element);
+ Collection<IInstanceAliasMapping> aliasMappings = new ArrayList<IInstanceAliasMapping>();
+ Element element = (Element) n;
+ NodeList instanceNodes = element.getElementsByTagName(DeltaCloudXMLBuilder.TAG_INSTANCE);
+ for (int i = 0; i < instanceNodes.getLength(); i++) {
+ IInstanceAliasMapping aliasMapping = createInstanceAliasMapping(instanceNodes, i);
+ if (aliasMapping != null) {
+ aliasMappings.add(aliasMapping);
+ }
}
- return lastKeyName;
+ return aliasMappings;
}
+ private IInstanceAliasMapping createInstanceAliasMapping(NodeList instanceNodes, int i) {
+ IInstanceAliasMapping aliasMapping = null;
+ Node instanceNode = instanceNodes.item(i);
+ NamedNodeMap attributes = instanceNode.getAttributes();
+ Node idNode = attributes.getNamedItem(DeltaCloudXMLBuilder.ATTR_ID);
+ String id = null;
+ if (idNode != null) {
+ id = idNode.getNodeValue();
+ attributes = instanceNode.getAttributes();
+ Node aliasNode = attributes.getNamedItem(DeltaCloudXMLBuilder.ATTR_ALIAS);
+ if (aliasNode != null) {
+ String alias = StringUtils.emptyString2Null(aliasNode.getNodeValue());
+ aliasMapping = new InstanceAliasMapping(id, alias);
+ }
+ }
+ return aliasMapping;
+ }
+
+ private String getNodeValue(Node node) {
+ if (node != null) {
+ return node.getNodeValue();
+ }
+ return null;
+ }
+
private String getInstanceFilterRules(Node instanceFilterNode) {
String instanceFilterRules = IInstanceFilter.ALL_STRING;
if (instanceFilterNode != null) {
@@ -130,38 +167,62 @@
return imageFilterRules;
}
+ // TODO: move to marshaler component
public void saveClouds() throws DeltaCloudException {
try {
File cloudFile = getOrCreateCloudFile();
- if (cloudFile.exists()) {
- PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(cloudFile)));
- p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
- p.println("<clouds>"); // $NON-NLS-1$
- for (DeltaCloud d : clouds) {
- p.println(createCloudXML(d)); //$NON-NLS-1$
- }
- p.println("</clouds>"); //$NON-NLS-1$
- p.close();
+ PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(cloudFile)));
+ DeltaCloudXMLBuilder.xmlHeader(p);
+ DeltaCloudXMLBuilder.tag(DeltaCloudXMLBuilder.TAG_CLOUDS, p);
+ DeltaCloudXMLBuilder.closeTag(p);
+ for (DeltaCloud d : clouds) {
+ printCloud(d, p);
}
+ DeltaCloudXMLBuilder.endTag(DeltaCloudXMLBuilder.TAG_CLOUDS, p);
+ p.close();
} catch (Exception e) {
// TODO: internationalize strings
throw new DeltaCloudException("Could not save clouds", e);
}
}
- private String createCloudXML(DeltaCloud d) throws UnsupportedEncodingException {
- String username = URLEncoder.encode(d.getUsername(), USERNAME_ENCODING);
- return "<cloud name=\"" + d.getName() + //$NON-NLS-1$
- "\" url=\"" + d.getURL() + //$NON-NLS-2$
- "\" username=\"" + username + //$NON-NLS-1$ //$NON-NLS-2$
- "\" type=\"" + d.getDriver() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" imagefilter=\"" + d.getImageFilter() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" instancefilter=\"" + d.getInstanceFilter() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" lastkeyname=\"" + d.getLastKeyname() + //$NON-NLS-1$ //$NON-NLS-2$
- "\" lastimage=\"" + d.getLastImageId() + //$NON-NLS-1$ //$NON-NLS-2$
- "\"/>";
+ // TODO: move to marshaler component
+ private void printCloud(DeltaCloud d, PrintWriter printWriter) throws UnsupportedEncodingException,
+ DeltaCloudException {
+ String username = URLEncoder.encode(d.getUsername(), DeltaCloudXMLBuilder.ENCODING);
+ DeltaCloudXMLBuilder.tag(DeltaCloudXMLBuilder.TAG_CLOUD, printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_NAME, d.getName(), printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_URL, d.getURL(), printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_USERNAME, username, printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_TYPE, d.getDriver().toString(), printWriter);
+ DeltaCloudXMLBuilder.attribute(
+ DeltaCloudXMLBuilder.ATTR_IMAGEFILTER, d.getImageFilter().toString(), printWriter);
+ DeltaCloudXMLBuilder.attribute(
+ DeltaCloudXMLBuilder.ATTR_INSTANCEFILTER, d.getInstanceFilter().toString(), printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_LASTKEYNAME, d.getLastKeyname(), printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_LASTIMAGE, d.getLastImageId(), printWriter);
+ DeltaCloudXMLBuilder.closeTag(printWriter);
+ printInstances(d, printWriter);
+ DeltaCloudXMLBuilder.endTag(DeltaCloudXMLBuilder.TAG_CLOUD, printWriter);
}
+ // TODO: move to marshaler component
+ private void printInstances(DeltaCloud d, PrintWriter printWriter) {
+ try {
+ for (DeltaCloudInstance instance : d.getInstances()) {
+ DeltaCloudXMLBuilder.tag(DeltaCloudXMLBuilder.TAG_INSTANCE, printWriter);
+ DeltaCloudXMLBuilder.attribute(DeltaCloudXMLBuilder.ATTR_ID, instance.getId(), printWriter);
+ DeltaCloudXMLBuilder.attribute(
+ DeltaCloudXMLBuilder.ATTR_ALIAS, StringUtils.null2EmptyString(instance.getAlias()),
+ printWriter);
+ DeltaCloudXMLBuilder.closeTag(printWriter);
+ DeltaCloudXMLBuilder.endTag(DeltaCloudXMLBuilder.TAG_INSTANCE, printWriter);
+ }
+ } catch (DeltaCloudException e) {
+ // ignore
+ }
+ }
+
private File getOrCreateCloudFile() throws IOException {
IPath stateLocation = Activator.getDefault().getStateLocation();
File cloudFile = stateLocation.append(CLOUDFILE_NAME).toFile();
@@ -228,4 +289,7 @@
}
}
+ public void dispose() throws DeltaCloudException {
+ saveClouds();
+ }
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.deltacloud.core;
+
+import java.io.PrintWriter;
+
+public class DeltaCloudXMLBuilder {
+
+ public static final String ENCODING = "UTF-8";
+
+ public static final String TAG_CLOUDS = "clouds";
+ public static final String TAG_CLOUD = "cloud";
+ public static final String TAG_INSTANCE = "instance";
+ public static final String ATTR_ID = "id";
+ public static final String ATTR_NAME = "name";
+ public static final String ATTR_USERNAME = "username";
+ public static final String ATTR_URL = "url";
+ public static final String ATTR_ALIAS = "alias";
+ public static final String ATTR_TYPE = "type";
+ public static final String ATTR_IMAGEFILTER = "imagefilter";
+ public static final String ATTR_INSTANCEFILTER = "instancefilter";
+ public static final String ATTR_LASTKEYNAME = "lastkeyname";
+ public static final String ATTR_LASTIMAGE = "lastimage";
+
+ public static final void xmlHeader(PrintWriter printWriter) {
+ printWriter.print("<?xml version=\"1.0\" encoding=\"");
+ printWriter.print(ENCODING);
+ printWriter.println("\"?>");
+ }
+
+ public static final void attribute(String attributeName, String attributeValue, PrintWriter printWriter) {
+ printWriter.print(" ");
+ printWriter.print(attributeName);
+ printWriter.print("=\"");
+ printWriter.print(attributeValue);
+ printWriter.print("\"");
+
+ }
+
+ public static final void tag(String tagName, PrintWriter printWriter) {
+ printWriter.print("<");
+ printWriter.print(tagName);
+ }
+
+ public static final void closeTag(PrintWriter printWriter) {
+ printWriter.println(" >");
+ }
+
+ public static final void endTag(String tagName, PrintWriter printWriter) {
+ printWriter.print("</");
+ printWriter.print(tagName);
+ printWriter.println(">");
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudXMLBuilder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceAliasMapping.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceAliasMapping.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceAliasMapping.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * 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.deltacloud.core;
+
+/**
+ * @author André Dietisheim
+ */
+public interface IInstanceAliasMapping {
+
+ public boolean matches(DeltaCloudInstance instance);
+
+ public String getAlias();
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceAliasMapping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceAliasMapping.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceAliasMapping.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceAliasMapping.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.deltacloud.core;
+
+/**
+ * @author André Dietisheim
+ */
+public class InstanceAliasMapping implements IInstanceAliasMapping {
+
+ private String alias;
+ private String id;
+
+ public InstanceAliasMapping(String id, String alias) {
+ this.alias = alias;
+ this.id = id;
+ }
+
+ @Override
+ public boolean matches(DeltaCloudInstance instance) {
+ return this.id.equals(instance.getId());
+ }
+
+ @Override
+ public String getAlias() {
+ return alias;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceAliasMapping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -115,15 +115,12 @@
* @return
* @throws DeltaCloudClientException
*/
- public Instance createInstance(String imageId, String flavor, String realm, String name)
+ public Instance createInstance(String imageId, String profileId, String realmId, String memory, String storage)
throws DeltaCloudClientException;
- public Instance createInstance(String imageId, String profileId, String realmId, String name, String memory,
+ public Instance createInstance(String imageId, String profileId, String realmId, String keyname, String memory,
String storage) throws DeltaCloudClientException;
- public Instance createInstance(String imageId, String profileId, String realmId, String name, String keyname,
- String memory, String storage) throws DeltaCloudClientException;
-
/**
* Creates a key for a given name on the deltacloud server.
*
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -291,22 +291,16 @@
}
- @Override
- public Instance createInstance(String imageId, String profileId, String realmId, String name)
- throws DeltaCloudClientException {
- return createInstance(imageId, profileId, realmId, name, null, null, null);
- }
-
- public Instance createInstance(String imageId, String profileId, String realmId, String name, String memory,
+ public Instance createInstance(String imageId, String profileId, String realmId, String memory,
String storage) throws DeltaCloudClientException {
- return createInstance(imageId, profileId, realmId, name, null, memory, storage);
+ return createInstance(imageId, profileId, realmId, null, memory, storage);
}
- public Instance createInstance(String imageId, String profileId, String realmId, String name, String keyId,
+ public Instance createInstance(String imageId, String profileId, String realmId, String keyId,
String memory, String storage) throws DeltaCloudClientException {
try {
String response = requestStringResponse(
- new CreateInstanceRequest(baseUrl, imageId, profileId, realmId, name, keyId, memory, storage));
+ new CreateInstanceRequest(baseUrl, imageId, profileId, realmId, keyId, memory, storage));
Instance instance = buildInstance(response);
// TODO: WORKAROUND for
// https://issues.jboss.org/browse/JBIDE-8005
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/request/CreateInstanceRequest.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -25,22 +25,20 @@
private String imageId;
private String profileId;
private String realmId;
- private String name;
private String keyname;
private String memory;
private String storage;
public CreateInstanceRequest(URL baseUrl, String imageId) {
- this(baseUrl, imageId, null, null, null, null, null, null);
+ this(baseUrl, imageId, null, null, null, null, null);
}
- public CreateInstanceRequest(URL baseUrl, String imageId, String profileId, String realmId, String name,
+ public CreateInstanceRequest(URL baseUrl, String imageId, String profileId, String realmId,
String keyId, String memory, String storage) {
super(baseUrl, HttpMethod.POST);
this.imageId = imageId;
this.profileId = profileId;
this.realmId = realmId;
- this.name = name;
this.keyname = keyId;
this.memory = memory;
this.storage = storage;
@@ -56,7 +54,6 @@
.parameter("image_id", imageId)
.parameter("hwp_id", profileId)
.parameter("realm_id", realmId)
- .parameter("name", name)
.parameter("hwp_memory", memory)
.parameter("hwp_storage", storage)
.parameter("commit", "create")
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/utils/StringUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/utils/StringUtils.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/utils/StringUtils.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.deltacloud.core.client.utils;
+
+/**
+ * @author André Dietisheim
+ */
+public class StringUtils {
+
+ public static String null2EmptyString(String stringValue) {
+ if (stringValue == null) {
+ return "";
+ }
+ return stringValue;
+ }
+
+ public static String emptyString2Null(String stringValue) {
+ if (stringValue != null
+ && stringValue.length() == 0) {
+ return null;
+ }
+ return stringValue;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/utils/StringUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-01-04 15:51:47 UTC (rev 27867)
@@ -1,3 +1,12 @@
+2011-01-04 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java
+ (PROPERTY_ALIAS):
+ (getAlias):
+ (setAlias):
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java (performFinish):
+ [JBIDE-7294] added alias support to NewInstanceWizard
+
2010-12-27 adietisheim <adietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java (createControl):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2011-01-04 15:51:47 UTC (rev 27867)
@@ -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.pde.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.rse.subsystems.files.ssh@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.jdt.ui@default:default,org.eclipse.jst.common.ui@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.tm.terminal.ssh@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.search@default:default,org.eclipse.ui.browser@default:default,org.mortbay.jetty.server@default:default,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.jst.common.project.facet!
.ui@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.resources@default:default,org.eclipse.osgi.util@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.junit4@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.mortbay.jetty.util@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.wst.server.ui@default:default,org.apache.lucene.analysis@default:default,org.eclipse.team.core@default:default,org.sat4j.pb@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.core.variables@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.text@default:default,org.apache.commons.el@default:default,org.eclipse.ecf@default:default,org.apache.commons.net@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.core.expressions@default:default,org.eclipse.j!
dt.core@default:default,org.eclipse.core.filesystem@default:de!
fault,or
g.eclipse.emf.ecore.xmi@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.equinox.security@default:default,org.eclipse.tm.terminal.telnet@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.jobs@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.jem.proxy@default:default,org.eclipse.wst.server.discovery@default:default,javax.xml@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.compare.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.hamcrest.core@default:default,org.eclipse.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.debug.core@default:default,org.eclipse.core!
.filebuffers@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.jsch.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.jst.jee@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.emf.edit@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jem@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.wst.web@default:defaul!
t,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.he!
lp.ui@de
fault:default,org.apache.jasper@default:default,org.eclipse.update.configurator@3:true,org.eclipse.jst.j2ee.ejb@default:default,org.eclipse.ecf.ssl@default:false,javax.servlet@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.jsch.ui@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ui.forms@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.eclipse.rse.subsystems.terminals.ssh@default:default,org.eclipse.ui.editors@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.jst.j2ee.ui@default:default,org.eclipse.wst.common.ui@default:defaul!
t,org.eclipse.emf.common@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.jst.server.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.sdk@default:default,org.eclipse.rse.connectorservice.ssh@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.jst.j2ee.jca.ui@default:default,org.eclipse.equinox.common@2:true,org.eclipse.core.runtime.compatibility.registry@default:false,javax.servlet.jsp@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.jst.servlet.ui@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.ui.console@default:default,org.eclipse.jface@default:default,org.eclipse.ui.workbench.texteditor@default:de!
fault,org.eclipse.core.runtime.compatibility@default:default,o!
rg.eclip
se.ui.views.log@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.rse.services@default:default,org.eclipse.core.commands@default:default,org.eclipse.rse.services.files.ftp@default:default,org.eclipse.equinox.app@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.pde.build@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.core.databinding@default:default,org.eclipse.compare@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.apache.xml.serializer@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.team.ui@default:default,org.eclipse.help!
@default:default,org.eclipse.help.base@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.update.core@default:default,org.eclipse.swt@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.rse.services.local@default:default,org.apache.xml.resolver@default:default,org.eclipse.wst.server.ui.doc.user@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.osgi@-1:true,org.eclipse.jst.server.ui@default:default,org.eclipse.rse.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.wst.common.project.facet.ui@default:default,org.apache.lucene@default:default,org.eclipse.jst.common.frameworks@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.navigator.resource!
s@default:default,org.eclipse.rse.core@default:default,org.ecl!
ipse.tm.
terminal.view@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.validation@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.ant@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.wst.css.core@default:default,org.apache.xerces@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ant.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.jst.!
jee.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.wst.web.ui@default:default,org.eclipse.rse.subsystems.files.core@default:default,org.eclipse.jst.j2ee.jca@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.jdt@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.ide.eclipse.archives.ui@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.jboss.ide.eclipse.as.rse.ui@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.tools.common@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.integration@default:default,org.jboss.ide.eclipse.as.rse.core@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.emf.ecore.xmi@default:default,org.eclipse.jst.j2ee.jca.ui@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui@default:default,org.eclipse.jst.jee.ui@default:default,org.eclipse.debug.ui@default:default,org.eclipse.jst.j2ee.web@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.swt@default:default,javax.servlet@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.emf.common@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.commands@default:default,org.eclipse.team.ui@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.ht!
tp.servlet@default:default,org.eclipse.ui.console@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.pde.core@default:default,org.eclipse.equinox.security@default:default,org.eclipse.wst.server.discovery@default:default,org.eclipse.rse.core@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.equinox.common@2:true,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.jst.j2ee.ejb@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.wst.web.ui@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.tm.terminal.telnet@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.wst.css.core@default:default,org.apache.commons.net@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.cor!
e.net@default:default,org.eclipse.core.runtime.compatibility@d!
efault:d
efault,org.apache.xml.serializer@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.jst.server.core@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.search@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.jst.common.project.facet.ui@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.common.modulecore.ui@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.rse.connectorservice.ssh@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.runtime@default:true,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,com.jcraft.jsch@default:default,org.eclipse.ui.forms@default:default,org.apache.xerces@default:defaul!
t,org.sat4j.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.help@default:default,org.mortbay.jetty.server@default:default,org.eclipse.jst.servlet.ui@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.debug.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,javax.xml@default:default,org.eclipse.rse.ui@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.jst.j2ee.jca@default:default,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.wst.server.ui@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.sat4j.pb@default:default,org.eclipse.core.resources@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.osgi.util@default:default,org.eclipse.ecf.identity@default:d!
efault,org.eclipse.jdt.launching@default:default,org.eclipse.e!
quinox.r
egistry@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.text@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.jst.server.ui@default:default,org.eclipse.team.core@default:default,org.eclipse.ui.navigator@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ecf@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.wst.server.ui.doc.user@default:default,org.eclipse.help.ui@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.expressions@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.intro@default:default,org.eclip!
se.wst.common.project.facet.ui@default:default,org.eclipse.jem@default:default,org.eclipse.wst.common.ui@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.ui.browser@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jst.j2ee.ui@default:default,org.apache.xml.resolver@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.jst.j2ee.navigator.ui@default:default,org.apache.lucene@default:default,org.eclipse.jface.text@default:default,org.eclipse.jdt.debug@default:default,org.apache.commons.el@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.html.ui@default:!
default,org.eclipse.update.core@default:default,org.eclipse.ws!
t.common
.frameworks@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.junit4@default:default,org.eclipse.jem.proxy@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.jsch.core@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.equinox.p2.operations@default:default,org.eclipse.jst.common.project.facet.core@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.sdk@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.rse.subsystems.terminals.ssh@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.e!
core.change@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.jst.common.frameworks@default:default,org.mortbay.jetty.util@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.pde.build@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.jst.jee@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jsch.ui@default:default,org.eclipse.compare@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jst.j2ee.ejb.annotation.model@default:default,org.apache.lucene.analysis@default:default,org.eclipse.tm.terminal.ssh@default:default,org.eclips!
e.equinox.p2.metadata.repository@default:default,org.eclipse.e!
mf.edit@
default:default,org.eclipse.core.databinding@default:default,org.eclipse.help.base@default:default,com.ibm.icu@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.apache.ant@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.net.linux.x86_64@default:false,javax.servlet.jsp@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.wst.web@default:default,org.apache.jasper@default:default,org.eclipse.jface@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.tm.terminal.view@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.rse.subsystems.files.core@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jdt@default:default,org.eclipse.rse.!
services.files.ftp@default:default,org.eclipse.jst.common.ui@default:default,org.eclipse.rse.subsystems.files.ssh@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.app@default:default,org.eclipse.rse.services.local@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.tools.deltacloud.integration@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.tools.usage@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.ide.eclipse.as.rse.core@default:default,org.jboss.tools.common@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.ide.eclipse.as.rse.ui@default:default,org.jboss.tools.jmx.core@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -230,7 +230,7 @@
private void bindWidgets(DataBindingContext dbc, Composite container) {
// name
- bindText(nameText, NewInstancePageModel.PROPERTY_NAME, WizardMessages.getString(MUST_ENTER_A_NAME), dbc);
+ bindText(nameText, NewInstancePageModel.PROPERTY_ALIAS, WizardMessages.getString(MUST_ENTER_A_NAME), dbc);
IObservableValue imageObservable = bindImage(imageText, dbc);
bindArchLabel(arch, imageObservable, dbc);
bindRealmCombo(realmCombo, dbc);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePageModel.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -26,7 +26,7 @@
public class NewInstancePageModel extends ObservableUIPojo {
public static final String PROPERTY_URL = "url"; //$NON-NLS-1$
- public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
+ public static final String PROPERTY_ALIAS = "alias"; //$NON-NLS-1$
public static final String PROPERTY_IMAGE = "image"; //$NON-NLS-1$
public static final String PROPERTY_ARCH = "arch"; //$NON-NLS-1$
public static final String PROPERTY_REALMS = "realms"; //$NON-NLS-1$
@@ -37,7 +37,7 @@
public static final String PROP_FILTERED_PROFILES = "filteredProfiles"; //$NON-NLS-1$
public static final String PROP_SELECTED_PROFILE_INDEX = "selectedProfileIndex"; //$NON-NLS-1$
- private String name;
+ private String alias;
private DeltaCloudImage image;
private String arch;
private String keyId;
@@ -55,12 +55,12 @@
this.image = image;
}
- public String getName() {
- return name;
+ public String getAlias() {
+ return alias;
}
- public void setName(String name) {
- firePropertyChange(PROPERTY_NAME, this.name, this.name = name);
+ public void setAlias(String alias) {
+ firePropertyChange(PROPERTY_ALIAS, this.alias, this.alias = alias);
}
public DeltaCloudImage getImage() {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -90,11 +90,9 @@
String realmId = model.getRealmId();
String memory = model.getMemory();
String storage = model.getStorage();
-
String keyId = model.getKeyId();
+ String alias = utf8Encode(model.getAlias());
- String name = utf8Encode(model.getName());
-
// Save persistent settings for this particular cloud
cloud.setLastImageId(imageId);
cloud.setLastKeyname(keyId);
@@ -124,11 +122,12 @@
prefs.putBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, true);
}
}
- instance = cloud.createInstance(name, imageId, realmId, profileId, keyId, memory, storage);
+ instance = cloud.createInstance(alias, imageId, realmId, profileId, keyId, memory, storage);
if (instance != null) {
result = true;
}
- if (instance != null && instance.getState().equals(DeltaCloudInstance.State.PENDING)) {
+ if (instance != null
+ && instance.getState().equals(DeltaCloudInstance.State.PENDING)) {
// TODO use chained job? Maybe. But chainedJob needs to be moved
ChainedJob first =
new InstanceStateJob(
@@ -154,7 +153,7 @@
ErrorUtils.handleError(
WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG,
- new String[] { name, imageId, realmId, profileId }),
+ new String[] { alias, imageId, realmId, profileId }),
e, getShell());
}
return result;
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2011-01-04 15:38:14 UTC (rev 27866)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2011-01-04 15:51:47 UTC (rev 27867)
@@ -38,7 +38,7 @@
public void setUp() throws DeltaCloudException {
this.cloudFake = new DeltaCloudFake();
this.instanceFake = new Instance();
- this.deltaCloudInstanceFake = new DeltaCloudInstance(cloudFake, instanceFake);
+ this.deltaCloudInstanceFake = new DeltaCloudInstance(instanceFake, cloudFake);
}
@Test
14 years
JBoss Tools SVN: r27866 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-04 10:38:14 -0500 (Tue, 04 Jan 2011)
New Revision: 27866
Modified:
trunk/build/target-platform/publish.sh
Log:
reverse logic of .blobstore keep/trash
Modified: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh 2011-01-04 15:23:19 UTC (rev 27865)
+++ trunk/build/target-platform/publish.sh 2011-01-04 15:38:14 UTC (rev 27866)
@@ -6,7 +6,7 @@
repoPath=/home/hudson/static_build_env/jbds/tools/sources/REPO
destinationPath=/home/hudson/static_build_env/jbds/target-platform
DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/tools/updates/target-platform
-exclude=""
+exclude="--exclude '.blobstore'"
while [ "$#" -gt 0 ]; do
case $1 in
@@ -20,7 +20,7 @@
repoPath=/home/hudson/static_build_env/jbds/tools/sources/JBDS-REPO
destinationPath=/home/hudson/static_build_env/jbds/jbds-target-platform
DESTINATION=/qa/services/http/binaries/RHDS/updates/jbds-target-platform
- exclude="--exclude '.blobstore'"
+ exclude=""
shift 1;;
esac
done
14 years
JBoss Tools SVN: r27865 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-04 10:23:19 -0500 (Tue, 04 Jan 2011)
New Revision: 27865
Modified:
trunk/build/publish.sh
Log:
add md5sum generation per zip file
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2011-01-04 08:36:59 UTC (rev 27864)
+++ trunk/build/publish.sh 2011-01-04 15:23:19 UTC (rev 27865)
@@ -92,8 +92,11 @@
mkdir -p ${STAGINGDIR}/all/repo
unzip -u -o -q -d ${STAGINGDIR}/all/repo $z
+ # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
+ for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+
# copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
+ rsync -aq $z ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}
fi
z=""
@@ -106,7 +109,11 @@
mkdir -p ${STAGINGDIR}/$y
unzip -u -o -q -d ${STAGINGDIR}/$y $z
# copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${STAGINGDIR}/${y}${SUFFNAME}
+
+ # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
+ for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+
+ rsync -aq $z ${z}.MD5 ${STAGINGDIR}/${y}${SUFFNAME}
fi
done
@@ -116,7 +123,11 @@
#echo "$z ..."
mkdir -p ${STAGINGDIR}/all
unzip -u -o -q -d ${STAGINGDIR}/all/ $z
- rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
+
+ # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
+ for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+
+ rsync -aq $z ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}
done
fi
@@ -132,7 +143,10 @@
if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
mkdir -p ${STAGINGDIR}/components
for z in $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Update*.zip") $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Sources*.zip"); do
- mv $z ${STAGINGDIR}/components
+ # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
+ for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+
+ mv $z ${z}.MD5 ${STAGINGDIR}/components
done
fi
14 years
JBoss Tools SVN: r27864 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-01-04 03:36:59 -0500 (Tue, 04 Jan 2011)
New Revision: 27864
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite201GA.java
Log:
https://issues.jboss.org/browse/JBDS-1484 Fix illegal access errors in JBDS uberbuilder tests for Seam
resolved
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite201GA.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite201GA.java 2011-01-04 07:09:07 UTC (rev 27863)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/Seam20XOperationsTestSuite201GA.java 2011-01-04 08:36:59 UTC (rev 27864)
@@ -18,58 +18,5 @@
*
* @author eskimo
*/
-public class Seam20XOperationsTestSuite201GA {
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.setName("Seam 2.0.X Operations Test");
- suite.addTest(
- new Seam20EARNewOperationTestSetup(
- new TestSuite(Seam20EARNewOperationTest.class)));
- suite.addTest(
- new Seam20WARNewOperationTestSetup(
- new TestSuite(Seam20WARNewOperationTest.class)));
- return suite;
- }
-
- public static class Seam20EARNewOperationTestSetup extends TestSetup {
- Seam20EARNewOperationTest delegate = new Seam20EARNewOperationTest("delegate");
-
- /**
- * @param test
- */
- public Seam20EARNewOperationTestSetup(Test test) {
- super(test);
- }
-
- @Override
- protected void setUp() throws Exception {
- delegate.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- delegate.tearDown();
- }
- }
-
- public static class Seam20WARNewOperationTestSetup extends TestSetup {
- Seam20WARNewOperationTest delegate = new Seam20WARNewOperationTest("delegate");
- /**
- * @param test
- */
- public Seam20WARNewOperationTestSetup(Test test) {
- super(test);
- }
-
- @Override
- protected void setUp() throws Exception {
- delegate.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- delegate.tearDown();
- }
- }
+public class Seam20XOperationsTestSuite201GA extends Seam20XOperationsTestSuite201GABase {
}
14 years
JBoss Tools SVN: r27863 - in trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core: commands and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-01-04 02:09:07 -0500 (Tue, 04 Jan 2011)
New Revision: 27863
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/JBossWSCreationCorePlugin.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java
Log:
JBIDE-7913: partly fixed this issue by distinguishing the class is new generated or not
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/JBossWSCreationCorePlugin.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/JBossWSCreationCorePlugin.java 2011-01-04 03:52:41 UTC (rev 27862)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/JBossWSCreationCorePlugin.java 2011-01-04 07:09:07 UTC (rev 27863)
@@ -14,6 +14,8 @@
// The shared instance
private static JBossWSCreationCorePlugin plugin;
+ private long generateTime;
+
/**
* The constructor
*/
@@ -46,5 +48,13 @@
public static JBossWSCreationCorePlugin getDefault() {
return plugin;
}
+
+ public long getGenerateTime(){
+ return generateTime;
+ }
+ public void setGenerateTime(long generateTime) {
+ this.generateTime = generateTime;
+ }
+
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2011-01-04 03:52:41 UTC (rev 27862)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/AbstractGenerateCodeCommand.java 2011-01-04 07:09:07 UTC (rev 27863)
@@ -57,6 +57,7 @@
IStatus status = Status.OK_STATUS;
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(model.getWebProjectName());
+ JBossWSCreationCorePlugin.getDefault().setGenerateTime(System.currentTimeMillis());
try {
String runtimeLocation = JBossWSCreationUtils.getJBossWSRuntimeLocation(project);
String commandLocation = runtimeLocation + Path.SEPARATOR+ "bin"; //$NON-NLS-1$
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2011-01-04 03:52:41 UTC (rev 27862)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2011-01-04 07:09:07 UTC (rev 27863)
@@ -537,19 +537,21 @@
javaFiles = project.findPackageFragment(path)
.getCompilationUnits();
}
- if (javaFiles != null) {
+ if (javaFiles != null && javaFiles.length > 0) {
for (ICompilationUnit unit : javaFiles) {
if (unit.getTypes().length > 0) {
IType type = unit.getTypes()[0];
if (type.getAnnotation(annotation).exists()) {
- units.add(unit);
+ File file = new File(unit.getResource().getLocation().toOSString());
+ if(file.lastModified() > JBossWSCreationCorePlugin.getDefault().getGenerateTime()){
+ units.add(unit);
+ }
}
}
}
}
} catch (JavaModelException e) {
JBossWSCreationCorePlugin.getDefault().logError(e);
-
}
}
14 years