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

Changes to Formatter profiles don‘t take effect in real time #1736

Closed
CsCherrYY opened this issue Apr 22, 2021 · 0 comments · Fixed by #1738
Closed

Changes to Formatter profiles don‘t take effect in real time #1736

CsCherrYY opened this issue Apr 22, 2021 · 0 comments · Fixed by #1738
Assignees

Comments

@CsCherrYY
Copy link
Contributor

CsCherrYY commented Apr 22, 2021

Steps to reproduce:

  1. Open a new Java project, use Java: Open Java Formatter Settings and choose the default profile
  2. Change the setting org.eclipse.jdt.core.formatter.blank_lines_before_imports in the xml to 5
  3. Command palette: Format Document, you'll find that there is still one line before imports
  4. Reload window
  5. Command palette: Format Document again, you'll find that there is five lines before imports now

It seems that the issue occurs here: https://github.com/eclipse/eclipse.jdt.ls/blob/6bc7aef77e9497cef27bc4e3b9b50ccdb8ea6170/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/StandardProjectsManager.java#L192-L200

In windows system, the condition check in line 196 will be always false since the drive letters between the two URIs are not the same. One of them is in uppercase while the other is in lowercase. This dismisses the rest configure process.

See debug screenshot:
Screenshot

@testforstephen testforstephen changed the title Changes on Formatter profiles have no effect before reloading Changes to Formatter profiles don‘t take effect in real time Apr 23, 2021
@testforstephen testforstephen added this to the End April 2021 milestone Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants