Author: adietish
Date: 2010-12-03 14:37:06 -0500 (Fri, 03 Dec 2010)
New Revision: 27169
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03
19:35:02 UTC (rev 27168)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03
19:37:06 UTC (rev 27169)
@@ -63,7 +63,9 @@
try {
Assert.isLegal(newInput instanceof DeltaCloud);
this.cloud = (DeltaCloud) newInput;
- this.cloudElements = filter(cloud);
+ CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
+ ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
+ this.cloudElements = filter(filter, cloudElements);
} catch (DeltaCloudException e) {
this.cloudElements = Collections.emptyList();
// TODO: internationalize strings
@@ -75,14 +77,8 @@
}
}
- protected Collection<CLOUDELEMENT> filter(DeltaCloud cloud) throws
DeltaCloudException {
- if (cloud == null) {
- return null;
- }
-
- CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
- ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
-
+ protected Collection<CLOUDELEMENT> filter(ICloudElementFilter<CLOUDELEMENT>
filter, CLOUDELEMENT[] cloudElements)
+ throws DeltaCloudException {
if (filter == null) {
return Arrays.asList(cloudElements);
} else {