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

 

> -----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


Back to the top