Bug 97009 - [Forms] Clipped link from Type Access Rules dialog
Summary: [Forms] Clipped link from Type Access Rules dialog
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.1 RC4   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2005-05-27 11:24 EDT by David Saff CLA
Modified: 2005-06-21 11:51 EDT (History)
2 users (show)

See Also:


Attachments
The clipped link (81.57 KB, application/octet-stream)
2005-05-27 11:25 EDT, David Saff CLA
no flags Details
The clipped link with Windows XP look and feel (16.89 KB, image/png)
2005-06-17 04:34 EDT, David Saff CLA
no flags Details
Clipping and quotes disappear on mouse-over (16.91 KB, image/png)
2005-06-17 04:35 EDT, David Saff CLA
no flags Details
UI Forms patch that fixes focus and link rendering (10.68 KB, patch)
2005-06-17 18:01 EDT, Dejan Glozic CLA
no flags Details | Diff
screenshot with patch (6.20 KB, image/x-png)
2005-06-19 21:24 EDT, Wassim Melhem CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Saff CLA 2005-05-27 11:24:48 EDT
Against I20050527-0010.  I'm attaching a screen shot from the Type Access Rules
dialog.  Clipping goes away when the link is moused-over.
Comment 1 David Saff CLA 2005-05-27 11:25:20 EDT
Created attachment 21886 [details]
The clipped link
Comment 2 Dirk Baeumer CLA 2005-05-27 12:10:58 EDT
Martin, don't know if this is use for SWT. 
Comment 3 Martin Aeschlimann CLA 2005-05-29 16:31:10 EDT
using ui.forms
Comment 4 Dejan Glozic CLA 2005-06-07 14:48:27 EDT
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).
Comment 5 Dejan Glozic CLA 2005-06-07 14:48:54 EDT
Lowering priority since it is not critical and I cannot reproduce it.
Comment 6 David Saff CLA 2005-06-17 04:34:18 EDT
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)
Comment 7 David Saff CLA 2005-06-17 04:35:16 EDT
Created attachment 23415 [details]
Clipping and quotes disappear on mouse-over

After mouse over.  The clipping is gone, and so are the quotes.
Comment 8 Dejan Glozic CLA 2005-06-17 18:00:12 EDT
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.
Comment 9 Dejan Glozic CLA 2005-06-17 18:00:52 EDT
Added Konrad and Wassim because they are the beneficiaries of the fix (links 
will render better in PDE editors and the Help view).
Comment 10 Dejan Glozic CLA 2005-06-17 18:01:28 EDT
Created attachment 23495 [details]
UI Forms patch that fixes focus and link rendering
Comment 11 Dejan Glozic CLA 2005-06-17 18:03:32 EDT
Raising priority to P2. This is not a stop-ship, but detracts from 
the 'finished product' feel.
Comment 12 Wassim Melhem CLA 2005-06-19 20:52:53 EDT
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.
Comment 13 Dejan Glozic CLA 2005-06-19 21:01:24 EDT
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.
Comment 14 Dejan Glozic CLA 2005-06-19 21:03:00 EDT
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.
Comment 15 Wassim Melhem CLA 2005-06-19 21:16:48 EDT
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.
Comment 16 Wassim Melhem CLA 2005-06-19 21:19:21 EDT
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.
Comment 17 Wassim Melhem CLA 2005-06-19 21:24:36 EDT
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.
Comment 18 Dejan Glozic CLA 2005-06-19 21:39:10 EDT
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).
Comment 19 Konrad Kolosowski CLA 2005-06-20 11:47:40 EDT
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.
Comment 20 Wassim Melhem CLA 2005-06-20 11:48:58 EDT
We can't live without a fix.  +1 for RC4
Comment 21 Dejan Glozic CLA 2005-06-21 11:51:21 EDT
Released.