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
/**
		 * Updates the enabled state of the action.
		 * Fires a property change if the enabled state changes.
		 * 
		 * @see Action#firePropertyChange(String, Object, Object)
		 */
		public void update() {
	
			boolean wasEnabled= isEnabled();
			boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
			setEnabled(isEnabled);
	
			if (wasEnabled != isEnabled) {
				firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE);
			}
		}
		
		/**
		 * @see Action#run()
		 */
		public void run() {
			if (fOperationCode != -1 && fOperationTarget != null) {
				fOperationTarget.doOperation(fOperationCode);
			}
		}
	}	
	private Template fTemplate;
	private Text fNameText;
	private Text fDescriptionText;
	private Combo fContextCombo;