Bug 564505

Summary: Content Assist after use by mouse does not restore Caret cursor
Product: [Eclipse Project] Platform Reporter: Nathan Tippy <nathantippy>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.17   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Nathan Tippy CLA 2020-06-20 14:57:16 EDT
Confirmed in 2020-03 and 20200-06 with ubuntu 18.04.

Bring up content assist and then use the mouse to choose an item.  The proposal is inserted however the cursor Caret is now gone.  You can get the Caret back by pressing right click.

 As a Hack solution for my own content assist I added the following to computeCompletionProposal() and the issue was fixed.

final StyledText textWidget = viewer.getTextWidget();    	
	viewer.addTextListener(new ITextListener() {
		@Override
		public void textChanged(TextEvent event) {					
			textWidget.setCaret(textWidget.getCaret());
			viewer.removeTextListener(this);
		}
	});

This should provide a clue where to look based on what gets modified when setCaret is called.
Comment 1 Nathan Tippy CLA 2020-06-20 15:19:55 EDT
Now using Java 8, Zulu from Azul but last month the issue also existed with Oracle Java 11