Bug 293199 [FieldAssist] Content assist popup appears in the wrong location (bounds are incorrect)
When content assist is attached to a Text widget, the location of the suggestion popup is incorrect. Content assist is applied as follows: bc. TextContentAdapter textContentAdapter = new TextContentAdapter(); IContentProposalProvider provider = // provider ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(nameText, textContentAdapter, provider, org.eclipse.ui.fieldassist.ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND, new char[0],true); adapter.setProposalAcceptanceStyle(ContentAssistCommandAdapter.PROPOSAL_REPLACE); I'm not sure if it matters, the Text is embedded in an expandable section in a SashForm in a multipage editor. attaching two screenshots showing popup placement issue.
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
getShell().setBounds(initialX, initialY, popupSize.x, popupSize.y);
			
			getShell().addListener(SWT.Resize, new Listener() {
				public void handleEvent(Event e) {
					popupSize = getShell().getSize();
					if (infoPopup != null) {
						infoPopup.adjustBounds();
					}
				}
			});
		}
		/*
		 * Handle the set data event. Set the item data of the requested item to
		 * the corresponding proposal in the proposal cache.
		 */
		private void handleSetData(Event event) {
			TableItem item = (TableItem) event.item;
			int index = proposalTable.indexOf(item);
			if (0 <= index && index < proposals.length) {
				IContentProposal current = proposals[index];
				item.setText(getString(current));
				item.setImage(getImage(current));
				item.setData(current);
			} else {
				
			}
		}
		/*
		 * Caches the specified proposals and repopulates the table if it has
		 * been created.