Author: adietish
Date: 2010-12-13 07:18:42 -0500 (Mon, 13 Dec 2010)
New Revision: 27405
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/CloudViewElementUtils.java
Log:
[JBIDE-7864] added hasImages property tester, rename CreateInstanceHandler2 to
CreateInstanceFromAnyImage, renamed CreateInstanceHandler to
CreateInstanceFromSpecificImage
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-13
11:37:47 UTC (rev 27404)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-13
12:18:42 UTC (rev 27405)
@@ -136,7 +136,7 @@
try {
key = instance.getKey();
if (!cloud.getType().equals(DeltaCloud.MOCK_TYPE)) {
- if (instance.getState().equals(DeltaCloudInstance.RUNNING) && (key == null ||
key.length() == 0)) {
+ if (instance.getState().equals(DeltaCloudInstance.State.RUNNING) && (key ==
null || key.length() == 0)) {
instance = cloud.refreshInstance(instance.getId());
if (instance != null) {
key = instance.getKey();
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/CloudViewElementUtils.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/CloudViewElementUtils.java 2010-12-13
11:37:47 UTC (rev 27404)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/CloudViewElementUtils.java 2010-12-13
12:18:42 UTC (rev 27405)
@@ -26,13 +26,12 @@
* @see DeltaCloud
* @see DeltaCloudViewItem
*/
- public static DeltaCloud getCloud(DeltaCloudViewItem element) {
- CloudItem cvCloud = getCVCloudElement(element);
- if (cvCloud == null) {
+ public static DeltaCloud getCloud(DeltaCloudViewItem<?> element) {
+ CloudItem cloudItem = getCloudItem(element);
+ if (cloudItem == null) {
return null;
}
- DeltaCloud cloud = (DeltaCloud) cvCloud.getModel();
- return cloud;
+ return cloudItem.getModel();
}
/**
@@ -45,12 +44,11 @@
* @see DeltaCloudViewItem
* @see CloudItem
*/
- public static CloudItem getCVCloudElement(DeltaCloudViewItem element) {
+ public static CloudItem getCloudItem(DeltaCloudViewItem<?> element) {
while (!(element instanceof CloudItem)
&& element != null) {
- element = (DeltaCloudViewItem) element.getParent();
+ element = (DeltaCloudViewItem<?>) element.getParent();
}
return (CloudItem) element;
}
-
}
Show replies by date