You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: show the help button of the New Language Server dialog for a template with instructions - #2046
A template can have a README.md, its instructions, which the help
button of the New Language Server dialog opens in ShowInstructionDialog, as UserDefinedLanguageServer.md says. Since fd5aed9 (#278), the dialog's createActions() returns OK and Cancel
only, so the dialog had no help button, and the instructions couldn't be
opened. Before that, the button showed for every template, and did
nothing for one without a README.
The dialog has the help button again, and shows it only while its
template has instructions. getHelpAction() returns one action, which createActions() and DialogWrapper find again, and the dialog keeps
the button that DialogWrapper creates for it on its left. In an IDE
without context help, DialogWrapper removes help buttons, as for every
other dialog.
Not here: the choice of #1935 between the README of a template and its
docs page. Options B, C and D keep the README, at least for a custom
template, which has no docs page, and so this button; option A would
remove both.
Test: NewLanguageServerDialogInstructionsTest loads a template with a
README into the dialog, and one without, and checks that the help button
shows for the first only. It and NewLanguageServerDialogTransportTest
pass (17 tests).
…plate with instructions
Part of redhat-developer#1935.
A template can have a `README.md`, its instructions, which the help
button of the New Language Server dialog opens in
`ShowInstructionDialog`, as UserDefinedLanguageServer.md says. Since
fd5aed9 (redhat-developer#278), the dialog's `createActions()` returns OK and Cancel
only, so the dialog had no help button, and the instructions couldn't be
opened. Before that, the button showed for every template, and did
nothing for one without a README.
The dialog has the help button again, and shows it only while its
template has instructions. `getHelpAction()` returns one action, which
`createActions()` and `DialogWrapper` find again, and the dialog keeps
the button that `DialogWrapper` creates for it on its left. In an IDE
without context help, `DialogWrapper` removes help buttons, as for every
other dialog.
Not here: the choice of redhat-developer#1935 between the README of a template and its
docs page. Options B, C and D keep the README, at least for a custom
template, which has no docs page, and so this button; option A would
remove both.
Test: `NewLanguageServerDialogInstructionsTest` loads a template with a
README into the dialog, and one without, and checks that the help button
shows for the first only. It and `NewLanguageServerDialogTransportTest`
pass (17 tests).
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
The language server setup dialog now shows a help button when the selected template has instructions. Selecting it opens those instructions.
The help button stays hidden when no template is loaded or when the selected template has no instructions.
Bug Fixes
The button’s visibility now updates as templates are loaded, so it reflects whether instructions are available.
The dialog adds a help button that opens the current template’s instructions when its description is nonblank. The button is hidden when no instructions are available. A test checks its visibility before and after template selection.
Changes: Template Instructions Help Button
Layer / File(s)
Summary
Help action and visibility src/main/java/com/redhat/devtools/lsp4ij/launching/ui/NewLanguageServerDialog.java, src/test/java/com/redhat/devtools/lsp4ij/launching/ui/NewLanguageServerDialogInstructionsTest.java
The dialog adds a help action and updates its button visibility during initialization and after loading a template. The test checks visibility with no template, with instructions, and without instructions.
This restores the New Language Server dialog's help button for templates that have README instructions. The button stays hidden for templates without them. No actionable merge risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the New Language Server dialog's help button is shown again for a template that has instructions. The raw summary confirms the help action now appears only when the te…
Description check
The description explains the regression (fd5aed9 removed the help button), the fix (help action restored and shown only for templates with README instructions), the scope limit (#1935 decision not ad…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the New Language Server dialog's help button is shown again for a template that has instructions. The raw summary confirms the help action now appears only when the template description is nonblank, and the new test covers this behavior.
Full details: Description check
Explanation
The description explains the regression (fd5aed9 removed the help button), the fix (help action restored and shown only for templates with README instructions), the scope limit (#1935 decision not addressed), and the test coverage. It matches the changeset.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 3967e846-b07c-4b9f-8fb5-b859e4add065
Commits
Reviewing files that changed from the base of the PR and between 0af1afc and 790a468.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
❌ Patch coverage is 57.89474% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.43%. Comparing base (0af1afc) to head (790a468).
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1935.
A template can have a
README.md, its instructions, which the helpbutton of the New Language Server dialog opens in
ShowInstructionDialog, as UserDefinedLanguageServer.md says. Sincefd5aed9 (#278), the dialog's
createActions()returns OK and Cancelonly, so the dialog had no help button, and the instructions couldn't be
opened. Before that, the button showed for every template, and did
nothing for one without a README.
The dialog has the help button again, and shows it only while its
template has instructions.
getHelpAction()returns one action, whichcreateActions()andDialogWrapperfind again, and the dialog keepsthe button that
DialogWrappercreates for it on its left. In an IDEwithout context help,
DialogWrapperremoves help buttons, as for everyother dialog.
Not here: the choice of #1935 between the README of a template and its
docs page. Options B, C and D keep the README, at least for a custom
template, which has no docs page, and so this button; option A would
remove both.
Test:
NewLanguageServerDialogInstructionsTestloads a template with aREADME into the dialog, and one without, and checks that the help button
shows for the first only. It and
NewLanguageServerDialogTransportTestpass (17 tests).