mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-140560 In Debug Variables & Watches views, indicate whether a variable is final
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -91,8 +91,18 @@ public class DebuggerTreeRenderer extends ColoredTreeCellRenderer {
|
||||
|
||||
public static Icon getValueIcon(ValueDescriptorImpl valueDescriptor) {
|
||||
Icon nodeIcon;
|
||||
if (valueDescriptor instanceof FieldDescriptorImpl && ((FieldDescriptorImpl)valueDescriptor).isStatic()) {
|
||||
if (valueDescriptor instanceof FieldDescriptorImpl) {
|
||||
FieldDescriptorImpl fieldDescriptor = (FieldDescriptorImpl)valueDescriptor;
|
||||
nodeIcon = PlatformIcons.FIELD_ICON;
|
||||
if (fieldDescriptor.getField().isFinal()) {
|
||||
nodeIcon = new LayeredIcon(nodeIcon, AllIcons.Nodes.FinalMark);
|
||||
}
|
||||
if (fieldDescriptor.isStatic()) {
|
||||
nodeIcon = new LayeredIcon(nodeIcon, AllIcons.Nodes.StaticMark);
|
||||
}
|
||||
}
|
||||
else if (valueDescriptor.isEnumConstant()) {
|
||||
nodeIcon = PlatformIcons.ENUM_ICON;
|
||||
}
|
||||
else if (valueDescriptor.isArray()) {
|
||||
nodeIcon = AllIcons.Debugger.Db_array;
|
||||
|
||||
@@ -94,6 +94,8 @@ public abstract class ValueDescriptorImpl extends NodeDescriptorImpl implements
|
||||
assertValueReady();
|
||||
return myValue instanceof ArrayReference;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean isDirty() {
|
||||
assertValueReady();
|
||||
@@ -123,6 +125,11 @@ public abstract class ValueDescriptorImpl extends NodeDescriptorImpl implements
|
||||
assertValueReady();
|
||||
return myValue instanceof PrimitiveValue;
|
||||
}
|
||||
|
||||
public boolean isEnumConstant() {
|
||||
assertValueReady();
|
||||
return myValue instanceof ObjectReference && isEnumConstant(((ObjectReference)myValue));
|
||||
}
|
||||
|
||||
public boolean isValueValid() {
|
||||
return myValueException == null;
|
||||
|
||||
Reference in New Issue
Block a user