Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to implement a feature of the content assistant of the java editor
How to implement a feature of the content assistant of the java editor [message #258505] Thu, 05 February 2009 10:16 Go to next message
Eclipse UserFriend
Originally posted by: alamothe.ptt.yu

Hi!
I'm using JavaSourceViewer and I have my own SourceViewerConfiguration and
ContentAssistProcessor. I need to implement a feature found in the java
editor. When a user accepts type completion proposal, instead of adding a
qualified type name to code, I'd like to add a simple name and the
corresponding import. How to do this? Where should I look?

p.s. I'm using ICompilationUnit.codeComplete to compute my proposals
Re: How to implement a feature of the content assistant of the java editor [message #258543 is a reply to message #258505] Fri, 06 February 2009 18:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alamothe.ptt.yu

In other words, I probably need to know when a user accepts a proposal and
then apply it myself. Any ideas??

Nikola Mihajlovic wrote:
> Hi!
> I'm using JavaSourceViewer and I have my own
> SourceViewerConfiguration and ContentAssistProcessor. I need to
> implement a feature found in the java editor. When a user accepts
> type completion proposal, instead of adding a qualified type name to
> code, I'd like to add a simple name and the corresponding import. How
> to do this? Where should I look?
> p.s. I'm using ICompilationUnit.codeComplete to compute my proposals
Re: How to implement a feature of the content assistant of the java editor [message #258608 is a reply to message #258543] Tue, 10 February 2009 18:57 Go to previous message
Eclipse UserFriend
Originally posted by: alamothe.ptt.yu

To all those who may be concerned: you need to provide an invocation context
to a CompletionProposalCollector which consists of ICompilationUnit and you
will get the completion proposal imports working properly.

Nikola Mihajlovic wrote:
> In other words, I probably need to know when a user accepts a
> proposal and then apply it myself. Any ideas??
>
> Nikola Mihajlovic wrote:
>> Hi!
>> I'm using JavaSourceViewer and I have my own
>> SourceViewerConfiguration and ContentAssistProcessor. I need to
>> implement a feature found in the java editor. When a user accepts
>> type completion proposal, instead of adding a qualified type name to
>> code, I'd like to add a simple name and the corresponding import. How
>> to do this? Where should I look?
>> p.s. I'm using ICompilationUnit.codeComplete to compute my proposals
Previous Topic:Compiler warnings & "unnecessary suppress warnings"
Next Topic:cannot navigate plugin dependency sources
Goto Forum:
  


Current Time: Sun Apr 20 08:50:12 EDT 2025

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

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

Back to the top