Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-text-dev] Closing CDT editors delayed by reconciler synchronization

Yes, you have to make sure that uninstall() is called first. To do this you
could overwrite setDocument(IDocument) in your text viewer. I filed bug
137201 about the fact that widgetDisposed(...) does more than just calling
handleDispose().

Dani


                                                                           
             Thomas Fletcher                                               
             <ThomasF@xxxxxxx>                                             
             Sent by:                                                   To 
             platform-text-dev         Eclipse Platform Text component     
             -bounces@eclipse.         developers list                     
             org                       <platform-text-dev@xxxxxxxxxxx>     
                                                                        cc 
                                                                           
             18.04.2006 13:52                                      Subject 
                                       RE: [platform-text-dev] Closing CDT 
                                       editors delayed by reconciler       
             Please respond to         synchronization                     
             Eclipse Platform                                              
              Text component                                               
              developers list                                              
             <platform-text-de                                             
              v@xxxxxxxxxxx>                                               
                                                                           
                                                                           






> -----Original Message-----
> From: platform-text-dev-bounces@xxxxxxxxxxx
> [mailto:platform-text-dev-bounces@xxxxxxxxxxx] On Behalf Of
> Daniel Megert
> Sent: Tuesday, April 18, 2006 5:42 AM
> To: Eclipse Platform Text component developers list
> Subject: Re: [platform-text-dev] Closing CDT editors delayed
> by reconciler synchronization
>
> Hi Thomas,
>
> looking at that code I'd say it's a bug: it should first
> check whether there's anything in the dirty queue and only if
> it isn't empty make sure that the document is correctly
> reconciled with the model. Please file a bug report against
> Platform Text.
>
> An easier workaround than switching to non-incremental
> reconciling might be to implement uninstall() in your
> reconciler like this (but you must be sure that the document
> and the model are either correctly reconciled, or it's not
> important since the editor gets closed):
>   setIsIncrementalReconciler(false);
>   super.uninstall();
>   setIsIncrementalReconciler(true);

Daniel,

  Thanks for the tip, but this won't help with the editor close
performance since the reconciler gets uninstalled as part of the
text widget dispose listener (from TextViewer):

fTextWidget.addDisposeListener(
             new DisposeListener() {
                         public void widgetDisposed(DisposeEvent e) {
                                     setDocument(null);
                                     handleDispose();
                                     fTextWidget= null;
                         }
             }
);

So we do the unconfigure/uninstall in the handleDispose() method
of the SourceViewer.  Unfortunately, where the synchronization is
happening is in the setDocument(null) call as the reconciler is a
document change listener.

Am I missing something here?  Should the reconciler be uninstalled
before we do the main widget dispose?

Thanks,
 Thomas
_______________________________________________
platform-text-dev mailing list
platform-text-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-text-dev




Back to the top