Skip to content

Make service trackers instance scoped in terminal.view.ui#2041

Merged
laeubi merged 1 commit intoeclipse-platform:masterfrom
laeubi:make_tracker_instance
Jul 14, 2025
Merged

Make service trackers instance scoped in terminal.view.ui#2041
laeubi merged 1 commit intoeclipse-platform:masterfrom
laeubi:make_tracker_instance

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Jul 14, 2025

Currently service trackers are using a static field, what could lead to wrong behavior when the bundle is restarted.

This now converts the tracker to instance fields to account for bundle restarts and clears up an unnecessary static reference in TerminalService.

FYI @ruspl-afed

@github-actions
Copy link
Contributor

github-actions bot commented Jul 14, 2025

Test Results

 1 947 files  ±0   1 947 suites  ±0   1h 28m 15s ⏱️ + 1m 49s
 4 718 tests ±0   4 693 ✅  - 1   24 💤 ±0  1 ❌ +1 
14 154 runs  ±0  13 986 ✅  - 1  167 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 2245429. ± Comparison against base commit b47f9cd.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@ruspl-afed ruspl-afed left a comment

Choose a reason for hiding this comment

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

Shouldn't we close service trackers in stop method? I know that today this is not the use case, but just to show the right example.

@laeubi
Copy link
Contributor Author

laeubi commented Jul 14, 2025

Shouldn't we close service trackers in stop method? I know that today this is not the use case, but just to show the right example.

After the stop method exit all trackers will be closed implicitly, but it would of course not harm.

@laeubi laeubi force-pushed the make_tracker_instance branch from 1a044ec to e767062 Compare July 14, 2025 07:17
Currently service trackers are using a static field, what could lead to
wrong behavior when the bundle is restarted.

This now converts the tracker to instance fields to account for bundle
restarts and clears up an unnecessary static reference in
TerminalService. Beside that, access to relevant service relevant in the
context are added to the required AbstractImpl classes so there is no
need for individual plugins to track these services.
@laeubi laeubi force-pushed the make_tracker_instance branch from e767062 to 2245429 Compare July 14, 2025 07:18
Copy link
Contributor

@ruspl-afed ruspl-afed left a comment

Choose a reason for hiding this comment

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

Thank you for considering my comments @laeubi

@laeubi laeubi merged commit d4985f2 into eclipse-platform:master Jul 14, 2025
16 of 18 checks passed
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.

2 participants