eclipse / lsp4e

Language Server Protocol support in Eclipse IDE
Eclipse Public License 2.0
65 stars 54 forks source link

Fix closing quick outline view #904

Closed travkin79 closed 9 months ago

travkin79 commented 9 months ago

There are a few cases, where updating the selection / cursor position in an open editor might fail. In those cases the solution from PR #901 might not work and the user could only close the quick outline view with the ESC key (the dialog has no x Button). Instead of first updating the editor's selection and then closing the quick outline view, I suggest to change the order, i.e. first close the quick outline view and then update the editor's selection.

rubenporras commented 9 months ago

can you rebase?

rubenporras commented 9 months ago

@mickaelistria , any opinion on this PR?

mickaelistria commented 9 months ago

I have not tried it but I'm afraid it would close the dialog to close is navigating it with the keyboard, ie hitting down until one finds the element they want, which is a common use case (at least to me). I think it's OK to close the dialog in case of a double-click, but for other operations (simple click, keyboard navigation), the dialog should remain open.

travkin79 commented 9 months ago

Hi @mickaelistria, I explicitly tested both cases, (a) navigating in the quick outline view to the desired element with the mouse (simple click on the desired element) and (b) using the keyboard's up and down buttons to select the element to navigate to. Both cases work with this version. You're welcome to try it yourself.

The dialog is only closed if the user selected a certain element and did hit enter or clicked on it (or hits the ESC key).

mickaelistria commented 9 months ago

OK, thanks for confirming.