From 7cf55c1aef4c1791380c2ee24511af83b9806e16 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Fri, 20 Feb 2015 17:16:07 +0300 Subject: [PATCH 1/2] cleanup --- .../debugger/actions/ShowLibraryFramesAction.java | 7 ++++--- .../debugger/engine/JavaDebugProcess.java | 15 +++++---------- .../intellij/debugger/ui/DebuggerSessionTab.java | 9 ++++----- .../src/com/intellij/debugger/ui/FramesPanel.java | 6 +++--- resources/src/idea/JavaActions.xml | 1 - 5 files changed, 16 insertions(+), 22 deletions(-) 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 @@ - From 4ad508a75fdd8804ce0618c21f55ab3b6786eaff Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Fri, 20 Feb 2015 17:27:10 +0300 Subject: [PATCH 2/2] removed unused actions --- .../CompareValueWithClipboardAction.java | 34 ---------- .../debugger/actions/CopyValueAction.java | 32 --------- .../debugger/actions/EditWatchAction.java | 51 -------------- .../debugger/actions/NewWatchAction.java | 43 ------------ .../actions/RemoveAllWatchesAction.java | 46 ------------- .../debugger/actions/RemoveWatchAction.java | 68 ------------------- .../ShowExecutionPointActionHandler.java | 38 ----------- resources/src/idea/JavaActions.xml | 6 -- 8 files changed, 318 deletions(-) delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/CompareValueWithClipboardAction.java delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/CopyValueAction.java delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/EditWatchAction.java delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/NewWatchAction.java delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/RemoveAllWatchesAction.java delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/RemoveWatchAction.java delete mode 100644 java/debugger/impl/src/com/intellij/debugger/actions/ShowExecutionPointActionHandler.java diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/CompareValueWithClipboardAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/CompareValueWithClipboardAction.java deleted file mode 100644 index 1d6ed15abb59..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/CompareValueWithClipboardAction.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2000-2012 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.impl.DebuggerContextImpl; -import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; -import com.intellij.diff.DiffDialogHints; -import com.intellij.diff.DiffManager; -import com.intellij.diff.DiffRequestFactory; -import com.intellij.diff.requests.DiffRequest; -import com.intellij.openapi.project.Project; - -/** - * @author Jeka - */ -public class CompareValueWithClipboardAction extends BaseValueAction { - protected void processText(final Project project, final String text, DebuggerTreeNodeImpl node, DebuggerContextImpl debuggerContext) { - DiffRequest request = DiffRequestFactory.getInstance().createClipboardVsValue(text); - DiffManager.getInstance().showDiff(project, request); - } -} \ No newline at end of file diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/CopyValueAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/CopyValueAction.java deleted file mode 100644 index 256566557ae1..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/CopyValueAction.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2000-2009 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.impl.DebuggerContextImpl; -import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; -import com.intellij.openapi.ide.CopyPasteManager; -import com.intellij.openapi.project.Project; - -import java.awt.datatransfer.StringSelection; - -/* - * @author Jeka - */ -public class CopyValueAction extends BaseValueAction { - protected void processText(final Project project, final String text, DebuggerTreeNodeImpl node, DebuggerContextImpl debuggerContext) { - CopyPasteManager.getInstance().setContents(new StringSelection(text)); - } -} diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/EditWatchAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/EditWatchAction.java deleted file mode 100644 index 48bf5acd10bb..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/EditWatchAction.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2000-2009 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.ui.DebuggerPanelsManager; -import com.intellij.debugger.ui.impl.MainWatchPanel; -import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; -import com.intellij.debugger.ui.impl.watch.WatchItemDescriptor; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.project.Project; - -/** - * User: lex - * Date: Sep 26, 2003 - * Time: 8:34:01 PM - */ -public class EditWatchAction extends DebuggerAction { - public void actionPerformed(final AnActionEvent e) { - final DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext()); - if(selectedNode == null || !(selectedNode.getDescriptor() instanceof WatchItemDescriptor)) return; - - Project project = CommonDataKeys.PROJECT.getData(e.getDataContext()); - - MainWatchPanel watchPanel = DebuggerPanelsManager.getInstance(project).getWatchPanel(); - if(watchPanel != null) { - watchPanel.editNode(selectedNode); - } - } - - public void update(AnActionEvent e) { - final DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext()); - - e.getPresentation().setVisible(selectedNode != null && selectedNode.getDescriptor() instanceof WatchItemDescriptor); - } - -}; diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/NewWatchAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/NewWatchAction.java deleted file mode 100644 index 6a8d3fe017df..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/NewWatchAction.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2000-2014 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Class NewWatchAction - * @author Jeka - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.ui.DebuggerPanelsManager; -import com.intellij.debugger.ui.impl.MainWatchPanel; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -public class NewWatchAction extends DebuggerAction { - public void actionPerformed(final AnActionEvent e) { - getWatchPanel(e).newWatch(); - } - - @Override - public void update(@NotNull AnActionEvent e) { - e.getPresentation().setEnabled(getWatchPanel(e) != null); - } - - private static MainWatchPanel getWatchPanel(AnActionEvent e) { - Project project = e.getProject(); - return project != null ? DebuggerPanelsManager.getInstance(project).getWatchPanel() : null; - } -} diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/RemoveAllWatchesAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/RemoveAllWatchesAction.java deleted file mode 100644 index e6773227cc1c..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/RemoveAllWatchesAction.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2000-2009 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.ui.impl.watch.DebuggerTree; -import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.Presentation; - -import java.util.Enumeration; - -/** - * User: lex - * Date: Sep 26, 2003 - * Time: 6:24:44 PM - */ -public class RemoveAllWatchesAction extends RemoveWatchAction { - protected DebuggerTreeNodeImpl[] getNodesToDelete(AnActionEvent e) { - DebuggerTree tree = getTree(e.getDataContext()); - if(tree == null) return null; - DebuggerTreeNodeImpl root = (DebuggerTreeNodeImpl)tree.getModel().getRoot(); - DebuggerTreeNodeImpl [] result = new DebuggerTreeNodeImpl[root.getChildCount()]; - int i = 0; - for(Enumeration enumeration = root.children(); enumeration.hasMoreElements(); i++) { - DebuggerTreeNodeImpl node = (DebuggerTreeNodeImpl)enumeration.nextElement(); - result[i] = node; - } - return result; - } - - protected void updatePresentation(Presentation presentation, int watchesCount) { - } -} diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/RemoveWatchAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/RemoveWatchAction.java deleted file mode 100644 index 322241943357..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/RemoveWatchAction.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2000-2009 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.ui.impl.MainWatchPanel; -import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; -import com.intellij.debugger.ui.impl.watch.WatchItemDescriptor; -import com.intellij.debugger.DebuggerBundle; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.Presentation; - -import java.util.ArrayList; - -public class RemoveWatchAction extends DebuggerAction { - protected DebuggerTreeNodeImpl[] getNodesToDelete(AnActionEvent e) { - DebuggerTreeNodeImpl[] selectedNodes = getSelectedNodes(e.getDataContext()); - if(selectedNodes == null) return null; - ArrayList selectedWatches = new ArrayList(); - for (int i = 0; i < selectedNodes.length; i++) { - if(selectedNodes[i].getDescriptor() instanceof WatchItemDescriptor) { - selectedWatches.add(selectedNodes[i]); - } - } - - return selectedWatches.toArray(new DebuggerTreeNodeImpl[selectedWatches.size()]); - } - - public void actionPerformed(AnActionEvent e) { - DebuggerTreeNodeImpl [] nodes = getNodesToDelete(e); - if (nodes == null || nodes.length == 0) return; - - MainWatchPanel watchPanel = (MainWatchPanel)getPanel(e.getDataContext()); - - for (int i = 0; i < nodes.length; i++) { - DebuggerTreeNodeImpl node = nodes[i]; - watchPanel.getWatchTree().removeWatch(node); - } - } - - protected void updatePresentation(Presentation presentation, int watchesCount) { - presentation.setText(DebuggerBundle.message("action.remove.watch.text", watchesCount)); - } - - public void update(AnActionEvent event) { - Presentation presentation = event.getPresentation(); - DebuggerTreeNodeImpl[] nodes = getNodesToDelete(event); - if (nodes != null && nodes.length > 0) { - presentation.setEnabled(true); - } - else { - presentation.setEnabled(false); - } - updatePresentation(presentation, nodes != null? nodes.length : 0); - } -} diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/ShowExecutionPointActionHandler.java b/java/debugger/impl/src/com/intellij/debugger/actions/ShowExecutionPointActionHandler.java deleted file mode 100644 index f80bab05b6ad..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/actions/ShowExecutionPointActionHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2000-2009 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.intellij.debugger.actions; - -import com.intellij.debugger.DebuggerManagerEx; -import com.intellij.debugger.impl.DebuggerSession; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.project.Project; -import com.intellij.xdebugger.impl.actions.DebuggerActionHandler; -import org.jetbrains.annotations.NotNull; - -public class ShowExecutionPointActionHandler extends DebuggerActionHandler { - public void perform(@NotNull final Project project, final AnActionEvent event) { - final DebuggerSession session = (DebuggerManagerEx.getInstanceEx(project)).getContext().getDebuggerSession(); - if (session != null) { - session.showExecutionPoint(); - } - } - - public boolean isEnabled(@NotNull final Project project, final AnActionEvent event) { - DebuggerSession debuggerSession = (DebuggerManagerEx.getInstanceEx(project)).getContext().getDebuggerSession(); - return debuggerSession != null && debuggerSession.isPaused() && - debuggerSession.getContextManager().getContext().getSuspendContext().getThread() != null; - } -} \ No newline at end of file diff --git a/resources/src/idea/JavaActions.xml b/resources/src/idea/JavaActions.xml index 003f61467fa0..149611088058 100644 --- a/resources/src/idea/JavaActions.xml +++ b/resources/src/idea/JavaActions.xml @@ -165,19 +165,13 @@ - - - - - -