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

Ignore unrelated property files #320

Closed
neekibo opened this issue Jul 11, 2019 · 5 comments
Closed

Ignore unrelated property files #320

neekibo opened this issue Jul 11, 2019 · 5 comments
Milestone

Comments

@neekibo
Copy link

neekibo commented Jul 11, 2019

The STS language-server is validating my message.properties (translation files) and it gives me useless/countless "unknown property" warnings. I also get errors like mentioned in #314

Was working correct with Spring Tool Suite 4 Version: 4.2.2
Wrong behavior occours since upgrade to Spring Tool Suite 4 Version: 4.3.0.RELEASE, Build Id: 201906200901

Is this intentional?
How does the language server knows which properties-file is a spring-configuration?
Can I configure this behavior and ignore my message.properties?

Thanks

@neekibo neekibo changed the title Ignore message.properties Ignore unrelated property files Jul 11, 2019
@kdvolder
Copy link
Member

I'll have to debug this to determine why this happens. I think it used to be a problem in the past and was caused by how lsp4e determines which files to validate, which is related to content-types assigned by Eclipse. Don't recall details, but I beleave it got fixed. Seems like it broke again :-(

@kdvolder
Copy link
Member

And to be clear:

Is this intentional?

No, of course not. So thanks for reporting the poblem :-)

@kdvolder
Copy link
Member

kdvolder commented Jul 11, 2019

Can I configure this behavior and ignore my message.properties?

You can try making some changes to Eclipse workspace 'content-type' configuration. Which you can access at "Preferences >> General >> Content Types". I have my doubds that you will be able to 'fix' this though by meddling with them. I suspect the content type is determined correctly, but some 'bug' in either our language server or the Eclipse lps4e infrastructure is handling this incorrectly and validating the file even though it is not classified as a 'Spring Properties File'.

@kdvolder
Copy link
Member

kdvolder commented Jul 15, 2019

Was able to easily reproduce the issue. I used STS 4.3.1.

Steps:

  • created a boot project (don't think the starters matter but I used 'web' and 'actuator')
  • opened application.properties and edited a bit.
  • created a new file called 'whatever.properties'.
  • added some text like this bork=bark.

=> A warning appears that 'bork' is an unknown property. Which seems to be coming from our spring boot language server.

kdvolder added a commit that referenced this issue Jul 15, 2019
kdvolder added a commit that referenced this issue Jul 16, 2019
kdvolder added a commit that referenced this issue Jul 16, 2019
@kdvolder
Copy link
Member

kdvolder commented Jul 16, 2019

I think the underlying issue is really a bug in lsp4e, so I have reported it here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=549321

Fortunately we are able to work around/avoid hitting the bug by making sure we allways use base-type="org.eclipse.core.runtime.text" even when it might seem more logical to use a more specific base-type.

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

No branches or pull requests

4 participants