Author: adietish
Date: 2011-03-30 05:50:20 -0400 (Wed, 30 Mar 2011)
New Revision: 30144
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeleteCloudHandler.java
Log:
[JBIDE-8290] delete is now only available on cloud items in the cloud viewer
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-03-30
09:48:38 UTC (rev 30143)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-03-30
09:50:20 UTC (rev 30144)
@@ -1,3 +1,11 @@
+2011-03-29 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * plugin.xml:
+ * src/org/jboss/tools/deltacloud/ui/commands/DeleteCloudHandler.java
+ (getSelectedClouds):
+ (getFirstSelectedCloud):
+ [JBIDE-8290] delete is now only available on cloud items in the cloud viewer
+
2011-03-25 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/ui/views/cloudelements/TableViewerColumnComparator.java
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-03-30
09:48:38 UTC (rev 30143)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2011-03-30
09:50:20 UTC (rev 30144)
@@ -134,9 +134,8 @@
variable="selection">
<and>
<count value="+" />
- <iterate operator="and">
- <adapt
- type="org.jboss.tools.deltacloud.core.DeltaCloud" />
+ <iterate operator="or">
+ <instanceof
value="org.jboss.tools.deltacloud.ui.views.cloud.CloudItem" />
</iterate>
</and>
</with>
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeleteCloudHandler.java
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeleteCloudHandler.java 2011-03-30
09:48:38 UTC (rev 30143)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DeleteCloudHandler.java 2011-03-30
09:50:20 UTC (rev 30144)
@@ -38,7 +38,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
-import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.deltacloud.ui.views.cloud.CloudItem;
/**
* @author Andre Dietisheim
@@ -138,7 +138,9 @@
DeltaCloud deltaCloud = null;
if (selectedElements.size() > 0) {
Object object = selectedElements.get(0);
- deltaCloud = UIUtils.adapt(object, DeltaCloud.class);
+ if (object instanceof CloudItem) {
+ deltaCloud = ((CloudItem) object).getModel();
+ }
}
return deltaCloud;
}
@@ -146,9 +148,8 @@
private Collection<DeltaCloud> getSelectedClouds(List<?> selectedElements)
{
Set<DeltaCloud> selectedClouds = new HashSet<DeltaCloud>();
for (Object element : selectedElements) {
- DeltaCloud deltaCloud = UIUtils.adapt(element, DeltaCloud.class);
- if (deltaCloud != null) {
- selectedClouds.add(deltaCloud);
+ if (element instanceof CloudItem) {
+ selectedClouds.add(((CloudItem) element).getModel());
}
}
return selectedClouds;
Show replies by date