Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329295 - [painting] Painting problems with mark occurrences highlighting
Summary: [painting] Painting problems with mark occurrences highlighting
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 16:00 EDT by John Arthorne CLA
Modified: 2010-11-05 10:00 EDT (History)
5 users (show)

See Also:


Attachments
Screen shot (5.95 KB, image/png)
2010-11-02 16:00 EDT, John Arthorne CLA
no flags Details
Mark occurrence preference settings (5.26 KB, image/png)
2010-11-02 16:07 EDT, John Arthorne CLA
no flags Details
patch (1.07 KB, patch)
2010-11-04 10:44 EDT, Felipe Heidrich CLA
no flags Details | Diff
horizontal cheese (27.48 KB, image/png)
2010-11-04 14:03 EDT, Markus Keller CLA
no flags Details
patch (2.89 KB, patch)
2010-11-04 16:03 EDT, Felipe Heidrich CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2010-11-02 16:00:03 EDT
Build: 3.7 M3

I am occasionally (at least once a day) seeing problems with the painting of mark occurrences in the Java editor. The general steps are:

- Select a field
- Scroll the editor quickly to view occurrences
- Painting of the occurrences is messed up. The highlighting appears within the correct bounds for the reference, but is blurred or drawn in the wrong place.

I can't consistently reproduce, and any change such as highlighting with the mouse or scrolling the editor to force a paint causes the problem to go away.
Comment 1 John Arthorne CLA 2010-11-02 16:00:30 EDT
Created attachment 182246 [details]
Screen shot
Comment 2 John Arthorne CLA 2010-11-02 16:07:32 EDT
Created attachment 182247 [details]
Mark occurrence preference settings
Comment 3 John Arthorne CLA 2010-11-02 16:09:50 EDT
I can actually reproduce this quite easily with the steps outlined above:

- Select a field in a class with multiple pages of content
- Scroll down by dragging the scrollbar until the field appears. Scrolling fast or slow doesn't matter. In fact it looks even worse when you scroll to it closer.
Comment 4 Dani Megert CLA 2010-11-03 03:25:54 EDT
I'll take a look...
Comment 5 Dani Megert CLA 2010-11-03 05:35:50 EDT
This looks like an SWT bug when (re-)drawing TextStyle.borderStyle.

I could easier reproduce by:
1. open a class (e.g. StyledText)
2. scroll down via scroll bar thumb
3. select a variable that appears often in the method
4. scroll up, so that they disappear
5. scroll down again
==> cheese
Comment 6 Dani Megert CLA 2010-11-03 05:44:49 EDT
This is a major regression introduced in 3.7 M3.

Very simple steps:
1. paste the snippet listed below
2. select the method declaration in the editor
3. scroll (it doesn't matter whether via mouse wheel, scroll bar or key board, but via scroll bar it cheese is biggest)
==> cheese

--- %< ---
public class Cheese {

	void cheese() {
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
		cheese();
	}
}
--- %< ---
Comment 7 Felipe Heidrich CLA 2010-11-04 10:44:43 EDT
Created attachment 182377 [details]
patch

Naive me, introduced this bug fixing Bug 305672. It is okay to reduce the drawing rect in the width using the clip, but not for the height.
Comment 8 Felipe Heidrich CLA 2010-11-04 10:46:14 EDT
Fixed in HEAD > 2010-11-04
Please verify. Thank you
Comment 9 Markus Keller CLA 2010-11-04 14:03:27 EDT
Created attachment 182406 [details]
horizontal cheese

Solid borders are looking good now, but dashed and dotted borders still show some cheese when scrolling horizontally. I guess the horizontal clipping needs to be aligned to the length of the drawn pattern.
Comment 10 Felipe Heidrich CLA 2010-11-04 15:45:47 EDT
oh, now I remember why I started fixing bug 305672 and stopped - reducing the rect to correct phase in the dot/dash pattern is not fun.
Lets try again.
Comment 11 Felipe Heidrich CLA 2010-11-04 16:03:02 EDT
Created attachment 182422 [details]
patch
Comment 12 Felipe Heidrich CLA 2010-11-04 16:03:49 EDT
Fixed in HEAD > 2010-NOV-04
Comment 13 Markus Keller CLA 2010-11-05 10:00:33 EDT
Thanks, verified in HEAD.