DLTK (and Eclipse) threads [message #32917] |
Mon, 06 October 2008 20:26  |
Eclipse User |
|
|
|
Can you describe the DLTK threads that are created and what each one does?
Some of these are obviously created and managed by Eclipse.
1) main
a) ScriptEditor.doSetInput ultimately calls the parser
b) ICompletionEngine.complete (in my case this calls the parser)
2) DLTK indexing (calls the parser)
3) org.eclipse.dltk.ui.text.ScriptReconciler (calls the parser)
4) Text Viewer Hover Presenter
I am trying to manage synchronization - so I'd like to understand:
a) what may call my parser wrapper class which implements ISourceParser
and also calls an ASTVisitor which builds my custom model
b) what calls my class which implements ISourceElementParser
which does semantic checking (but only if there is a problem reporter)
but also calls (a) above and builds the DLTK model (via
SourceElementRequestVisitor).
Thanks,
Chuck
|
|
|
Re: DLTK (and Eclipse) threads [message #33022 is a reply to message #32917] |
Tue, 07 October 2008 02:25  |
Eclipse User |
|
|
|
Hi Chuck,
As you correctly mention - there are 4 types of threads:
- main UI thread
- ScriptReconciler thread is created for each opened editor to parse the
not saved content and update model. The results are annotations for
reported errors and updated outline, etc.
- Indexing thread is parsing all changed files and build indexes.
Indexes are used to speed search of types/methods.
- additional threads to perform single long running operations in editor
(hovers, documentation view, etc...)
Also if auto build is turned on - eclipse calls builders via jobs API.
I am not sure what exactly your custom model contains, but I think you
should update it only from single place - the main candidates are
indexing or builder. Or you can build it on demand and cache instances
in the org.eclipse.dltk.core.ISourceModuleInfoCache (at the moment is
used to cache ASTs).
Additional semantic check operations should be contributed as
IBuildParticipants - see separate message.
Regards,
Alex
Chuck Doucette wrote:
> Can you describe the DLTK threads that are created and what each one does?
>
> Some of these are obviously created and managed by Eclipse.
>
> 1) main
> a) ScriptEditor.doSetInput ultimately calls the parser
> b) ICompletionEngine.complete (in my case this calls the parser)
> 2) DLTK indexing (calls the parser)
> 3) org.eclipse.dltk.ui.text.ScriptReconciler (calls the parser)
> 4) Text Viewer Hover Presenter
>
> I am trying to manage synchronization - so I'd like to understand:
> a) what may call my parser wrapper class which implements ISourceParser
> and also calls an ASTVisitor which builds my custom model
> b) what calls my class which implements ISourceElementParser
> which does semantic checking (but only if there is a problem reporter)
> but also calls (a) above and builds the DLTK model (via
> SourceElementRequestVisitor).
>
> Thanks,
> Chuck
|
|
|
Powered by
FUDForum. Page generated in 0.05449 seconds