Bug 4360 Template - cursor at wrong position
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEditorPopup.java
* A popup dialog to request the user to fill the variables of the chosen template.
 */
public class TemplateEditorPopup implements ModifyListener, VerifyKeyListener, ControlListener, FocusListener {
	private static final int BORDER_WIDTH= 1;
	private TemplateContext fContext;
	private TemplateModel fModel;
	private Shell fShell;
	private Composite fComposite;
	private SourceViewer fViewer;
	private EditBox[] fEditBoxes;
	
	private boolean fResult;
	public TemplateEditorPopup(TemplateContext context, TemplateModel model) {
		fContext= context;
		fModel= model;
	}
	
	private void create() {		
		Control control= fContext.getViewer().getTextWidget();
		control.getShell().addControlListener(this);		
		Display display= control.getDisplay();
		
		fShell= new Shell(control.getShell(),  SWT.NO_TRIM | SWT.APPLICATION_MODAL);
		fShell.setBackground(display.getSystemColor(SWT.COLOR_RED));
		
		fComposite= new Composite(fShell, SWT.NONE);
		
		int[] indices= fModel.getEditableTexts();
		int count= indices.length;
		fEditBoxes= new EditBox[count];