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

Do not return a Consumer<MouseEvent> if the code mining has no action. #1026

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

rubenporras
Copy link
Contributor

According to ICodeMining.getAction(), null should be returned if there is no action to be executed when the mining is clicked.

When several InlayHintLabelParts are used, we cannot be sure if there is an action or not without knowing the actual MouseEvent. However, if no InlayHint has an action, we can be sure there is none even without knowing the MouseEvent. For these cases, the code returns null now.

According to ICodeMining.getAction(), null should be returned if there
is no action to be executed when the mining is clicked.

When several InlayHintLabelParts are used, we cannot be sure if there is
an action or not without knowing the actual MouseEvent. However, if no
InlayHint has an action, we can be sure there is none even without
knowing the MouseEvent. For these cases, the code returns null now.
@rubenporras rubenporras changed the title Do not return a consumer<MouseEvent> if the code mining has no action. Do not return a Consumer<MouseEvent> if the code mining has no action. Jun 6, 2024
@rubenporras
Copy link
Contributor Author

@BoykoAlex : I will merge it now. Please, let me know later if you have time if you think there are improvements that should be done.

@rubenporras rubenporras merged commit 6ff3d03 into eclipse:main Jun 7, 2024
5 checks passed
@rubenporras rubenporras deleted the inlayHintAction branch June 7, 2024 14:43
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.

1 participant