Bug #2742

RCP: 0.8.0, TXMEditor parameter toolbar is broken when CQP corpus is not ready

Added by Matthieu Decorde about 1 month ago. Updated 26 days ago.

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

related to Bug #2682: Editor results computing executed with not computed paren... Feedback 11/29/2019
related to Bug #2745: RCP: 0.8.0, Dialog boxes of Sub-corpus and Partition crea... Feedback 01/24/2020

Associated revisions

Revision 2558
Added by Sebastien Jacquot 29 days ago

Fixes: Deleting a result node doesn't close its result children editors (refs #2679)
Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Revision 2559
Added by Sebastien Jacquot 29 days ago

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Revision 2565
Added by Sebastien Jacquot 28 days ago

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Revision 2566
Added by Sebastien Jacquot 27 days ago

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

Revision 2579
Added by Sebastien Jacquot 26 days ago

Progresses on: TXMEditor parameter toolbar is broken when CQP corpus is not ready (refs #2742)
Progresses on: Commands executed on not loaded Partition may lead to wrong results (refs #2682)

History

#1 Updated by Matthieu Decorde about 1 month ago

  • Description updated (diff)

#2 Updated by Matthieu Decorde 28 days ago

  • Description updated (diff)

#3 Updated by Sebastien Jacquot 28 days 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 27 days ago

  • Description updated (diff)

Need new issue and wiki specs for solution 2.

#5 Updated by Sebastien Jacquot 27 days ago

  • Description updated (diff)

#6 Updated by Sebastien Jacquot 26 days 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().

Also available in: Atom PDF