0

I am currently developing a RCP application in Eclipse. Right now it is very minimalistic and consists of only one part containing a Text object as such:

public class MainPart {
private Text txtInput;
@PostConstruct
public void  createComposite(Composite parent) {
    parent.setLayout(new GridLayout(1, false));
    txtInput = new Text(parent, SWT.BORDER);
    txtInput.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
}

I would like to add an auto-completion functionality to this minimalistic RCP, so that it works in the Text object. How do I approach this problem?

The auto-completion should, at least hopefully when it is finished, be able to auto-complete java code. So basically I want to copy the auto-completion that already exists in Eclipse, and put it in my minimalistic RCP. Just a poke in the right direction of where to begin when constructing an auto-completion functionality would also be much appriciated indeed.

Please note that I am new to the subject of RCP, and I have been searching a lot in different forums for answers, but i cannot really seem to find the core ingredients that are necessary to make an auto-completion functionality.

greg-449
  • 109,219
  • 232
  • 102
  • 145
pethul
  • 116
  • 2
  • 3
  • So this is an `e4` RCP - which can't use a lot of the 3.x editor support. Look at using `SourceViewer` and `SourceViewerConfiguration` rather than `Text`. – greg-449 Jun 24 '14 at 13:10
  • Yes, I don't really know the difference to be honest. How would I do that more specifically? I did stumble upon those words in alot of forums where people asked similar things. The problem is I can't really find a good angle to start with because either the sample code is too small or too big to get a grip of. And I am not really getting much out of reading the documentation. – pethul Jun 24 '14 at 14:28

0 Answers0