Bug 548989 - [Quicksearch] Initialize preference defaults using AbstractPreferenceInitializer
Summary: [Quicksearch] Initialize preference defaults using AbstractPreferenceInitializer
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.13   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-04 15:07 EDT by Kris De Volder CLA
Modified: 2022-06-10 02:14 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kris De Volder CLA 2019-07-04 15:07:56 EDT
Follow up ticket from: https://bugs.eclipse.org/bugs/show_bug.cgi?id=548518

Preferences default values are initialized in a 'ad-hoc' manner. There is an extension point for this purpose that should be used instead.

See: https://git.eclipse.org/r/#/c/145336/6/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/core/preferences/QuickSearchPreferences.java@86
Comment 1 Jan Poganski CLA 2020-12-02 06:19:53 EST
Is this bug the reason why I cannot influence the preference defaults for Quicksearch using plugin_customization.ini in my customized Eclipse product?

Here is an example of what I wanted to set in that file:
org.eclipse.text.quicksearch/ignored.names=bin, build, BUILD, target
(as the ignored names seem to be interpreted case-sensitively so that my BUILD folders were not ignored when using the standard list of defaults)

Unfortunately this line seems to have no effect.
Comment 2 Jan Poganski CLA 2021-05-11 05:51:26 EDT
Kris, thanks for the link to the review where I found your comment:

"[...] It works now and I have had a lot of problems getting the abstract preference intializer extension point to work properly in the past.
[...] I would just not mess with it unless there was another pressing reason to be making any changes here."

Can you explain which problems you faced when trying to use that extension point? I would like to understand this challenge so that I can evaluate if I could contribute here.
Comment 3 Jan Poganski CLA 2022-06-09 09:51:56 EDT
In the meantime I've created a QuickSearchPreferenceInitializer implementing IStartup as a workaround. It respects the user's preferences but when the default preferences are effective it sets my desired preferences instead.
Comment 4 Kris De Volder CLA 2022-06-09 11:55:28 EDT
> Can you explain which problems you faced when trying to use that extension point? I would like to understand this challenge so that I can evaluate if I could contribute here.

Sorry for the late reply. But I don't have much useful to say anyway as this is something I worked on years ago. I just have vague recollections of trying to use it but never quite understand how exactly to use it so it actually sets proper defaults and never getting that to work properly.
Comment 5 Jan Poganski CLA 2022-06-10 02:14:44 EDT
Thanks, Kris, for sharing what you remember. And thanks for your investment in Quick Search in general. I like it.