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

Bug 385122

Summary: Refactoring in Java editor temporarily blurs text on retina displays
Product: [Eclipse Project] JDT Reporter: Torkild Resheim <torkildr>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ayub.malik, eclipse, lshanmug, markus.kell.r, peter, Silenio_Quarti
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard: stalebug
Bug Depends on: 382972, 392307, 399786, 489451    
Bug Blocks:    

Description Torkild Resheim CLA 2012-07-15 16:01:04 EDT
After applying the workaround described in bug 382972 I've enjoyed Eclipse 4.2 in retina glory. However there is a quirk. Whenever I do refactoring in a Java editor the contents are briefly rendered using the "non-retina" mode - making the text quite blurry. 

This happens in a manner that makes me believe it is related to double buffering. The blurry text appears once the refactoring has started and the good looking text appears again when done. Other views or editors are not affected.
Comment 1 Markus Keller CLA 2012-10-31 07:10:40 EDT
Does this only happen for the Rename refactoring?

Then it's probably due to the workaround for bug 174405 in org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode#doRename(boolean), where we take a snapshot of the editor contents and then show this on top of the actual editor:
			GC gc= new GC(composite);
			image= new Image(gc.getDevice(), size.x, size.y);
			gc.copyArea(image, 0, 0);

The problem is that we have to revert the changes in the editor before we can start the global refactoring. We must not show this to the user, and there's no way to stop the editor from updating when the underlying file buffer changes, so this is the best solution we found.

It looks like SWT has no API to copy the retina version of a GC.
Comment 2 Markus Keller CLA 2012-12-12 12:46:25 EST
I'll take this bug back to JDT UI.

SWT bug 392307 is for the problem with GC.copyArea(). We may have to adjust our implementation once a new API is available in SWT.
Comment 3 Markus Keller CLA 2013-02-04 06:05:25 EST
*** Bug 394044 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Genie CLA 2020-02-17 18:20:18 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.