eclipse-xtext / eclipse-xtext/xtext
The project specific preferences are ignored and overridden by the workspace one
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
Steps to reproduce:
- Have a boolean preference key with
falsedefault value. - Enabled this preference at workspace level by setting the value to
true. - Create a project, and the enable project specific preferences. Configure the preference value on the project to
false. - The project specific preference value will be
truealthough I would expectfalse.
In the FixedScopedPreferenceStore.setValue(String, boolean); we remove the project-level preferences because it equals to the default one. Then later, when we are trying to get the value for the project specific preference, we invoke FixedScopedPreferenceStore.internalGet(String) which delegates to the PreferencesService.get(String, String, Preferences[]). Although we have the chain of preferences (starting with the project scoped one), we get the workspace level value because we have removed the preference entry from the project-level preferences earlier.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FixedScopedPreferenceStore.setValue(String, boolean) and internalGet(String), then trace PreferencesService.get(String, String, Preferences[]) using the reproduction steps. Done means a project-level false value remains effective when false is the default and the workspace value is true; verify the behavior with the relevant preference tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100