Author: adietish
Date: 2010-12-02 04:19:15 -0500 (Thu, 02 Dec 2010)
New Revision: 27081
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/CVInstanceElement.java
trunk/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: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-02 08:59:41
UTC (rev 27080)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-02 09:19:15
UTC (rev 27081)
@@ -1,3 +1,9 @@
+2010-12-02 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java (getName):
+ * src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
(addInstances):
+ [JBIDE-7779] changed label for instances in CloudView
+
2010-12-01 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
(performFinish):
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstanceElement.java 2010-12-02
08:59:41 UTC (rev 27080)
+++
trunk/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)
@@ -24,10 +24,17 @@
}
private static String getName(DeltaCloudInstance instance) {
- return new StringBuilder(
- instance.getName())
- .append("[").append(instance.getId()).append("]")
- .toString();
+ 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
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
08:59:41 UTC (rev 27080)
+++
trunk/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)
@@ -21,6 +21,7 @@
import org.jboss.tools.deltacloud.ui.ErrorUtils;
/**
+ * @author Jeff Johnston
* @author Andre Dietisheim
*/
public class CVInstancesCategoryElement extends CVCategoryElement implements
IInstanceListListener {