Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] validation during workbench shutdown

Dali defines an extension of the WTP validation extension point
org.eclipse.wst.validation.validatorV2.

What is the appropriate thing for that validator to do when it is executed after
Dali plug-ins have been stopped and there is no way to perform the validation?

To be more specific: We encounter a race condition during workbench shutdown.
If the user shuts down the workbench with unsaved files, s/he will be prompted to
save the unsaved files. If the user clicks OK and the files are saved and the files are
relevant to Dali, the WTP validation job will be scheduled. In the meantime, the
workbench begins its shutdown process, eventually calling the stop(...) method on
the Dali bundle activator. Here is the race:

- If
the WTP validation job executes the Dali validator before is our bundle
is stopped, things are OK - the bundle will wait for the Dali validator to finish
its work before it stops.

- If the WTP validation job executes the Dali validator after is our bundle
is stopped, the Dali validator has no way perform its validation as all the necessary
state has been removed from the various stopped plug-ins.

What should the validator do in the second situation? Should the Dali plug-ins wait
for any outstanding WTP validation jobs to complete before stopping? Is there a
way to force the Dali validation to be re-executed during the following workbench
start-up? Etc....

Thanks.
Brian


Back to the top