Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overriding preferences #5149

Merged
merged 1 commit into from
May 21, 2019
Merged

Fix overriding preferences #5149

merged 1 commit into from
May 21, 2019

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented May 15, 2019

Signed-off-by: Anatoliy Bazko abazko@redhat.com

What does this PR do

It turns out that when we have overridden preferences in a configuration file

{
...
"xml" : {"editor.autoClosingBrackets": "never"}
}

AbstractResourcePreferenceProvider transforms it into "[xml].editor.autoClosingBrackets" : "never" and it leads to that some extensions can't read these values.
Debugging VS Code proved that it doesn't do this kind of transformation.

Reference issue

eclipse-che/che#12536

@tolusha tolusha self-assigned this May 15, 2019
const overriddeValue = preferenceValue[overriddenPreferenceName];
preferences[`${preferenceName}.${overriddenPreferenceName}`] = overriddeValue;
const overriddenValue = preferenceValue[overriddenPreferenceName];
if (!preferences[`${preferenceName}`]) {
Copy link
Member

Choose a reason for hiding this comment

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

string interpolation is redundant then

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

it breaks them, change editor.fontSize for typescript changes and observe that changes not auto applied to opened ts files. It works on master.

@tolusha
Copy link
Contributor Author

tolusha commented May 16, 2019

@akosyakov
Instead of modifying @theia/core (it implies a lot of changes) I've decided to reconstruct preference tree on ext side. In this way we won't break anything in Theia and provide correct way to interact with extensions.

@svenefftinge svenefftinge dismissed akosyakov’s stale review May 21, 2019 08:13

anton being offline

Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
@tolusha tolusha merged commit 8ba9c69 into master May 21, 2019
@tolusha tolusha deleted the ab/fixPrevOverride branch May 21, 2019 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants