Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370404

Summary: [console] Input expression not always erased after execution
Product: [Modeling] OCL Reporter: Ed Willink <ed>
Component: CoreAssignee: OCL Inbox <mdt-ocl-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2012-02-02 03:52:54 EST
M4 and 3.7.1 For the old Console and for the Xtext Console pressing Enter/Cr after entry of an OCL expression causes evaluation of that expression, copying of the expression to history then erasing ready for a new expression.

However for the Xtext Console if Enter/Cr occurs rapidly the erase does not occur.
Comment 1 Ed Willink CLA 2012-02-02 04:03:53 EST
The problem is that the KeyUp event is not delivered to the InputKeyListener. Examining the Widget dispatch code shows a variety of special workarounds to handle wierd Enter anomalies on Windows (my laptop doesn't even have an Enter key).

Given the speed issue, it would appear that there is an adverse reaction between the screen refresh to update the highlighting and the input event processing.

Moving the erase into KeyDown does not seem to help.

Repro:

Open Xtext Interactive console

Type: 1 2 3 4 <CR>
as fast as you can. Usually fails to erase.

Workaround: let the screen refresh complete before hitting <CR>