Community
Participate
Working Groups
Against I20050527-0010. I'm attaching a screen shot from the Type Access Rules dialog. Clipping goes away when the link is moused-over.
Created attachment 21886 [details] The clipped link
Martin, don't know if this is use for SWT.
using ui.forms
Some layout fixes with the FormText went into the last night nightly build. I tried to reproduce this in a small test case but could not. Can you give it a try again with N20050607 or higher (BTW, I tried the dialog in question but the link has been removed, so I had to build a simple test case).
Lowering priority since it is not critical and I cannot reproduce it.
Created attachment 23414 [details] The clipped link with Windows XP look and feel Here is the clipped link again, in N20050616-0010. To reproduce, I simply: 1) Create a new Java project 2) Go to Properties > Java Build Path > Libraries 3) Add any library to the build path. 4) Expand the library, highlight "Access rules", hit "Edit..." 5) And see this clipped link. When I mouse over, the clipping stops, but the single quotes disappear. (screenshot to come)
Created attachment 23415 [details] Clipping and quotes disappear on mouse-over After mouse over. The clipping is gone, and so are the quotes.
This is related to a bug in focus indication rendering. The link segment used to return true from 'isSelectable()' which gave it one pixel margin around the text for drawing focus indication. During refactoring, a new method 'isFocusSelectable()' was added to IFocusSelectable interface, and this method was left orphaned. As a result, HyperlinkSegment and ImageHyperlinkSegment always returned 'true', so focus rendering was drawing on top of text. Depending on the paint ordering, you could see one segment drawing over another, or focus rectangle partially cancelling itself (due to XOR painting mode) etc. The attached patch finally fixes all the focus rendering issues. I tested it on Windows extensively (including PDE editors, Help view, Forms examples etc.). Needless to say, it also fixes the original problem of this bug. I will propose this bug as the only bug to be fixed in RC4 for Eclipse Forms.
Added Konrad and Wassim because they are the beneficiaries of the fix (links will render better in PDE editors and the Help view).
Created attachment 23495 [details] UI Forms patch that fixes focus and link rendering
Raising priority to P2. This is not a stop-ship, but detracts from the 'finished product' feel.
Eclipse Forms patches that involve additions and substractions of pixels really make me nervous. This particular patch is too large/elaborate for my RC4 tolerance level. I think links currently look fine in the PDE editors. I'm not sure this is critical for 3.1 unless you can prove to me otherwise with a live example.
I don't think pixels have any particular risk level that makes them more scary than, say, file management. It is more likely that pixel manipulation skills are not common and the provided patch seems scary as a result. If you apply the patch, you will notice that most of it consists of manipulating 1 pixel of offset and 2 pixels of total width. This compensation is done for 'selectable' text segments to make room for the focus rectangle that is rendered around these segments. This problem was in the code for a while and I was always unhappy about it but it was never a major issue because the misalignment was only one pixel. However, I do think that now that I have a solid fix in hand, it would be a shame to go into 3.1 with a less finished product because we are scared. All PDE editors work well with the fix applied, Help view works well, the original problem of this defect is gone, and Eclipse Forms examples also work well. I am happy to demonstrate the problem and the fix tomorrow.
I also encourage you to check out Eclipse Forms, apply the patch, and go through all PDE editors to verify that no cheeze happens in sections that use FormText.
what I do notice is that with the patch, I no longer have to click on a link that spans > 1 line 10-20 times to get it to work anymore, which is nice.
scratch that. I now have to click on a link twice to get it work. An improvement, but still not quite there yet. However, I am not sure this patch is supposed to address this anyway.
Created attachment 23520 [details] screenshot with patch Observe what still occurs with the patch when I make the text in the Exporting section wrap. The underline starts on the second to last line, while the underlined text is fully contained on the last line.
This is long lasting issue. I am using Java's BreakIterator and it gives me one blank space as a valid segment before the wrap. This is nothing to do with the patch. Please open a separate defect for the lazy link problem (again, not related to the 1-pixel offset).
It did not seem like an urgent problem to me at first, but after demonstration of the exact issues addressed by Dejan's fix and reviewing the patch, I believe it is worth releasing into RC4.
We can't live without a fix. +1 for RC4
Released.