Bug #2742
RCP: 0.8.0, TXMEditor parameter toolbar is broken when CQP corpus is not ready
Status: | Feedback | Start date: | 01/24/2020 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assignee: | - | % Done: | 80% |
||
Category: | UI | Spent time: | - | ||
Target version: | TXM 0.8.1 |
Description
TXMEditor parameters toolbar is broken when a CQP corpus is not ready -> CQP exception are raised.
E.g. calling Cooccurrence on a not computed Sub-corpus throws a CQP exception when the Cooccurrence editor is opened and tries to load the available corpus properties.
Solution 1¶
When opening a TXMEditor always pre-compute the parent before. Add parent.compute(false) in- a) TXMEditor.openEditor()
- b) TXMEditor.this.createPartControl
a) can manage the parent.compute in a job
b) always works but might cause freezes at any moment. -> maybe we can use a busyWhile job to correctly freezes the interface
---> Use the b) solution and validate the freeze is ok
Solution 2¶
- protect all TXMResult getters methods with a this.compute(false)
Validation tests¶
WIP SJ:
- purpose here is to test on large corporas that contain not computed partitions or corpus that calling a command or reopening a result that are descendant to the not computed objects works as expected
Related issues
Associated revisions
History
#1 Updated by Matthieu Decorde over 3 years ago
- Description updated (diff)
#2 Updated by Matthieu Decorde over 3 years ago
- Description updated (diff)
#3 Updated by Sebastien Jacquot over 3 years ago
- Description updated (diff)
- Status changed from New to Feedback
- % Done changed from 0 to 80
Solution b) has been implemented. A new modal dialog box class (/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/AdvancedProgressMonitorDialog.java) has been developed.
This class runs the parents branch computing in TXMEditor.createPartControl(). The progress bar dialog opens (with a delay of 1 second) and blocks the UI until the process is done so the Editor is not shown before it's fully ready to be used.
#4 Updated by Sebastien Jacquot over 3 years ago
- Description updated (diff)
Need new issue and wiki specs for solution 2.
#5 Updated by Sebastien Jacquot over 3 years ago
- Description updated (diff)
#6 Updated by Sebastien Jacquot over 3 years ago
Since when TXMEditor.createPartControl() is called the editor is already opened, it leads to some Eclipse Workbench errors (shown in Error Log view) and forces us to close back the editor if the process is user canceled.
So the pre-computing of the parents branch has been moved to TXMEditor.openEditor().