[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
Re: codeComplete does nothing!
|
"Kai-Uwe Maetzel" <kai-uwe_maetzel@xxxxxxx> wrote in message
news:ajvvpr$290$1@xxxxxxxxxxxxxxxx
> Having copied ResultCollector the value of fResult is set in the
declaration
> initializer.
> Kai
>
It is declared to be an array of ArrayList's, each of which is declared in
the same class and stands for a different type, eg fFields, fTypes.
These are modified in the accept<Foo> methods in the same class, which is
what I was asking: where and how are those methods being called because
they're not filling fResults and I need to change that.
From codeComplete() I tracked the call list to complete() in
CompletionEngine.java and at that point it gets a little hard to follow.
Theres no calls in complete() to the methods in CompletionEngine that dump
info into the requestor via the requestor's accept<Foo> methods. Perhaps you
can tell me why this code wont return me anything for fResults?
> "ben cowley" <ben.cowley@xxxxxxxxxx> wrote in message
> news:ajvvf2$21v$1@xxxxxxxxxxxxxxxx
> > Hi all,
> > I'm trying to get context information from the compilation unit in my
> > current editor, and I've done
> > c.codeComplete(myCompletionRequestor, offset)
> > and then tried to get info back from the CompletionRequestor that I
> > instantiated. myCompletionRequestor extends CompletionRequestorAdapter
and
> > basically uses the code from the jdt.ui completion requestor class,
> > ResultCollector.
> > So I was able to call
> > JavaCompletionProposal[] jprop = myCompletionRequestor.getResults()
> > but jprop comes back with a length of 0.
> > My problem is that Ive looked into getResults() and it is extracting
> > information from an array of ArrayList's called fResults. I then went to
> > look in codeComplete(), and its super declaration and the important
> methods
> > called therein, and I cant find where fResults might have been
> initialised.
> > So the fact that fResults is null for a valid CompilationUnit is what I
> need
> > to fix, but I need to know how to do that.
> >
> > Thanks a lot.
> >
> >
>
>