Have you ever been in a software demo there the presenter was that fast with the editor that you were scared?
Image may be NSFW.
Clik here to view.
He might have been using personal templates. Templates allow you to save a block of coding and insert it as you desire. You find them under Window-> Preferences -> Java -> Editor -> Templates.
Try it out in the Editor for the SWT templates (within an Eclipse plugin or Eclipse RCP application). Type Label and press Cntr+Space three times until you see only the Java template suggestions.
Image may be NSFW.
Clik here to view.
Select the template and change the code to your liking. Do the same for GridData. You end up the following code almost without typing.
Label label1 = new Label(parent, SWT.NONE); label1.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false,false)); label1.setText("Test"); GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, false); gridData2.widthHint = SWT.DEFAULT; gridData2.heightHint = SWT.DEFAULT; label1.setLayoutData(gridData2);
The great thing about templates is that you can define your own once. So if you have something longer which you need to type again and again you can use your own templates.