Skip to content

[Spring Boot Tools] Flag to configure the "JAVA_HOME or PATH..." message display #478

Closed

Description

@offer8

I understand that the extension requires JDK in order for the live hover mechanism to work.
Assuming it is not a must can the following message:

image

be configured by a flag to prevent displaying it on extensions activation.

Activity

  1. added this to the 4.7.0.RELEASE milestone on Jun 11, 2020
  2. martinlippert commented on Jun 11, 2020

    @martinlippert
    Member

    @BoykoAlex Can you take a look at this (for the VSCode extension)?

  3. self-assigned this
    on Jun 11, 2020
  4. BoykoAlex commented on Jun 11, 2020

    @BoykoAlex
    Contributor

    I'll add a preference setting "spring-boot.ls.checkJVM". It can be set either by modifying settings.json directly "spring-boot.ls.checkJVM": false or via VSCode.workspace.getConfiguration("spring-boot.ls")
    How does this sound @offer8 ?
    @kdvolder are you ok with it as well?

  5. kdvolder commented on Jun 11, 2020

    @kdvolder
    Member

    @kdvolder are you ok with it as well?

    Yes. But...

    Unless it is hard/impossible to implement, I would prefer the error popup itself has a 'Do not show again' checkbox or something built in. If this popup is something that our language server launch code creates (rather than coming from vscode itself), then it shouldn't be too hard to implement that I think.

    This would be better than having the user need to realize all by themselves that they can disable the annoying popup by adding a setting somewhere manually.

  6. offer8 commented on Jun 11, 2020

    @offer8
    Author

    @BoykoAlex sounds good.
    @kdvolder we would like to prevent those kind of pop-ups if possible in advance.

  7. kdvolder commented on Jun 11, 2020

    @kdvolder
    Member

    @kdvolder we would like to prevent those kind of pop-ups if possible in advance.

    Presumably there will still be a 'setting' to record that the popup is disabled. So you could set it 'in advance' if you really wanted to. I was just thinking that most users probably won't care to disable a popup unless they saw it at least once. And at that point if they were annoyed by the popup they might not even realize there exists an obscure setting that can disable it.

  8. kdvolder commented on Jun 11, 2020

    @kdvolder
    Member

    That being said... I'm okay to go with the simpler solution of just having a setting with no extra widgetry in the popup. Avoid the extra work/complications of implementing this 'checkbox' in he UI if @offer8 who's requesting this feature doesn't really care about it anyway.

  9. BoykoAlex commented on Jun 11, 2020

    @BoykoAlex
    Contributor

    Fixed with 08b1b4d

    @kdvolder I like the idea of having "Do not show again" button on that warning message. Don't think it complicated anything - a bit of investigation into VSCode API only :-)

    The setting is spring-boot.ls.checkJVM defaulted to true - can be changed programatically to false - I suspect that is your use case @offer8. The button Do not show again on the warning message is added and is simply another way to let the user tweak the setting.

  10. kdvolder commented on Jun 11, 2020

    @kdvolder
    Member

    Just one little nitpick. While I'm sure its technically almost the same whether a setting is 'true' or 'false' by default. However, my experience is that it tends to be a bit of a source of potential bugs when the default value is 'true' and you have to explicitly set it to 'false' to disable. The reason for this is some code may accidentally treat absence of a setting as being false instead of true.

    So, I've sort of come to the opinion/conclusion, that if possible, it is best to make newly added preferences so that their default value is actually false.

    So maybe we can switch this setting to be something like spring-boot.ls.checkJVMdisabled which is 'false' by default.

    I don't feel too strongly about this, you can probably come up with good arguments to do the opposite (like some folks might thing it illogical to set something to 'true' to disable something :-)

    Anyhow @BoykoAlex, think about it and decide whether you agree.

  11. BoykoAlex commented on Jun 11, 2020

    @BoykoAlex
    Contributor

    @kdvolder I'd keep it as is... other settings follow the same convention - off == false, on == true.

  12. offer8 commented on Jun 11, 2020

    @offer8
    Author

    Thanks for quick fix!
    The vscode release version for this one will be V_1.19.0?

  13. kdvolder commented on Jun 11, 2020

    @kdvolder
    Member

    The vscode release version for this one will be V_1.19.0?

    Right, and if you want to try it early, you can download a snapshot .vsix file from the bottom of this page:
    https://dist.springsource.com/snapshot/STS4/nightly-distributions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions