eclipse-xtext / eclipse-xtext/xtext

The project specific preferences are ignored and overridden by the workspace one

Open
#2,399 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug confirmed help_wanted
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 false default 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 true although I would expect false.

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.