Bug 183650 [FieldAssist] ContentProposalAdapter with Text produces unwanted popup on Enter
Build ID: I20070323-1616 Steps To Reproduce: 1. Setup a ContentProposalAdapter (using ContentProposalAdapter.PROPOSAL_REPLACE) with some proposals on a Text control. 2. Type some valid text into the Text control 3. Hit "Enter" (or select from the dropdown) More information: ContentProposalAdapter has a private controlListener that calls autoActivate() on a SWT.Modify event. This is fine except it gets triggered from ContentProposalAdapter.proposalAccepted(). The result is that you select one of the items and it modifies the Text control causing the popup to display again, which goes around until the user hits ESC to make it go away.
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
/*
	 * The lightweight popup used to show content proposals for a text field. If
	 * additional information exists for a proposal, then selecting that
	 * proposal will result in the information being displayed in a secondary
	 * popup.
	 */
	class ContentProposalPopup extends PopupDialog {
		/*
		 * The listener we install on the popup and related controls to
		 * determine when to close the popup. Some events (move, resize, close,
		 * deactivate) trigger closure as soon as they are received, simply
		 * because one of the registered listeners received them. Other events
		 * depend on additional circumstances.
		 */
		private final class PopupCloserListener implements Listener {
			private boolean scrollbarClicked = false;
			public void handleEvent(final Event e) {
				
				
				if (e.type == SWT.FocusOut) {
					scrollbarClicked = false;
					/*
					 * Ignore this event if it's only happening because focus is
					 * moving between the popup shells, their controls, or a
					 * scrollbar. Do this in an async since the focus is not