Make service trackers instance scoped in terminal.view.ui#2041
Make service trackers instance scoped in terminal.view.ui#2041laeubi merged 1 commit intoeclipse-platform:masterfrom
Conversation
Test Results 1 947 files ±0 1 947 suites ±0 1h 28m 15s ⏱️ + 1m 49s 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. |
ruspl-afed
left a comment
There was a problem hiding this comment.
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.
...bundles/org.eclipse.terminal.view.ui/src/org/eclipse/terminal/view/ui/internal/UIPlugin.java
Outdated
Show resolved
Hide resolved
After the stop method exit all trackers will be closed implicitly, but it would of course not harm. |
1a044ec to
e767062
Compare
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.
e767062 to
2245429
Compare
ruspl-afed
left a comment
There was a problem hiding this comment.
Thank you for considering my comments @laeubi
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