I am writing eclipse plugin to add better support for properties files. One of the missing piece is content-assist ... I'd like to show matching properties keys when user starts typing some string and presses content assist key.
For example, when I have property hello = world
in one of my properties files, and I start typing format("hel
and hit CTRL+SPACE now, I'd like to see available hello
property.
My problem is that I cannot find correct extension point to provide custom content assist processor. How can I provide my own content assist processor for text files? I'd like to make it work mainly in Java, JSP and XML files.
You can create a plug-in project, the option, "plug-in with an editor", there is a small XML language editor with syntax coloring (this class will help you to know the classes for the extension). The content assist is not used, but you can add it looking this FAQs
Syntax coloring http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Feditors_highlighting.htm
Content Assitant http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Feditors_contentassist.htm
The only thing that I am trying to find is the add Information like JavaDoc to the proposal for the defined assistant. In the FAQ say something but I really don't understand it.
Hope it helps.
Looks like IContentProposalProvider may be what I am looking for, but still no extension point.
Have a look at
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.wst.doc.isv/html/plugin_descriptions_WST/wst.html
for ideas for the wst xml editor and potentially other types of editors
If properties files can follow an EBNF grammar, then you could give Eclipse Xtext a shot
alt text http://www.eclipse.org/Xtext/images/screenshot-title.png
Otherwise, you can find some example of content assist in this thread, or this one (JSDT -- JavaScript)
I've looked for such an extension point before with no success. As far as I know it's not possible to add new types of content assist to editors in Eclipse in this way.
You can do it by declaring an extension to:
Here is the reference page to start with.
You can find a demo project here