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

Provide validation in the preferences of LSP console #210

Open
angelozerr opened this issue Apr 14, 2024 · 5 comments
Open

Provide validation in the preferences of LSP console #210

angelozerr opened this issue Apr 14, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers lsp-console

Comments

@angelozerr
Copy link
Contributor

angelozerr commented Apr 14, 2024

The preferences in LSP console provides no validation:

image

although the dialog provides it:

image

Please note that those 2 preferences panel use the same class.

It would be nice to support validation in LSP console preferences.

The validation should be too improved with:

  • validate that there is on mapping which is defined.
  • display a border red for JTextArea (ex: command,configuration), I don't know why it is working for JTextField but not with JTextArea. There is the same problem when you click on JTextArea, there is no blue border like other widgets (JComboBox, JTextField).

@MituuZ are you interested to work on this issue?

@angelozerr angelozerr assigned angelozerr and unassigned angelozerr Apr 14, 2024
@angelozerr angelozerr added enhancement New feature or request lsp-console labels Apr 14, 2024
@MituuZ
Copy link
Contributor

MituuZ commented Apr 14, 2024

Yeah, I can take a look at this too

@angelozerr
Copy link
Contributor Author

Thanks!

@angelozerr angelozerr added the good first issue Good for newcomers label Apr 14, 2024
@MituuZ
Copy link
Contributor

MituuZ commented Apr 15, 2024

I looked around a bit and am thinking about creating the validation function (and also possibly the error stylin) to the widgets. Just have to see how the DialogWrapper works with custom validation functionality.

Another option could be to extend the DialogWrapper in the tool window too, but I'm not sure how clean that would be.

@angelozerr
Copy link
Contributor Author

To be honnest with you I have never done that, so we need some experimentation.

@MituuZ
Copy link
Contributor

MituuZ commented Apr 15, 2024

Alright, I'll poke around a bit and see how the custom validation turns out. The basic implementation is quite simple, so I need to figure out how to enable/disable the creation/saving if the widget validation fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers lsp-console
Projects
None yet
Development

No branches or pull requests

2 participants