Bug 4358 Template - steals closing bracket
Steps to reproduce - press new - enter name for - enter description for(collection, type, var) - iterate over collection - enter pattern for (Iterator iter= ${0}.iterator; iter.hasNext(); ) { ${1} ${2}= (${1})iter.next(); ${cursor} - press return several times - position cursor after ${cursor} - press enter - press } - press OK - reopen dialog ==> observe: closing bracket } is missing.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
private Button fRemoveButton;
	private Button fEnableAllButton;
	private Button fDisableAllButton;
	private Group fEditor;
	private Text fNameText;
	private Text fDescriptionText;
	private Combo fContextCombo;
	private SourceViewer fPatternEditor;
	private Button fFormatButton;
	private ControlEnableState fEditorEnabler;
	
	private List fEditorComponents;
	
	private Template fCurrent;
	
	public TemplatePreferencePage() {
		super();
		setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
		setDescription(TemplateMessages.getString("TemplatePreferencePage.message")); 
	}
	/**
	 * @see PreferencePage#createContents(Composite)
	 */
	protected Control createContents(Composite ancestor) {	
		Composite parent= new Composite(ancestor, SWT.NULL);
		GridLayout layout= new GridLayout();
		layout.marginHeight= 0;
		layout.marginWidth= 0;
		
		parent.setLayout(layout);