[nem-en] Completion

Kamil Skalski kamil.skalski at gmail.com
Mon Jun 5 10:02:13 CEST 2006


Probably the best heuristic when the method body is not properly
defined (lack of closing bracked, types in signature) is to close the
method body in some place (caret position?) and fix return type to
void, parameters type to.. object?

2006/6/5, Janez P <noraguta at gmail.com>:
> if it is last line in method probably returning type is not defined ,
> thats why compiler exits.
>
> On 6/5/06, Alejandro Serrano <trupill at yahoo.es> wrote:
> > vc escribió:
> > > Hi,
> > >
> > > 1. I try use completion for the following strings:
> > > try_completion ("Fo");
> > > try_completion ("");
> > > try_completion ("def _ = 0; ");
> > >
> > I'm trying to see what happens in those situations. Although the second
> > and third one may require changes to the compiler itself.
> > > 2. For implementing complete word in VS 2005 I need to have the list of
> > > accessible substitutions for an empty string (all possible in some context).
> > >
> > As stated above, this may need changes. Also, remember that Completion
> > Engine does not show keywords.
> > > 3. I do not understand how will work completion if user type code in the
> > > middle of function. For example, if in method body is no closing bracket.
> > >
> > You need to get a IMethod, from where you run RunCompletionEngine. You
> > can look at the Nemerle binding for MonoDevelop to check.
> > > 4. I need to receive the list of all accessible types in the project
> > > (declared and imported).
> > >
> > Instead of getting just the NamespaceTree nodes that are Cached
> > (TypeBuilder) and NamespaceReference, you will have to look at every
> > single node.
> > > 5. If the body of a method changed, all locations below it become incorrect.
> > > But the structure of a compilation units thus does not vary. Well to have an
> > > opportunity to update all locations if method body changed.
> > >
> > You can update the location in the IDE without affecting any
> > functionality in the Completion Engine. Indeed, that's how it works in
> > MonoDevelop: we get the method the user is working in, and pass it to
> > RunCompletionEngine.
> >
> >
> >
> >
> > ______________________________________________
> > LLama Gratis a cualquier PC del Mundo.
> > Llamadas a fijos y móviles desde 1 céntimo por minuto.
> > http://es.voice.yahoo.com
> >
> >
> > _______________________________________________
> > https://nemerle.org/mailman/listinfo/devel-en
> >
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


-- 
Kamil Skalski
http://nazgul.omega.pl


More information about the devel-en mailing list