Bug 6532 Templates - Insert variable -- popup doesn't disappear
Window/Preferences/Java/Templates: Once one clicked on the "Insert variable" button one cannot make the popup window disappear without clicking on the "pattern" TA. Even when I switch to another application the window stays open! The window should disappear once the user clicks outside the popup window and/or changes (-> loss of focus) to another application. @@@@ Sebastian Davids
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
/*
	 * @see Dialog#createDialogArea(Composite)
	 */
	protected Control createDialogArea(Composite ancestor) {
		Composite parent= new Composite(ancestor, SWT.NONE);
		GridLayout layout= new GridLayout();
		layout.numColumns= 2;
		parent.setLayout(layout);
		parent.setLayoutData(new GridData(GridData.FILL_BOTH));
		
		createLabel(parent, TemplateMessages.getString("EditTemplateDialog.name")); 	
		
		Composite composite= new Composite(parent, SWT.NONE);
		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		layout= new GridLayout();		
		layout.numColumns= 3;
		layout.marginWidth= 0;
		layout.marginHeight= 0;
		composite.setLayout(layout);
		fNameText= createText(composite);
		fNameText.addModifyListener(new ModifyListener() {
			public void modifyText(ModifyEvent e) {
				if (fSuppressError && (fNameText.getText().trim().length() != 0))
					fSuppressError= false;
				updateButtons();
			}
		});
		createLabel(composite, TemplateMessages.getString("EditTemplateDialog.context")); 		
		fContextCombo= new Combo(composite, SWT.READ_ONLY);