Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -26,7 +26,7 @@ public class DebugPreferenceInitializer extends AbstractPreferenceInitializer {
@Override
public void initializeDefaultPreferences() {
// Step filter preferences
Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), StepFilterManager.PREF_USE_STEP_FILTERS, false);
Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), StepFilterManager.PREF_USE_STEP_FILTERS, true);
Copy link
Member

Choose a reason for hiding this comment

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

The problem with this is that it will change defaults for every bundle that uses the preference, even if no JDT is included. So if some code used this preference, it will be now affected, and that is not nice (ideally we enable it only if JDT is there).

See https://github.com/search?q=PREF_USE_STEP_FILTERS&type=code&p=1

What really surprises me, is that if I add exact same code like here in JDIDebugUIPreferenceInitializer.initializeDefaultPreferences(), it will not work with product customization, but here it works.

What is also strange, is that if I debug here and see what is reported by the code below in the debug shell

org.eclipse.core.runtime.Platform.getPreferencesService().getBoolean(
		org.eclipse.debug.core.DebugPlugin.getUniqueIdentifier(), 
		org.eclipse.debug.internal.core.StepFilterManager.PREF_USE_STEP_FILTERS, false, null);

the value is shown as "true" after this line (even if product property is set to "false"), but once devbugger stops at JDIDebugUIPreferenceInitializer.initializeDefaultPreferences(), the same evaluation shows "false" again.

This is really strange.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have any suggestions/approach for the fix ?

//launch configurations preferences
Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), DebugPlugin.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, false);
Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, true);
Expand Down
1 change: 0 additions & 1 deletion debug/org.eclipse.debug.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@
menubarPath="org.eclipse.ui.run/emptyStepGroup"
toolbarPath="org.eclipse.debug.ui.main.toolbar/renderGroup"
style="toggle"
state="false"
initialEnabled="true">
</action>
<action
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2013 IBM Corporation and others.
* Copyright (c) 2006, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -131,6 +131,7 @@ protected void initState() {
if (node != null) {
node.addPreferenceChangeListener(this);
}
setChecked(DebugUITools.isUseStepFilters());
}

@Override
Expand Down
Loading