mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -93,7 +93,7 @@ public abstract class DebuggerTreePanel extends UpdatableDebuggerView implements
|
||||
getTree().rebuild(context);
|
||||
}
|
||||
}
|
||||
catch (VMDisconnectedException e) {
|
||||
catch (VMDisconnectedException ignored) {
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,11 +83,13 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void build(DebuggerContextImpl context) {
|
||||
myAnyNewLocals = false;
|
||||
buildWhenPaused(context, new RefreshFrameTreeCommand(context));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreNodeState(DebuggerTreeNodeImpl node) {
|
||||
if (myAnyNewLocals) {
|
||||
final NodeDescriptorImpl descriptor = node.getDescriptor();
|
||||
@@ -107,6 +109,7 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected DebuggerCommandImpl getBuildNodeCommand(final DebuggerTreeNodeImpl node) {
|
||||
if (node.getDescriptor() instanceof StackFrameDescriptorImpl) {
|
||||
return new BuildFrameTreeVariablesCommand(node);
|
||||
@@ -119,6 +122,7 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
super(stackNode);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildVariables(final StackFrameDescriptorImpl stackDescriptor, final EvaluationContextImpl evaluationContext) throws EvaluateException {
|
||||
final DebuggerContextImpl debuggerContext = getDebuggerContext();
|
||||
final SourcePosition sourcePosition = debuggerContext.getSourcePosition();
|
||||
@@ -135,6 +139,7 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
final EvaluationContextImpl evalContext = debuggerContext.createEvaluationContext();
|
||||
final Pair<Set<String>, Set<TextWithImports>> usedVars =
|
||||
ApplicationManager.getApplication().runReadAction(new Computable<Pair<Set<String>, Set<TextWithImports>>>() {
|
||||
@Override
|
||||
public Pair<Set<String>, Set<TextWithImports>> compute() {
|
||||
return findReferencedVars(visibleVariables.keySet(), sourcePosition, evalContext);
|
||||
}
|
||||
@@ -396,6 +401,7 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextAction() throws Exception {
|
||||
DebuggerTreeNodeImpl rootNode;
|
||||
|
||||
@@ -433,7 +439,7 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
rootNode.add(MessageDescriptor.THREAD_IS_RUNNING);
|
||||
}
|
||||
}
|
||||
catch (ObjectCollectedException e) {
|
||||
catch (ObjectCollectedException ignored) {
|
||||
rootNode.add(new MessageDescriptor(DebuggerBundle.message("label.thread.node.thread.collected", currentThread.name())));
|
||||
}
|
||||
}
|
||||
@@ -448,12 +454,14 @@ public class FrameVariablesTree extends DebuggerTree {
|
||||
|
||||
final DebuggerTreeNodeImpl rootNode1 = rootNode;
|
||||
DebuggerInvocationUtil.swingInvokeLater(getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getMutableModel().setRoot(rootNode1);
|
||||
treeChanged();
|
||||
|
||||
final TreeModel model = getModel();
|
||||
model.addTreeModelListener(new TreeModelAdapter() {
|
||||
@Override
|
||||
public void treeStructureChanged(TreeModelEvent e) {
|
||||
final Object[] path = e.getPath();
|
||||
if (path.length > 0 && path[path.length - 1] == rootNode1) {
|
||||
|
||||
@@ -35,15 +35,18 @@ public class FramesList extends DebuggerFramesList {
|
||||
doInit();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FramesListRenderer createListRenderer() {
|
||||
return new FramesListRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFrameChanged(final Object selectedValue) {
|
||||
final StackFrameDescriptorImpl descriptor = selectedValue instanceof StackFrameDescriptorImpl? (StackFrameDescriptorImpl)selectedValue : null;
|
||||
final Method newMethod = descriptor != null? descriptor.getMethod() : null;
|
||||
if (!Comparing.equal(mySelectedMethod, newMethod)) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
repaint();
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
package com.intellij.debugger.ui.impl;
|
||||
|
||||
import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.xdebugger.impl.ui.tree.ValueMarkup;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.ui.ColoredListCellRenderer;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.xdebugger.impl.ui.tree.ValueMarkup;
|
||||
import com.intellij.xdebugger.ui.DebuggerColors;
|
||||
import com.sun.jdi.Method;
|
||||
|
||||
@@ -38,6 +38,7 @@ class FramesListRenderer extends ColoredListCellRenderer {
|
||||
myColorScheme = EditorColorsManager.getInstance().getGlobalScheme();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void customizeCellRenderer(final JList list, final Object item, final int index, final boolean selected, final boolean hasFocus) {
|
||||
if (!(item instanceof StackFrameDescriptorImpl)) {
|
||||
append(item.toString(), SimpleTextAttributes.GRAYED_ATTRIBUTES);
|
||||
|
||||
Reference in New Issue
Block a user