package com.intellij.debugger.streams.ui;

import com.intellij.debugger.DebuggerContext;
import com.intellij.debugger.engine.ContextUtil;
import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.memory.utils.InstanceValueDescriptor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.JavaPsiFacade;
import com.intellij.psi.PsiElementFactory;
import com.intellij.psi.PsiExpression;
import com.sun.jdi.ObjectReference;
import com.sun.jdi.Value;

/**
 * @author Vitaliy.Bibaev
 */
public class PrimitiveValueDescriptor extends InstanceValueDescriptor {
  PrimitiveValueDescriptor(Project project, Value value) {
    super(project, value);
  }

  @Override
  public String calcValueName() {
    final Value value = getValue();
    if (value instanceof ObjectReference) {
      return super.calcValueName();
    }

    return value.toString();
  }

  @Override
  public PsiExpression getDescriptorEvaluation(DebuggerContext debuggerContext) throws EvaluateException {
    final Value value = getValue();
    if (value instanceof ObjectReference) {
      return super.getDescriptorEvaluation(debuggerContext);
    }

    final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory();
    return elementFactory.createExpressionFromText("", ContextUtil.getContextElement(debuggerContext));
  }
}

@@ -491,16 +491,58 @@
 i.Value;
+%0Aimport org.jetbrains.annotations.NotNull;
 %0A%0A/**%0A *
@@ -668,16 +668,25 @@
 criptor(
+@NotNull 
 Project 
@@ -693,16 +693,25 @@
 project,
+ @NotNull
  Value v
@@ -941,17 +941,89 @@
 ue.t
-oString()
+ype().name();%0A  %7D%0A%0A  @Override%0A  public boolean isShowIdLabel() %7B%0A    return true
 ;%0A  

Change presentation for primitive values in collection view