mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
IDEA-207694 There should remain the possibility to invoke 'normal' stepInto action
This commit is contained in:
@@ -13,6 +13,7 @@ import com.intellij.debugger.impl.DebuggerSession;
|
|||||||
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||||
import com.intellij.debugger.jdi.MethodBytecodeUtil;
|
import com.intellij.debugger.jdi.MethodBytecodeUtil;
|
||||||
import com.intellij.debugger.jdi.StackFrameProxyImpl;
|
import com.intellij.debugger.jdi.StackFrameProxyImpl;
|
||||||
|
import com.intellij.debugger.settings.DebuggerSettings;
|
||||||
import com.intellij.lang.java.JavaLanguage;
|
import com.intellij.lang.java.JavaLanguage;
|
||||||
import com.intellij.openapi.application.ReadAction;
|
import com.intellij.openapi.application.ReadAction;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
@@ -20,7 +21,6 @@ import com.intellij.openapi.editor.Document;
|
|||||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||||
import com.intellij.openapi.util.Ref;
|
import com.intellij.openapi.util.Ref;
|
||||||
import com.intellij.openapi.util.TextRange;
|
import com.intellij.openapi.util.TextRange;
|
||||||
import com.intellij.openapi.util.registry.Registry;
|
|
||||||
import com.intellij.openapi.vfs.VirtualFile;
|
import com.intellij.openapi.vfs.VirtualFile;
|
||||||
import com.intellij.psi.*;
|
import com.intellij.psi.*;
|
||||||
import com.intellij.util.DocumentUtil;
|
import com.intellij.util.DocumentUtil;
|
||||||
@@ -69,7 +69,7 @@ public class JavaSmartStepIntoHandler extends JvmSmartStepIntoHandler {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Promise<List<SmartStepTarget>> findStepIntoTargets(SourcePosition position, DebuggerSession session) {
|
public Promise<List<SmartStepTarget>> findStepIntoTargets(SourcePosition position, DebuggerSession session) {
|
||||||
if (Registry.is("debugger.smart.step.always")) {
|
if (DebuggerSettings.getInstance().ALWAYS_SMART_STEP_INTO) {
|
||||||
return findSmartStepTargetsAsync(position, session);
|
return findSmartStepTargetsAsync(position, session);
|
||||||
}
|
}
|
||||||
return Promises.rejectedPromise();
|
return Promises.rejectedPromise();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||||
package com.intellij.debugger.settings;
|
package com.intellij.debugger.settings;
|
||||||
|
|
||||||
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||||
@@ -67,6 +67,7 @@ public class DebuggerSettings implements Cloneable, PersistentStateComponent<Ele
|
|||||||
public boolean HOTSWAP_IN_BACKGROUND = true;
|
public boolean HOTSWAP_IN_BACKGROUND = true;
|
||||||
public boolean ENABLE_MEMORY_AGENT =
|
public boolean ENABLE_MEMORY_AGENT =
|
||||||
ApplicationManager.getApplication().isEAP() && !ApplicationManager.getApplication().isUnitTestMode();
|
ApplicationManager.getApplication().isEAP() && !ApplicationManager.getApplication().isUnitTestMode();
|
||||||
|
public boolean ALWAYS_SMART_STEP_INTO = true;
|
||||||
public boolean SKIP_SYNTHETIC_METHODS = true;
|
public boolean SKIP_SYNTHETIC_METHODS = true;
|
||||||
public boolean SKIP_CONSTRUCTORS;
|
public boolean SKIP_CONSTRUCTORS;
|
||||||
public boolean SKIP_GETTERS;
|
public boolean SKIP_GETTERS;
|
||||||
@@ -164,6 +165,7 @@ public class DebuggerSettings implements Cloneable, PersistentStateComponent<Ele
|
|||||||
ALWAYS_DEBUG == secondSettings.ALWAYS_DEBUG &&
|
ALWAYS_DEBUG == secondSettings.ALWAYS_DEBUG &&
|
||||||
HOTSWAP_IN_BACKGROUND == secondSettings.HOTSWAP_IN_BACKGROUND &&
|
HOTSWAP_IN_BACKGROUND == secondSettings.HOTSWAP_IN_BACKGROUND &&
|
||||||
ENABLE_MEMORY_AGENT == secondSettings.ENABLE_MEMORY_AGENT &&
|
ENABLE_MEMORY_AGENT == secondSettings.ENABLE_MEMORY_AGENT &&
|
||||||
|
ALWAYS_SMART_STEP_INTO == secondSettings.ALWAYS_SMART_STEP_INTO &&
|
||||||
SKIP_SYNTHETIC_METHODS == secondSettings.SKIP_SYNTHETIC_METHODS &&
|
SKIP_SYNTHETIC_METHODS == secondSettings.SKIP_SYNTHETIC_METHODS &&
|
||||||
SKIP_CLASSLOADERS == secondSettings.SKIP_CLASSLOADERS &&
|
SKIP_CLASSLOADERS == secondSettings.SKIP_CLASSLOADERS &&
|
||||||
SKIP_CONSTRUCTORS == secondSettings.SKIP_CONSTRUCTORS &&
|
SKIP_CONSTRUCTORS == secondSettings.SKIP_CONSTRUCTORS &&
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||||
package com.intellij.debugger.settings;
|
package com.intellij.debugger.settings;
|
||||||
|
|
||||||
import com.intellij.debugger.DebuggerBundle;
|
import com.intellij.debugger.DebuggerBundle;
|
||||||
@@ -18,6 +18,7 @@ import java.awt.event.ActionListener;
|
|||||||
import static java.awt.GridBagConstraints.*;
|
import static java.awt.GridBagConstraints.*;
|
||||||
|
|
||||||
class DebuggerSteppingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
class DebuggerSteppingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
||||||
|
private JCheckBox myCbAlwaysSmartStep;
|
||||||
private JCheckBox myCbStepInfoFiltersEnabled;
|
private JCheckBox myCbStepInfoFiltersEnabled;
|
||||||
private JCheckBox myCbSkipSyntheticMethods;
|
private JCheckBox myCbSkipSyntheticMethods;
|
||||||
private JCheckBox myCbSkipConstructors;
|
private JCheckBox myCbSkipConstructors;
|
||||||
@@ -31,6 +32,8 @@ class DebuggerSteppingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset(@NotNull DebuggerSettings settings) {
|
public void reset(@NotNull DebuggerSettings settings) {
|
||||||
|
myCbAlwaysSmartStep.setSelected(settings.ALWAYS_SMART_STEP_INTO);
|
||||||
|
|
||||||
myCbSkipSimpleGetters.setSelected(settings.SKIP_GETTERS);
|
myCbSkipSimpleGetters.setSelected(settings.SKIP_GETTERS);
|
||||||
myCbSkipSyntheticMethods.setSelected(settings.SKIP_SYNTHETIC_METHODS);
|
myCbSkipSyntheticMethods.setSelected(settings.SKIP_SYNTHETIC_METHODS);
|
||||||
myCbSkipConstructors.setSelected(settings.SKIP_CONSTRUCTORS);
|
myCbSkipConstructors.setSelected(settings.SKIP_CONSTRUCTORS);
|
||||||
@@ -60,6 +63,7 @@ class DebuggerSteppingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getSettingsTo(DebuggerSettings settings) {
|
private void getSettingsTo(DebuggerSettings settings) {
|
||||||
|
settings.ALWAYS_SMART_STEP_INTO = myCbAlwaysSmartStep.isSelected();
|
||||||
settings.SKIP_GETTERS = myCbSkipSimpleGetters.isSelected();
|
settings.SKIP_GETTERS = myCbSkipSimpleGetters.isSelected();
|
||||||
settings.SKIP_SYNTHETIC_METHODS = myCbSkipSyntheticMethods.isSelected();
|
settings.SKIP_SYNTHETIC_METHODS = myCbSkipSyntheticMethods.isSelected();
|
||||||
settings.SKIP_CONSTRUCTORS = myCbSkipConstructors.isSelected();
|
settings.SKIP_CONSTRUCTORS = myCbSkipConstructors.isSelected();
|
||||||
@@ -91,12 +95,14 @@ class DebuggerSteppingConfigurable implements ConfigurableUi<DebuggerSettings> {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public JComponent getComponent() {
|
public JComponent getComponent() {
|
||||||
final JPanel panel = new JPanel(new GridBagLayout());
|
final JPanel panel = new JPanel(new GridBagLayout());
|
||||||
|
myCbAlwaysSmartStep = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.always.smart.step.into"));
|
||||||
myCbSkipSyntheticMethods = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.synthetic.methods"));
|
myCbSkipSyntheticMethods = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.synthetic.methods"));
|
||||||
myCbSkipConstructors = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.constructors"));
|
myCbSkipConstructors = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.constructors"));
|
||||||
myCbSkipClassLoaders = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.classLoaders"));
|
myCbSkipClassLoaders = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.classLoaders"));
|
||||||
myCbSkipSimpleGetters = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.simple.getters"));
|
myCbSkipSimpleGetters = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.skip.simple.getters"));
|
||||||
myCbStepInfoFiltersEnabled = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.step.filters.list.header"));
|
myCbStepInfoFiltersEnabled = new JCheckBox(DebuggerBundle.message("label.debugger.general.configurable.step.filters.list.header"));
|
||||||
panel.add(myCbSkipSyntheticMethods, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
panel.add(myCbAlwaysSmartStep, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
||||||
|
panel.add(myCbSkipSyntheticMethods, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.insetsTop(8), 0, 0));
|
||||||
panel.add(myCbSkipConstructors, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
panel.add(myCbSkipConstructors, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
||||||
panel.add(myCbSkipClassLoaders, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
panel.add(myCbSkipClassLoaders, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
||||||
panel.add(myCbSkipSimpleGetters, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
panel.add(myCbSkipSimpleGetters, new GridBagConstraints(0, RELATIVE, 1, 1, 1.0, 0.0, WEST, NONE, JBUI.emptyInsets(), 0, 0));
|
||||||
|
|||||||
@@ -342,8 +342,6 @@ debugger.click.disable.breakpoints=false
|
|||||||
debugger.click.disable.breakpoints.description=Single click to disable a breakpoint, middle click to remove
|
debugger.click.disable.breakpoints.description=Single click to disable a breakpoint, middle click to remove
|
||||||
debugger.renderers.file=true
|
debugger.renderers.file=true
|
||||||
debugger.renderers.file.description=Enable file object renderer
|
debugger.renderers.file.description=Enable file object renderer
|
||||||
debugger.smart.step.always=true
|
|
||||||
debugger.smart.step.always.description=Use smart step into instead of the regular one
|
|
||||||
debugger.single.smart.step.force=true
|
debugger.single.smart.step.force=true
|
||||||
debugger.single.smart.step.force.description=Do force step into on single variant smart step into
|
debugger.single.smart.step.force.description=Do force step into on single variant smart step into
|
||||||
debugger.emulate.method.breakpoints=true
|
debugger.emulate.method.breakpoints=true
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ label.debugger.general.configurable.kill.immediately=Kill the debug process imme
|
|||||||
label.debugger.general.configurable.always.debug=Start run configurations with the debug agent
|
label.debugger.general.configurable.always.debug=Start run configurations with the debug agent
|
||||||
label.debugger.general.configurable.enable.memory.agent=Attach memory agent
|
label.debugger.general.configurable.enable.memory.agent=Attach memory agent
|
||||||
label.debugger.general.configurable.enable.memory.agent.tooltip.text=Java debugger will provide additional information about objects in the heap
|
label.debugger.general.configurable.enable.memory.agent.tooltip.text=Java debugger will provide additional information about objects in the heap
|
||||||
|
label.debugger.general.configurable.always.smart.step.into=A&lways do smart step into
|
||||||
label.debugger.general.configurable.skip.synthetic.methods=Ski&p synthetic methods
|
label.debugger.general.configurable.skip.synthetic.methods=Ski&p synthetic methods
|
||||||
label.debugger.general.configurable.skip.constructors=Skip &constructors
|
label.debugger.general.configurable.skip.constructors=Skip &constructors
|
||||||
label.debugger.general.configurable.skip.classLoaders=Skip class l&oaders
|
label.debugger.general.configurable.skip.classLoaders=Skip class l&oaders
|
||||||
|
|||||||
Reference in New Issue
Block a user