Access services via IWorkbench#2038
Access services via IWorkbench#2038ruspl-afed wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
We may avoid additional service trackers that nobody closes and access services via IWorkbench for this UI bundle
There was a problem hiding this comment.
I would not tie this to PlatformUI as it would mean it can not be used in a plain RCP application without legacy mode.
As all services are automatically freed when a bundle shuts down one not necessarily needs to dispose a service tracker, but it would better be not a static field but an instance field to account for possible restarts of the bundle what Eclipse actually do not support well anyways, but this does not mean we must not try to do it better.
Very comforting to know that E4 is still an option. May be we can discuss the E4 plans separately. I'm closing this one because you have a better offer @laeubi |
|
@ruspl-afed I know platform is late (if not lazy ...) in migrating to E4, but I try to be E3/E4 agnostic where possible. Still there are references to PlatformUI in this bundle(s) but we should at laest try not to make it more worse. |
this is great to read, now I know where to appeal in the case of counter-E4 changes/comments
absolutely, I will be even more careful with PlatformUI/Platform usage |
|
Yes, it's sometime frustrating with the Eclipse Installer to find that things depend on the workbench when there isn't really strictly a need for the workbench itself, e.g, org.eclipse.ui.IWorkbench.getDisplay() seems so innocent. |
So now I know who else can support the changes for independence from E3 IWorkbench. |
I don't think it's a matter or being late or lazy; but it's more a matter of using E4 not being the priority of many. But that said, I think there is a general agreement that E4 APIs are usually much better and to be preferred when it comes to new code or refactorings. It's just a matter of getting people interested in adopting them in existing code when there is no sensible added-value for maintainers or users... |
|
The problem is if you do it like in E3 then there is of course no added value. If you once got to the point where you are actually using E4 you don't want get back (and gets really frustrated maybe when forced to use "E3 way". This is actually a very good example actually, so much efforts to avoid the static singleton access where in E4 I would simply have done: So maybe a bit like Junit3 > Junit 4/5, of course it has worked before and if you are used to it it seems completely bogus to convert, but on the long run it gives you more freedom and less boilerplate. Of course this sometimes need to enable new things, but we have made great progress here in the past years already so thing are even much nicer now. And about "major IDE" ... who really cares? If we would get a penny for each download maybe, but honestly I really sick of these "This is crap and because of that I use InteliJ" ... if it is that great we probably should simply stop wasting time with an own IDE. |
It's what some organizations have been steadily doing for about a decade. |
We may avoid additional service trackers that nobody closes and access services via IWorkbench for this UI bundle