Author: adietish
Date: 2010-12-02 04:20:03 -0500 (Thu, 02 Dec 2010)
New Revision: 27082
Modified:
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
Log:
[JBIDE-7779] changed label for instances in CloudView
Modified:
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
---
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-02
09:19:15 UTC (rev 27081)
+++
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-02
09:20:03 UTC (rev 27082)
@@ -1,3 +1,16 @@
+2010-12-02 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
(addInstances):
+ * src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java (getName):
+ [JBIDE-7779] changed label for instances in CloudView
+
+2010-11-24 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (.modifyText):
+ [JBIDE-7694] removed refresh(es) of tableViewer (setInput should be enough),
+ moved set of current cloud to central method with null-check,
+ removed clouds collection & replaced by fresh fetch in DeltaCloudManager
+
2010-11-19 André Dietisheim <adietish(a)redhat.com>
* plugin.xml:
Modified:
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java
===================================================================
---
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java 2010-12-02
09:19:15 UTC (rev 27081)
+++
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java 2010-12-02
09:20:03 UTC (rev 27082)
@@ -11,13 +11,31 @@
package org.jboss.tools.deltacloud.ui.views;
import org.eclipse.ui.views.properties.IPropertySource;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+/**
+ * @author Jeff Johnston
+ * @author Andre Dietisheim
+ */
public class CVInstanceElement extends CloudViewElement {
- public CVInstanceElement(Object element, String name) {
- super(element, name);
+ public CVInstanceElement(Object element) {
+ super(element, getName((DeltaCloudInstance) element));
}
-
+
+ private static String getName(DeltaCloudInstance instance) {
+ StringBuilder sb = new StringBuilder();
+ if (instance != null) {
+ if (instance.getName() != null) {
+ sb.append(instance.getName());
+ }
+ if (instance.getId() != null) {
+ sb.append(" [").append(instance.getId()).append("] ");
+ }
+ }
+ return sb.toString();
+ }
+
@Override
public IPropertySource getPropertySource() {
return new InstancePropertySource(this, getElement());
Modified:
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
===================================================================
---
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-12-02
09:19:15 UTC (rev 27081)
+++
branches/jbosstools-3.2.0.Beta2/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-12-02
09:20:03 UTC (rev 27082)
@@ -20,6 +20,10 @@
import org.jboss.tools.deltacloud.core.IInstanceListListener;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
+/**
+ * @author Jeff Johnston
+ * @author Andre Dietisheim
+ */
public class CVInstancesCategoryElement extends CVCategoryElement implements
IInstanceListListener {
public CVInstancesCategoryElement(Object element, String name, TreeViewer viewer) {
@@ -39,7 +43,7 @@
addChild(f);
for (int i = min; i < max; ++i) {
DeltaCloudInstance d = instances[i];
- CVInstanceElement element = new CVInstanceElement(d, d.getName());
+ CVInstanceElement element = new CVInstanceElement(d);
f.addChild(element);
}
min += CVNumericFoldingElement.FOLDING_SIZE;
@@ -52,14 +56,14 @@
addChild(f);
for (int i = min; i < min + length; ++i) {
DeltaCloudInstance d = instances[i];
- CVInstanceElement element = new CVInstanceElement(d, d.getName());
+ CVInstanceElement element = new CVInstanceElement(d);
f.addChild(element);
}
}
} else {
for (int i = 0; i < instances.length; ++i) {
DeltaCloudInstance d = instances[i];
- CVInstanceElement element = new CVInstanceElement(d, d.getName());
+ CVInstanceElement element = new CVInstanceElement(d);
addChild(element);
}
}
Show replies by date