-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix job watching in "reimport projects" #8302
Comments
taking this issue |
After looking at the code and changes in eclipse.jdt.ls for some time i don't see much help of these changes at the moment. Let me explain. So what we can do with the job now is to join it right away, smth like: for (IProject project : projects) {
projectsManager.updateProject(project).join();
} but then we'd loose the profit of parallel execution. |
@bdshadow another way is to combine adding listeners to the returned jobs and then checking of each job result. So, in case if adding listener operation happen after a job finish it will be removed from the queue by result checking: for (IJob job : submittedJobs) {
job.addJobChangeListener(...);
}
for (IJob job : submittedJobs) {
if (job.getResult() != null) { // job is finished
// remove the job from the queue
}
} But to me sounds better to do the fix together with progress introducing. It might add new aspects here. |
@mmorhun i think there is a problem in this snippet, when a job is finished between these Also i agree that it's better to wait for progress introducing fix and do the changes simultaneously. |
@bdshadow See no problem in it. Both |
@mmorhun agree, but this |
There is code very similar to what we want in LanguageServerRegisteryImpl:
The job listener we add to every job would simply call "initilizedServers.notifyAll()", which goes on to check all jobs again. (change var names, of course) |
eclipse-jdtls/eclipse.jdt.ls#506 is fixed now, let's remove the workaround in "ReimportMavenProjectsHandler#JobChangeListener".
The text was updated successfully, but these errors were encountered: