Author: adietish
Date: 2010-12-02 07:10:49 -0500 (Thu, 02 Dec 2010)
New Revision: 27088
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java
Log:
[JBIDE-7780] removed "name" parameter from constructor, implemented #getName on
each CloudViewElement
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-02 12:10:04
UTC (rev 27087)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-02 12:10:49
UTC (rev 27088)
@@ -6,9 +6,11 @@
* src/org/jboss/tools/deltacloud/ui/views/CVCloudElement.java (getName):
* src/org/jboss/tools/deltacloud/ui/views/CVImageElement.java (getName):
* src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java (getName):
+ (addImages):
* src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java (getName):
* src/org/jboss/tools/deltacloud/ui/views/CVRootElement.java (getName):
* src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java (getName):
+ (addInstances):
* src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java (getName):
[JBIDE-7780] removed "name" parameter from constructor, implemented #getName
on each CloudViewElement
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java (createControl):
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java 2010-12-02
12:10:04 UTC (rev 27087)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java 2010-12-02
12:10:49 UTC (rev 27088)
@@ -43,8 +43,7 @@
int max = CVNumericFoldingElement.FOLDING_SIZE;
int length = images.length;
while (length > CVNumericFoldingElement.FOLDING_SIZE) {
- CVNumericFoldingElement f =
- new CVNumericFoldingElement(null, "[" + min + ".." + (max - 1)
+ "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CVNumericFoldingElement f = new CVNumericFoldingElement(min, max);
addChild(f);
for (int i = min; i < max; ++i) {
DeltaCloudImage d = images[i];
@@ -56,8 +55,7 @@
length -= CVNumericFoldingElement.FOLDING_SIZE;
}
if (length > 0) {
- CVNumericFoldingElement f = new CVNumericFoldingElement(null,
- "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+ CVNumericFoldingElement f = new CVNumericFoldingElement(min, max);
addChild(f);
for (int i = min; i < min + length; ++i) {
DeltaCloudImage d = images[i];
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-12-02
12:10:04 UTC (rev 27087)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-12-02
12:10:49 UTC (rev 27088)
@@ -44,8 +44,7 @@
int max = CVNumericFoldingElement.FOLDING_SIZE;
int length = instances.length;
while (length > CVNumericFoldingElement.FOLDING_SIZE) {
- CVNumericFoldingElement f = new CVNumericFoldingElement(null,
- "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+ CVNumericFoldingElement f = new CVNumericFoldingElement(min, max);
addChild(f);
for (int i = min; i < max; ++i) {
DeltaCloudInstance d = instances[i];
@@ -57,8 +56,7 @@
length -= CVNumericFoldingElement.FOLDING_SIZE;
}
if (length > 0) {
- CVNumericFoldingElement f = new CVNumericFoldingElement(null,
- "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+ CVNumericFoldingElement f = new CVNumericFoldingElement(min, max);
addChild(f);
for (int i = min; i < min + length; ++i) {
DeltaCloudInstance d = instances[i];
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java 2010-12-02
12:10:04 UTC (rev 27087)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java 2010-12-02
12:10:49 UTC (rev 27088)
@@ -19,28 +19,35 @@
public class CVNumericFoldingElement extends CloudViewElement {
public static int FOLDING_SIZE = 50;
- private String name;
-
- public CVNumericFoldingElement(Object element, String name) {
- super(element);
- this.name = name;
+ private Object min;
+ private int max;
+
+ public CVNumericFoldingElement(int min, int max) {
+ super(null);
+ this.min = min;
+ this.max = max;
}
@Override
public String getName() {
- return name;
+ return new StringBuilder()
+ .append("[")
+ .append(min)
+ .append("..")
+ .append(max - 1)
+ .append("]").toString();
}
@Override
public Object[] getChildren() {
return super.getChildren();
}
-
+
@Override
public boolean hasChildren() {
return true;
}
-
+
@Override
public IPropertySource getPropertySource() {
return null;
Show replies by date