Author: adietish
Date: 2010-12-14 03:46:56 -0500 (Tue, 14 Dec 2010)
New Revision: 27428
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
[JBIDE-7880] clear images and clear instances before loading them.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-14 06:36:24
UTC (rev 27427)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-14 08:46:56
UTC (rev 27428)
@@ -1,9 +1,13 @@
2010-12-13 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java
+ (loadInstances):
+ (loadImages):
+ [JBIDE-7880] clear images and clear instances before loading them.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java
(PROP_INSTANCES_ADDED):
(createInstance):
- [JBIDE-7877] added notification for instances being added
+ [JBIDE-7877] added notification for instances that are added
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java
(IInstanceStateMatcher.matchesState):
* src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java (State):
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-14
06:36:24 UTC (rev 27427)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-14
08:46:56 UTC (rev 27428)
@@ -327,7 +327,7 @@
@Override
public boolean matchesState(DeltaCloudInstance instance, DeltaCloudInstance.State
instanceState) {
- return expectedState != null &&
expectedState.equals(instanceState.getName());
+ return expectedState != null && expectedState.equals(instanceState);
}
};
return waitForState(instanceId, stateMatcher, pm);
@@ -367,6 +367,7 @@
*/
public void loadInstances() throws DeltaCloudException {
try {
+ clearInstances();
DeltaCloudInstancesRepository repo = getInstancesRepository();
DeltaCloudInstance[] oldInstances = repo.get();
repo.add(client.listInstances(), this);
@@ -566,6 +567,7 @@
*/
public void loadImages() throws DeltaCloudException {
try {
+ clearImages();
DeltaCloudImagesRepository repo = getImagesRepository();
DeltaCloudImage[] oldImages = repo.get();
repo.add(client.listImages(), this);
Show replies by date