Bug 561749 - Provide metadata-based Equinox Preferences API
Summary: Provide metadata-based Equinox Preferences API
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.16 M3   Edit
Assignee: Alexander Fedorov CLA
QA Contact:
URL:
Whiteboard: 4.16 M2
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2020-04-03 13:10 EDT by Alexander Fedorov CLA
Modified: 2020-05-25 09:38 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Fedorov CLA 2020-04-03 13:10:09 EDT
Current Preferences API has a number of drawbacks:
* it forces to leak constants for a particular preference keys
* it requires caller to know also default value
* it does not help to represent the preference in the UI

It may be resolved via adding metadata {id, defaultValue, name, description} to descride a preference and then more OOP-style API that doesn't require to know particular identifiers.

This approach already tested in CDT 9.11 for Doxygen Preferences
https://github.com/eclipse-cdt/cdt/tree/master/core/org.eclipse.cdt.core/options/org/eclipse/cdt

It would be nice to have it supported on equinox level.
Comment 1 Eclipse Genie CLA 2020-04-03 13:11:55 EDT
New Gerrit change created: https://git.eclipse.org/r/160448
Comment 2 Alexander Fedorov CLA 2020-04-06 06:08:48 EDT
This one needs Equinox committer to review it
Comment 3 Lars Vogel CLA 2020-04-06 06:22:17 EDT
Jonah or Alex, can you review as this seems already be used in CDT?
Comment 4 Alexander Kurtakov CLA 2020-04-06 06:25:35 EDT
I won't be able to look at anything until we get infrastructure and builds stable.
Comment 5 Jonah Graham CLA 2020-04-06 07:48:43 EDT
Alexander used CDT as a place to experiment with the new API. It is an interesting improvement on the API for preference handling, but I leave it to platform team to decide if it is correct and ready to be final API.
Comment 6 Dani Megert CLA 2020-04-07 04:12:04 EDT
Tom, please have a look from M3.
Comment 8 Eclipse Genie CLA 2020-04-17 09:06:47 EDT
New Gerrit change created: https://git.eclipse.org/r/161142
Comment 9 Alexander Fedorov CLA 2020-04-17 09:27:21 EDT
@Jonah we can receive this for CDT improvements after Equinox 4.16 M2.
Comment 11 Lars Vogel CLA 2020-05-25 09:38:54 EDT
Would be nice to add this to the N&N for 4.16 via https://www.eclipse.org/eclipse/news/4.16/platform_isv.php