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

Fix #900 Listen to ESC, enter, double-click, and single click #901

Merged
merged 7 commits into from Jan 30, 2024

Conversation

travkin79
Copy link
Contributor

Listen to ESC, enter, double-click, and single click.
Improve selection listener concept.
Ensure, elements can be selected with keyboard or mouse. Extract method for revealing the selected element in editor.

Improve selection listener concept.
Ensure, elements can be selected with keyboard or mouse.
Extract method for revealing the selected element in editor.
@travkin79
Copy link
Contributor Author

It seems, there is again a time-out problem. Unfortunately, I cannot trigger a new build.


viewer.setInput(outlineViewerInput);
return filteredTree;
close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have moved this now out of the if (range != null) {? Should it not be inside as before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my next comment

Moving the close operation to the end of the steps did not fix time-out
problems. This original order does make more sense to me.
Object selectedElement= getSelectedElement();

if (selectedElement != null) {
close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it not go after the catch on the block contaning textEditor.selectAndReveal(offset, endOffset - offset);?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. My rationale was, if I want the editor to jump to a certain position and I have a user-confirmed selection in the quick outline view, i.e. the user did hit enter or clicked on the selected element (that are the only cases when goToSelectedElement() is called), then I want the quick outline view to be closed, even then if I detect some problem like a missing range. Otherwise, the view keeps being open and the user has no opportunity to close it (except of hitting ESC key).

Do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sound sensible, but if you do not mind, I would prefer to have it in new PR, and keep this one to fix the movement in the list with the keyboard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean, I should keep the close() operation as last statement in the block if (range != null) {...} and create PR for moving it where it is now, after if (selectedElement != null) {?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be great

Copy link
Contributor Author

@travkin79 travkin79 Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I changed the close() call as you requested and created a PR #904 for moving the close operation as I suggested.

@rubenporras rubenporras merged commit f90b73f into eclipse:master Jan 30, 2024
2 checks passed
@rubenporras
Copy link
Contributor

thanks

@travkin79 travkin79 deleted the patch-issue-900 branch January 30, 2024 11:27
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

Successfully merging this pull request may close these issues.

None yet

2 participants