Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ public void testFindConflicting2() throws Exception {
}

public void testSimpleVisibility() throws Exception {
boolean stepFilterPref = DebugUITools.isUseStepFilters();
if (stepFilterPref) {
DebugUITools.setUseStepFilters(false);
}
String typeName = "LocalVariablesTests";

ILineBreakpoint bp = createLineBreakpoint(21, typeName);
Expand Down Expand Up @@ -116,6 +120,9 @@ public void testSimpleVisibility() throws Exception {
assertEquals("Visible var 2 should be 'i2'", "i2", vars[1].getName());

} finally {
if (!stepFilterPref) {
DebugUITools.setUseStepFilters(false);
}
terminateAndRemove(thread);
removeAllBreakpoints();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.jdt.debug.core.IJavaThread;
Expand Down Expand Up @@ -186,6 +187,10 @@ public void testTranslateContainers() throws Exception {
* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=346116
*/
public void testInspectClassFileFromJar() throws Exception {
boolean stepFilterPref = DebugUITools.isUseStepFilters();
if (stepFilterPref) {
DebugUITools.setUseStepFilters(false);
}
createLaunchConfiguration(fgJarProject, LAUNCHCONFIGURATIONS, A_RUN_JAR);
createLineBreakpoint(21, A_RUN_JAR);
ILaunchConfiguration config = getLaunchConfiguration(fgJarProject, LAUNCHCONFIGURATIONS, A_RUN_JAR);
Expand All @@ -201,6 +206,9 @@ public void testInspectClassFileFromJar() throws Exception {
assertEquals("the name of the type being inspected must be a.JarClass", "a.JarClass", value.getReferenceTypeName());
}
finally {
if (!stepFilterPref) {
DebugUITools.setUseStepFilters(false);
}
terminateAndRemove(thread);
}
}
Expand All @@ -211,6 +219,10 @@ public void testInspectClassFileFromJar() throws Exception {
* See https://bugs.eclipse.org/bugs/show_bug.cgi?id=346116
*/
public void testShowClassFileFromJar() throws Exception {
boolean stepFilterPref = DebugUITools.isUseStepFilters();
if (stepFilterPref) {
DebugUITools.setUseStepFilters(false);
}
createLaunchConfiguration(fgJarProject, LAUNCHCONFIGURATIONS, A_RUN_JAR);
createLineBreakpoint(21, A_RUN_JAR);
ILaunchConfiguration config = getLaunchConfiguration(fgJarProject, LAUNCHCONFIGURATIONS, A_RUN_JAR);
Expand All @@ -235,6 +247,9 @@ public void testShowClassFileFromJar() throws Exception {
assertEquals("we should have found a file named a.JarClass.class", "JarClass.class", ((ClassFile) source).getElementName());
}
finally {
if (!stepFilterPref) {
DebugUITools.setUseStepFilters(false);
}
terminateAndRemove(thread);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.eclipse.jdt.internal.debug.ui;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
import org.eclipse.jface.preference.IPreferenceStore;
Expand All @@ -38,7 +39,14 @@ public void initializeDefaultPreferences() {
store.setDefault(IJDIPreferencesConstants.PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT, true);
store.setDefault(IJDIPreferencesConstants.PREF_PROMPT_BEFORE_MODIFYING_FINAL_FIELDS, true);
store.setDefault(IJDIPreferencesConstants.PREF_PROMPT_DELETE_CONDITIONAL_BREAKPOINT, true);


DebugUITools.setUseStepFilters(true);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, makes product customization impossible.

Add this line org.eclipse.debug.core/org.eclipse.debug.core.USE_STEP_FILTERS=false to pluginCustomization.ini file and start Eclipse with -pluginCustomization /path/to/pluginCustomization.ini argument (change the path to your local one).

This is supposed to disable step filtering by default, because it is the product setting.
With the line above it will not work anymore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check this 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this change
Updated setting via eclipse-platform/eclipse.platform@b2ffdcf

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With latest change in platform, one can modify via -pluginCustomization

store.setDefault(IJDIPreferencesConstants.PREF_STATEMENT_LEVEL_STEPPING, true);
store.setDefault(IJDIPreferencesConstants.PREF_FILTER_SYNTHETICS, true);
store.setDefault(IJDIPreferencesConstants.PREF_STEP_THRU_FILTERS, true);
store.setDefault(IJDIPreferencesConstants.PREF_FILTER_GETTERS, true);
store.setDefault(IJDIPreferencesConstants.PREF_FILTER_SETTERS, true);

store.setDefault(IJDIPreferencesConstants.PREF_SHOW_QUALIFIED_NAMES, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void init(IWorkbench workbench) {}
*/
private void createStepFilterPreferences(Composite parent) {
Composite container = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0);
fUseStepFiltersButton = SWTFactory.createCheckButton(container, DebugUIMessages.JavaStepFilterPreferencePage__Use_step_filters, null, DebugUITools.isUseStepFilters(), 2);
fUseStepFiltersButton = SWTFactory.createCheckButton(container, DebugUIMessages.JavaStepFilterPreferencePage__Use_step_filters, null, DebugUITools.isUseStepFilters(), 2);
fUseStepFiltersButton.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
Expand Down Expand Up @@ -189,8 +189,8 @@ public boolean performOk() {
@Override
protected void performDefaults() {
// Cannot use DebugUITools.isUseStepFilters() as this not give the default value, no API from Platform to get the default value
fUseStepFiltersButton.setSelection(false);
setPageEnablement(false);
fUseStepFiltersButton.setSelection(true);
setPageEnablement(true);
fFilterSyntheticButton.setSelection(getPreferenceStore().getDefaultBoolean(IJDIPreferencesConstants.PREF_FILTER_SYNTHETICS));
fFilterStaticButton.setSelection(getPreferenceStore().getDefaultBoolean(IJDIPreferencesConstants.PREF_FILTER_STATIC_INITIALIZERS));
fFilterConstructorButton.setSelection(getPreferenceStore().getDefaultBoolean(IJDIPreferencesConstants.PREF_FILTER_CONSTRUCTORS));
Expand Down
Loading