[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: codeComplete does nothing!

Yes I believe you're right-in my runtime workbench no code completions are
occuring at all, no matter how generated. Im running a runtime with a full
list of external plugins (and my own plugin code), so why it should refuse
to do code completions is unclear. Ive also tried running the plugin
integrated into my standard workbench-which does code completion fine- but
in this case the problem is Im relying on System.out's to determine the
result of the run and these aren't visibly printed on a normal (non-runtime)
workbench. Perhaps they're being written to a logging file of some kind??

"Andrew McCullough" <mccull1@xxxxxxxxxx> wrote in message
news:ak0hqg$e0g$1@xxxxxxxxxxxxxxxx
>
> Are you sure that there are valid code completions from the point in the
> file that matched offset?  The completion engine will only return possible
> completions visible in the context of "offset".  So, for example,
> xyz<offset> will only return completions begining with "xyz".  Another
> example is new <offset> does not provide any completions.  You should find
> the offset in the file and use normal code complete to see what "normally"
> shows up.
>
> -Andrew
>
> "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.
> >
> >
>
>