Improve DeferredClasspathContainerInitializerJob.belongsTo#1888
Improve DeferredClasspathContainerInitializerJob.belongsTo#1888iloveeclipse merged 1 commit intoeclipse-pde:masterfrom
Conversation
merks
commented
Jul 23, 2025
- Add ClasspathContainerInitializer.class to the test for families in belongsTo to allow a client to wait for classpath container initialization without knowing or caring about PDE specifically.
- Add ClasspathContainerInitializer.class to the test for families in belongsTo to allow a client to wait for classpath container initialization without knowing or caring about PDE specifically.
laeubi
left a comment
There was a problem hiding this comment.
Seems like a clever addition here.
I think we should then add a note to ClasspathContainerInitializer javadoc to make integrators aware of this option.
|
@merks : sounds good, I only wonder if that should be a constant in Basically you are adding & using API in JDT to do similar things which @laeubi didn't wanted to do before in PDE. |
|
Thinking a bit more: this would also delay reconciler on non PDE code, which is not great. Let assume PDE loads half of internet via m2e target, and ome just wants edit plain Java project. |
|
Ed, I mean following scenario:
|
Sure.
Sure. That's what we see now with startup if a Java editor is opened, and I believe everyone has some editors opened. What I mean is: now we would deferring reconciler for every Java file opened, independently whether it is related to PDE or not. Ideally, I would expect it should only affect Java editors for PDE projects, the rest shouldn't be affected, but the envisioned patch would do that. Why I'm concerned: originally proposed patch from Mehmet would not have this problem... |
Yes, if an editor on a PDE project is opened and is visible then all editors will be block. Of course this is the scenario where the entire UI thread was blocked on startup for the entire period of time. It was that way for decades, and then very few people seemed to care about such a serious problem. So you'll probably understand why I'm confused by corner cases of mixed PDE and non-PDE scenarios that were completely a disaster in the past. I.e., why is it a concern now but never was a concern before. Anyway, I feel like I'm falling into the trap of dredging up history, and I'm tired of seeing that because it doesn't move forward. In any case, this whole discussion is about scenarios is concerning what JDT can do, should do, or might do. It's not about about this specific PDE PR which simply provides the ability to wait if desired; it could use a constant, I don't really care. Also, if you prefer to actually solve the problem in some other way in JDT, that's of course your choice as JDT committers to make and I'll not get int he way. What I would like is is to put this is place, even if it's useless. And I would like to create PR for JDT, which does solve the problem and which you can choose to ignore in favor of something better. Unfortunately the time I have available only allows these options for me. I've become completely confused by the competing different solutions, and class editor versus java editor, with or without PDE, all of which are rejected for various reason along with way too much emotional/personal baggage for my taste. Way too much. So, we either move forward with something really simple that does work, or folks can invest their own time on other solutions as they see fit. |
|
Ed, this is all clear, no doubts. I just wanted to make sure the problem is discussed and understood, and maybe something could be improved for that specific case. |
|
I do appreciate the attention detail. ❤️ In the end, you can't really be too fussy. But of course one person's admirable fussiness is the next person's obsessive-compulsive disorder. 🫤 I have been known to annoy other people unintentionally... Are you okay to merge this? We can always introduce a constant later if that's better; it's all internal details currently. Even the join in JDT could always be removed later, when a (provably) better solution is implemented. Again it's all internal detail subject to change anyway... Maybe for m2 we can try to provide a good-enough/okay solution and fine tune it as time permits because every time I start one of my IDEs and see red errors I want to cry. I think OMG how unprofessional does this look? And somehow I even take such shortcomings in the software personally. |
|
I fully agree with the analysis of @merks and I'm quite happy that @iloveeclipse agree that there is some (non trivial) blocking involved so we have a common ground to start from. So the blocking was the reason for the initial work in PDE because it can lead to blocking forever (or quite long) so the Eclipse UI itself never shows up! If one want to improve this I have created these issues since a while:
any of those will remove one situation where the UI access the classpath early and is a possible case to block others work (not only Editors!). Regarding downloading the internet, m2e and all the rest of the universe:
P2 is different as it always checks at least metadata for updates and if you nuke your local repo also maven has to first check the remotes.... |



