RCP: 0.7.7, link the TBX initialization to theSWT ProgressDialog at start up
Link the TBX initialization to the SWT ProgressDialog at start u
At this moment, the progression bar of the dialog “Loading corpora” does
not reflect the real tasks executed by the TBX (potentially problematic
when having a lot of corpus and partitions).
A temporary workaround would be to switch ProgressDialog to
“indeterminate” mode to show to the user that TXM is not hanging u
A better solution would be to implement Observer pattern with a thread
cyclically checking the TBX activity, e.g. numbers of corpus loaded,
number of partitions created, and updating the progress bar every x ms
or x seconds.
Solution 1
- add an initialization level variable in org.txm.toolbox/src/java/org/txm/Toolbox.java
- increment this level according to the steps of initialization, e.g.: 1 = loading properties, 2 = starting corpus engine, 2 = starting statistic engine, etc.
- use this TBX level variable to update the IProgressMonitor state in org.txm.rcpapplication.ApplicationWorkbenchAdvisor.initializeUI(JobHandler)
(from redmine: issue id 1297, created on 2015/04/02 by Sebastien Jacquot)