Icon (ValueDescriptorImpl valueDescriptor, @Nullable ValueDescriptorImpl parentDescriptor) { Icon nodeIcon; if (valueDescriptor instanceof FieldDescriptorImpl fieldDescriptor) { nodeIcon = IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Field); if (parentDescriptor != null) { Value value = valueDescriptor.getValue(); if (value instanceof ObjectReference && value.equals(parentDescriptor.getValue())) { nodeIcon = AllIcons.Debugger.Selfreference; } } if (fieldDescriptor.getField().isFinal()) { nodeIcon = LayeredIcon.layeredIcon(new Icon[]{nodeIcon, IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.FinalMark)}); } if (fieldDescriptor.isStatic()) { nodeIcon = LayeredIcon.layeredIcon(new Icon[]{nodeIcon, IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.StaticMark)}); } } else if (valueDescriptor instanceof ThrownExceptionValueDescriptorImpl) { nodeIcon = AllIcons.Nodes.ExceptionClass; } else if (valueDescriptor instanceof MethodReturnValueDescriptorImpl) { nodeIcon = AllIcons.Debugger.WatchLastReturnValue; } else if (isParameter(valueDescriptor)) { nodeIcon = IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Parameter); } else if (valueDescriptor.isEnumConstant()) { nodeIcon = PlatformIcons.ENUM_ICON; } else if (valueDescriptor.isArray()) { nodeIcon = AllIcons.Debugger.Db_array; } else if (valueDescriptor.isPrimitive()) { nodeIcon = AllIcons.Debugger.Db_primitive; } else if (valueDescriptor instanceof WatchItemDescriptor) { nodeIcon = AllIcons.Debugger.Db_watch; } else { nodeIcon = AllIcons.Debugger.Value; } if (valueDescriptor instanceof UserExpressionDescriptorImpl) { EnumerationChildrenRenderer enumerationChildrenRenderer = EnumerationChildrenRenderer.getCurrent(((UserExpressionDescriptorImpl)valueDescriptor).getParentDescriptor()); if (enumerationChildrenRenderer != null && enumerationChildrenRenderer.isAppendDefaultChildren()) { nodeIcon = AllIcons.Debugger.Db_watch; } } // if watches in variables enabled, always use watch icon if (valueDescriptor instanceof WatchItemDescriptor && nodeIcon != AllIcons.Debugger.Db_watch) { XDebugSession session = XDebuggerManager.getInstance(valueDescriptor.getProject()).getCurrentSession(); if (session != null) { XDebugSessionTab tab = ((XDebugSessionImpl)session).getSessionTab(); if (tab != null && tab.isWatchesInVariables()) { nodeIcon = AllIcons.Debugger.Db_watch; } } } final Icon valueIcon = valueDescriptor.getValueIcon(); if (valueIcon != null) { nodeIcon = IconManager.getInstance().createRowIcon(nodeIcon, valueIcon); } return nodeIcon; }