Posts

Showing posts with the label content

Eclipse PDE: Everything about Editor Part 5

Image
Code Completion using Content Assist This post explains about completion proposal feature of eclipse editor framework. This is part of Everything About Editor series. Content assist provides content assist help to developer while writing code in editor. It helps from static suggestion of language keyword to methods suggestion for dynamic reference on hitting “Ctrl-Space” or entering  any of activator character like ‘.’. Following two interfaces plays key role in implementing code completion for customer editor. ICompletionProposal – Responsible for providing set of proposals text, associated icons etc. IContentAssistProcessor – Responsible for calculating the completion proposals at a point in the editor. It also defines character on which it shoud auto-activate. In this example we are going to see providing content assist then user enters ‘#’. To achieve this we need to implement IComppletionProposal that will return set of proposals as well as tells framework which c...