Eclipse RCP to auto complete java code [message #1387152] |
Tue, 24 June 2014 13:10 |
Pjot Odor Messages: 3 Registered: June 2014 |
Junior Member |
|
|
Hi,
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 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. I am having trouble finding simple examples or tutorials for making RCP applications, so pretty much anything that may help would be appriciated.
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.
|
|
|
Re: Eclipse RCP to auto complete java code [message #1387487 is a reply to message #1387152] |
Wed, 25 June 2014 06:46 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
The following things might help:
* Make yourself familiar with Eclipse/JFace-Text component
* let the PDE wizard generate a sample XML-Editor for your to see the
most minimal things happening, like paritioning, scanning, damaging,
repainting.
* import the sources of JDT-UI, make yourself familiar with
CompilationUnit, the resources system, ... search for
JavaSourceViewer to see how JDT implements all the features
Tom
On 24.06.14 16:14, Pjot Odor wrote:
> Hi,
>
> 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 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. I am having trouble finding simple examples or
> tutorials for making RCP applications, so pretty much anything that may
> help would be appriciated.
> 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.
|
|
|
Powered by
FUDForum. Page generated in 0.01927 seconds