mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+10
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 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.
|
||||
@@ -46,10 +46,12 @@ public class CompoundNodeRenderer extends NodeRendererImpl{
|
||||
myChildrenRenderer = childrenRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueId() {
|
||||
return UNIQUE_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundNodeRenderer clone() {
|
||||
CompoundNodeRenderer renderer = (CompoundNodeRenderer)super.clone();
|
||||
renderer.myLabelRenderer = (myLabelRenderer != null) ? (ValueLabelRenderer)myLabelRenderer.clone() : null;
|
||||
@@ -57,22 +59,27 @@ public class CompoundNodeRenderer extends NodeRendererImpl{
|
||||
return renderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildChildren(Value value, ChildrenBuilder builder, EvaluationContext evaluationContext) {
|
||||
getChildrenRenderer().buildChildren(value, builder, evaluationContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiElement getChildValueExpression(DebuggerTreeNode node, DebuggerContext context) throws EvaluateException {
|
||||
return getChildrenRenderer().getChildValueExpression(node, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExpandable(Value value, EvaluationContext evaluationContext, NodeDescriptor parentDescriptor) {
|
||||
return getChildrenRenderer().isExpandable(value, evaluationContext, parentDescriptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(Type type) {
|
||||
return getLabelRenderer().isApplicable(type) && getChildrenRenderer().isApplicable(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String calcLabel(ValueDescriptor descriptor, EvaluationContext evaluationContext, DescriptorLabelListener listener) throws EvaluateException {
|
||||
return getLabelRenderer().calcLabel(descriptor, evaluationContext, listener);
|
||||
}
|
||||
@@ -93,6 +100,7 @@ public class CompoundNodeRenderer extends NodeRendererImpl{
|
||||
myChildrenRenderer = childrenRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public void readExternal(Element element) throws InvalidDataException {
|
||||
super.readExternal(element);
|
||||
@@ -113,6 +121,7 @@ public class CompoundNodeRenderer extends NodeRendererImpl{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public void writeExternal(Element element) throws WriteExternalException {
|
||||
super.writeExternal(element);
|
||||
|
||||
@@ -44,6 +44,7 @@ public abstract class TypeRenderer implements Renderer {
|
||||
myProperties.setClassName(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Renderer clone() {
|
||||
try {
|
||||
final TypeRenderer cloned = (TypeRenderer)super.clone();
|
||||
@@ -56,20 +57,24 @@ public abstract class TypeRenderer implements Renderer {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(Type type) {
|
||||
return DebuggerUtils.instanceOf(type, getClassName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeExternal(Element element) throws WriteExternalException {
|
||||
myProperties.writeExternal(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readExternal(Element element) throws InvalidDataException {
|
||||
myProperties.readExternal(element);
|
||||
}
|
||||
|
||||
protected CachedEvaluator createCachedEvaluator() {
|
||||
return new CachedEvaluator() {
|
||||
@Override
|
||||
protected String getClassName() {
|
||||
return TypeRenderer.this.getClassName();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user