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
}
					recordCursorPosition();
					popup = new ContentProposalPopup(null, proposals);
					popup.open();
					popup.getShell().addDisposeListener(new DisposeListener() {
						public void widgetDisposed(DisposeEvent event) {
							popup = null;
						}
					});
					notifyPopupOpened();
				} else if (!autoActivated) {
					getControl().getDisplay().beep();
				}
			}
		}
	}
	/**
	 * Open the proposal popup and display the proposals provided by the
	 * proposal provider. This method returns immediately. That is, it does not
	 * wait for a proposal to be selected. This method is used by subclasses to
	 * explicitly invoke the opening of the popup. If there are no proposals to
	 * show, the popup will not open and a beep will be sounded.
	 */
	protected void openProposalPopup() {
		openProposalPopup(false);
	}
	/**
	 * Close the proposal popup without accepting a proposal. This method
	 * returns immediately, and has no effect if the proposal popup was not
	 * open. This method is used by subclasses to explicitly close the popup