thSoft / elysium

LilyPond IDE for Eclipse
http://elysium.thsoft.hu
14 stars 3 forks source link

wait for all compile output to be processed #183

Closed nittka closed 6 years ago

nittka commented 6 years ago

As the compiler output processing happens in a separate thread, it was possible, that the run method returned (and the "LilyPond terminated ..." message was written to the console) before all the output was written.

This change causes the run method to wait for all the compile output to be written before returning, so the termination message is always written last.

... When compiling an entire folder/project, currently for each compiled file a project refresh is invoked. I was playing around with waiting for all files to be compiled before refreshing all involved projects once. This works but it has one drawback. If one of the compiled files is open in the score view, the score is updated only after all compilations are finished. I guess, this is OK for the general use case (recompile during build and recompile viewed invoke compilation only for one file, so there is no difference; and for compiling many files the number of project refreshs is much reduced). Do you think this change makes sense?

nittka commented 6 years ago

The second commit adds a compiler preference causing folders/projects containing outdated sources to be marked as outdated as well.

nittka commented 6 years ago

OK. We can leave the refreshing in the compile job, but in this case, I would not refresh the entire project, but only the file's parent which is sufficient for refreshing the score view!?

(How about the outdated-marking of the folder structure, which is the main contribution of the second commit in general? I could not quite extract from your response whether it should removed completely.)

thSoft commented 6 years ago

We can leave the refreshing in the compile job, but in this case, I would not refresh the entire project, but only the file's parent which is sufficient for refreshing the score view!?

Okay, if it really works, then refreshing the file's parent is enough.

How about the outdated-marking of the folder structure, which is the main contribution of the second commit in general?

I think it should be kept along with the preference to disable it.

nittka commented 6 years ago

Refresh within a single compilation step was changed from entire project to file's container only. This ensures that score view is updated as soon as the file's compilation is finished.

thSoft commented 6 years ago

Great, thanks!