Bug 564505 - Content Assist after use by mouse does not restore Caret cursor
Summary: Content Assist after use by mouse does not restore Caret cursor
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-20 14:57 EDT by Nathan Tippy CLA
Modified: 2020-06-20 15:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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