Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » DLTK (and Eclipse) threads
DLTK (and Eclipse) threads [message #32917] Tue, 07 October 2008 00:26 Go to next message
Charles Doucette is currently offline Charles DoucetteFriend
Messages: 125
Registered: July 2009
Senior Member
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 06:25 Go to previous message
Alex Panchenko is currently offline Alex PanchenkoFriend
Messages: 342
Registered: July 2009
Senior Member
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
Previous Topic:[BUILD] R1.0-I
Next Topic:compilation unit vs. working copy
Goto Forum:
  


Current Time: Thu Nov 27 22:19:01 GMT 2014

Powered by FUDForum. Page generated in 0.01712 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software