diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/ShowLibraryFramesAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/ShowLibraryFramesAction.java index 972cfef48661..6c53669dd810 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/ShowLibraryFramesAction.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/ShowLibraryFramesAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 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. @@ -21,6 +21,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.actionSystem.ToggleAction; import com.intellij.xdebugger.impl.XDebuggerUtilImpl; +import org.jetbrains.annotations.NotNull; /** * @author egor @@ -36,10 +37,10 @@ public class ShowLibraryFramesAction extends ToggleAction { } @Override - public void update(final AnActionEvent e) { + public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean shouldShow = !(Boolean)presentation.getClientProperty(SELECTED_PROPERTY); + final boolean shouldShow = !Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); presentation.setText(shouldShow ? ourTextWhenShowIsOn : ourTextWhenShowIsOff); } diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java b/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java index 0b1cd18bb05b..5dd4279b3cd1 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/JavaDebugProcess.java @@ -137,11 +137,7 @@ public class JavaDebugProcess extends XDebugProcess { myNodeManager = new NodeManagerImpl(session.getProject(), null) { @Override public DebuggerTreeNodeImpl createNode(final NodeDescriptor descriptor, EvaluationContext evaluationContext) { - // value gathered here is required for correct renderers work. e.g. array renderer - //((NodeDescriptorImpl)descriptor).setContext((EvaluationContextImpl)evaluationContext); - final DebuggerTreeNodeImpl node = new DebuggerTreeNodeImpl(null, descriptor); - //((NodeDescriptorImpl)descriptor).updateRepresentation((EvaluationContextImpl)evaluationContext, DescriptorLabelListener.DUMMY_LISTENER); - return node; + return new DebuggerTreeNodeImpl(null, descriptor); } @Override @@ -322,7 +318,6 @@ public class JavaDebugProcess extends XDebugProcess { public void registerAdditionalActions(@NotNull DefaultActionGroup leftToolbar, @NotNull DefaultActionGroup topToolbar, @NotNull DefaultActionGroup settings) { Constraints beforeRunner = new Constraints(Anchor.BEFORE, "Runner.Layout"); leftToolbar.add(Separator.getInstance(), beforeRunner); - //leftToolbar.add(ActionManager.getInstance().getAction(DebuggerActions.EXPORT_THREADS), beforeRunner); leftToolbar.add(ActionManager.getInstance().getAction(DebuggerActions.DUMP_THREADS), beforeRunner); leftToolbar.add(Separator.getInstance(), beforeRunner); @@ -339,10 +334,10 @@ public class JavaDebugProcess extends XDebugProcess { } @Override - public void update(final AnActionEvent e) { + public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean autoModeEnabled = (Boolean)presentation.getClientProperty(SELECTED_PROPERTY); + final boolean autoModeEnabled = Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); presentation.setText(autoModeEnabled ? "All-Variables Mode" : "Auto-Variables Mode"); } @@ -374,10 +369,10 @@ public class JavaDebugProcess extends XDebugProcess { } @Override - public void update(final AnActionEvent e) { + public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean watchValues = (Boolean)presentation.getClientProperty(SELECTED_PROPERTY); + final boolean watchValues = Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); DebugProcessImpl process = getCurrentDebugProcess(e.getProject()); final String actionText = watchValues ? myMyTextDisable : myTextEnable; if (process == null || process.canGetMethodReturnValue()) { diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/DebuggerSessionTab.java b/java/debugger/impl/src/com/intellij/debugger/ui/DebuggerSessionTab.java index a088e953557f..51a96197ba48 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/DebuggerSessionTab.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/DebuggerSessionTab.java @@ -287,7 +287,6 @@ public class DebuggerSessionTab extends DebuggerSessionTabBase implements Dispos } leftToolbar.addSeparator(); - //addAction(leftToolbar, DebuggerActions.EXPORT_THREADS); addAction(leftToolbar, DebuggerActions.DUMP_THREADS); leftToolbar.addSeparator(); @@ -523,10 +522,10 @@ public class DebuggerSessionTab extends DebuggerSessionTabBase implements Dispos } @Override - public void update(final AnActionEvent e) { + public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean autoModeEnabled = (Boolean)presentation.getClientProperty(SELECTED_PROPERTY); + final boolean autoModeEnabled = Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); presentation.setText(autoModeEnabled ? "All-Variables Mode" : "Auto-Variables Mode"); } @@ -558,10 +557,10 @@ public class DebuggerSessionTab extends DebuggerSessionTabBase implements Dispos } @Override - public void update(final AnActionEvent e) { + public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean watchValues = (Boolean)presentation.getClientProperty(SELECTED_PROPERTY); + final boolean watchValues = Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); final DebugProcessImpl process = getDebugProcess(); final String actionText = watchValues ? myMyTextDisable : myTextEnable; if (process != null && process.canGetMethodReturnValue()) { diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/FramesPanel.java b/java/debugger/impl/src/com/intellij/debugger/ui/FramesPanel.java index e17b8af10827..dba4453ae43c 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/FramesPanel.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/FramesPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 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. @@ -710,10 +710,10 @@ public class FramesPanel extends UpdatableDebuggerView implements DataProvider { } @Override - public void update(final AnActionEvent e) { + public void update(@NotNull final AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); - final boolean shouldShow = !(Boolean)presentation.getClientProperty(SELECTED_PROPERTY); + final boolean shouldShow = !Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY)); presentation.setText(shouldShow ? ourTextWhenShowIsOn : ourTextWhenShowIsOff); } diff --git a/resources/src/idea/JavaActions.xml b/resources/src/idea/JavaActions.xml index 9efac63d0dce..003f61467fa0 100644 --- a/resources/src/idea/JavaActions.xml +++ b/resources/src/idea/JavaActions.xml @@ -127,7 +127,6 @@ -