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

Handle the case when application has no focus in ApplicationPartService #1890

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented May 20, 2024

Currently when the application has no focus there is also no active window child and in this case several actions still fail even though a part is available for perform actions.

This now handles the case of an application without focus with an empty optional to allow fall back to the part context. If that context has still no suitable part service implementation as a last resort the containing window context is used.

Copy link
Contributor

github-actions bot commented May 20, 2024

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 97cdf28.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

@laeubi thank you for contributing this. I only have a minor concern regarding the changes in the test class.

NOTE: I only skimmed through the the other changes but I haven't tested them. I could test them do it if you briefly describe how to do it.

@laeubi laeubi requested a review from fedejeanne May 21, 2024 10:14
@fedejeanne fedejeanne dismissed their stale review May 21, 2024 10:30

Unrelated changes were moved to another PR

Copy link
Contributor

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

Looks better. I'm still missing a brief "How to test" in this PR and a description of the original bug/behavior that caused this PR.

@laeubi
Copy link
Contributor Author

laeubi commented May 21, 2024

Sadly the case is quite tricky to test, you need a custom RCP application, you need an external trigger (e.g. Network communication) ...

Currently when the application has no focus there is also no active
window child and in this case several actions still fail even though a
part is available for perform actions.

This now handles the case of an application without focus with an empty
optional to allow fall back to the part context. If that context has
still no suitable part service implementation as a last resort the
containing window context is used.
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

3 participants