IDEA-144727 Allow to quickly hide/show object types - hide separator if nothing follows
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 4 Sep 2015 13:27:41 +0000 (16:27 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 4 Sep 2015 13:28:54 +0000 (16:28 +0300)
java/debugger/impl/src/com/intellij/debugger/engine/JavaValue.java

index 2362976e3c5705fc7f2aeac8431a2fa49d4b8e09..42e7f4b23f261b0958ca4ca21fb76ac55b5614d2 100644 (file)
@@ -310,11 +310,12 @@ public class JavaValue extends XNamedValue implements NodeDescriptorProvider, XV
     @NotNull
     @Override
     public String getSeparator() {
+      boolean emptyAfterSeparator = !myValueDescriptor.isShowIdLabel() && StringUtil.isEmpty(myValue);
       String declaredType = myValueDescriptor.getDeclaredTypeLabel();
       if (!StringUtil.isEmpty(declaredType)) {
-        return declaredType + " " + DEFAULT_SEPARATOR;
+        return emptyAfterSeparator ? declaredType : declaredType + " " + DEFAULT_SEPARATOR;
       }
-      return DEFAULT_SEPARATOR;
+      return emptyAfterSeparator ? "" : DEFAULT_SEPARATOR;
     }
 
     @Override