Bug 13926

Summary: JFace Text Editor Leaves a Black Rectangle on Content Assist text insertion
Product: [Eclipse Project] Platform Reporter: Scott Fairbrother <scottf>
Component: UIAssignee: Kai-Uwe Maetzel <kai-uwe_maetzel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Black Rectangle Appears on Content Assist insertion
none
JFace Test Case - a "*.release" editor
none
patch for ContextInformationPopup none

Description Scott Fairbrother CLA 2002-04-16 14:41:13 EDT
We found a problem when migrating editors based on JFace Text from V10 to V20 
(driver 20020412).  We found that after inserting a selected completion 
proposal, from the context information popup, that causes a black rectangle to 
appear on top of the display.  See the attached screen shot.

Tracing the appearance of the rectangle down, we see the rectangle just after 
going in the BusyIndicator.showWhile. 

----------  The rectangle appears in the execution of this ----------------  
class ContextInformationPopup
	public void showContextInformation(final IContextInformation info, 
final int position) {
		Control control= fViewer.getTextWidget();
		BusyIndicator.showWhile(control.getDisplay(), new Runnable() {
			public void run() {
				internalShowContextInfo(info, position);
				hideContextSelector();
			}
		});
	}
Comment 1 Scott Fairbrother CLA 2002-04-16 14:42:59 EDT
Created attachment 618 [details]
Black Rectangle Appears on Content Assist insertion
Comment 2 Scott Fairbrother CLA 2002-04-16 14:48:31 EDT
Created attachment 619 [details]
JFace Test Case - a "*.release" editor
Comment 3 Kai-Uwe Maetzel CLA 2002-06-05 05:14:01 EDT
No reproducible case. No other comparable reports. Closed. Please reopen if 
this is still happening. 
Comment 4 Scott Fairbrother CLA 2002-06-05 08:21:32 EDT
Kai - we still see this problem in the F2 drive.  We think that the bug is 
reproducable, see attachment JFace Test Case that we sent on 4/16.  Download as 
a zip file, extract it and import as an external plug-in from filesystem.     
Comment 5 Scott Fairbrother CLA 2002-06-20 13:07:36 EDT
Hi Kai - Re-created this same problem in F3 driver using the Java Editor 
Example.  

Steps to re-create:

1.) First change the  the JavaEditor class to subclass to AbstractTextEditor
 
public class JavaEditor extends AbstractTextEditor {

2.) Then Change the constructor to call initialize editor. 
 
	public JavaEditor() {
		super();
		initializeEditor();
	}

3.) Then launch, create a project and then create a file with a .jav extension

4.) Select Content Assist on the editor menu.

5.) Double click on "abstract" proposal.
Comment 6 Kai-Uwe Maetzel CLA 2002-06-27 10:29:46 EDT
See JavaDoc of IContextInformationValidator in GM5.
Comment 7 Kai-Uwe Maetzel CLA 2002-06-27 10:30:16 EDT
Created attachment 1608 [details]
patch for ContextInformationPopup
Comment 8 Scott Fairbrother CLA 2002-06-28 09:41:49 EDT
Kai - 

I verified the fix on GM6.  In addition the JavaEditor example is fixed too. 

I looked at the changes you made to the JavaCompletionProcessor.java and 
updated my completion processor similarly. I updated the Validator class to 
implement IContextInformationValidator, AND IContextInformationPresenter.  I 
implemented the requisite updatePresentation method and it worked!   

 
Thank you very, very much for getting this fix done in time for the GM R2.0 
build.  

Mit freundlichen Gruessen, Scott
Comment 9 Kai-Uwe Maetzel CLA 2002-07-24 05:56:55 EDT
Reopened for 2.1 for fixing ContextInformationPopup as given by the attached 
patch.
Comment 10 Kai-Uwe Maetzel CLA 2002-08-12 06:27:29 EDT
Patch applied to the 2.0.1 and the 2.1 stream.