[nem-en] Screenshot from MonoDevelop

Alejandro Serrano trupill at yahoo.es
Thu Mar 2 20:25:53 CET 2006


Kamil Skalski escribió:
> Maybe locking the Engine would be feasible way to eliminate some bugs.
> But I'm curious how does it work exactly.. :)  Is it that there is
> some "worker thread", which is computing the TypeTree and completions
> and GUI asks it about results from time to time?
>
>   
As of now, all methods (GetTypeTree and RunCompletion) include locking 
to prevent this.
As far as I know, the way MonoDevelop is something like this:
- MD loads the binding in another thread / AppDomain, and uses Remoting 
(!!) to communicate to it. The problem there is that if some exception 
is thrown, Class View or Completion may get corrupted.
- When you type some character MD finds interesting enough to reparse, 
it calls the binding's Parse() method for each file. There's where 
GetTypeTree is called. However, in the binding it gets called with all 
the entire files.
* In that point, we should include some way to keep going even though 
syntax errors are found
- The type tree created with GetTypeTree is saved in memory by the Code 
Completion Engine
- When you add spaces, code... MD changes its own tree

So, the idea now is:
- When MD asks for completion, take some way to know in which method the 
cursor is
- Call the Code Completion Engine just with the method information, and 
its actual code. The Engine has saved the tree, so it should be fast 
enough. The results are shown to the user.


		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com




More information about the devel-en mailing list