Bug 229340 - [forms] TextSegment wrapping issue
Summary: [forms] TextSegment wrapping issue
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
: 294746 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-29 10:49 EDT by Inocencio Richiez CLA
Modified: 2010-02-26 16:25 EST (History)
6 users (show)

See Also:


Attachments
screenshot of the distored list of extension names (15.79 KB, image/gif)
2008-04-29 10:49 EDT, Inocencio Richiez CLA
no flags Details
patch (879 bytes, patch)
2009-11-23 09:39 EST, Wojciech Galanciak CLA
no flags Details | Diff
Improved Patch (795 bytes, patch)
2009-12-03 16:20 EST, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Inocencio Richiez CLA 2008-04-29 10:49:09 EDT
Created attachment 97992 [details]
screenshot of the distored list of extension names

Build ID: Build id: I20080409-1425

Steps To Reproduce:
1.Import into your workspace plugin: org.eclipse.pde.ui.templates and its dependencies
2.Edit the second Extension Used entry under the “pluginContent.helloRCP.description” value to - <li>org.eclipse.ui.perspectives.Eclipse.pde.templates.hello</li>
3.Save the properties file. launch an Eclipse runtime workbench
4.Create a plugin project. In the Plug-in Content page (2nd page), select the Yes radio button under the Rich Client Application group and click Next
5.Under the Templates page, select Hello RCP
6.Note: on the right-hand-side of the UI, under Extension Used, the second extendion name is not layout correctly in its bullet form. See attached screenshot. 



More information:
When creating a PDE project, if the extension name on the template's page is somewhat long, the list of extension names under the "Extensions Use" gets distored - the bullets are not layout correnctly, the long extension names are not completly vissible since there is no vertical scrollbar.
Comment 1 Benjamin Cabé CLA 2008-04-29 16:26:18 EDT
It should be a small layout problem in the wizard page. Investigating...
Comment 2 Inocencio Richiez CLA 2008-06-06 10:46:15 EDT
Any progress on this?
Comment 3 Chris Aniszczyk CLA 2008-06-06 10:48:59 EDT
It's the end of the 3.4 release so things are on lockdown.

Feel free to attach a patch if you have one.

tagging bugday
Comment 4 Benjamin Cabé CLA 2008-06-06 12:24:19 EDT
When I had a quick look at, it seemed to be a bug in FormText that didn't skip a line because the "word" 'org.eclipse.core.runtime.foo.bar.blah.blah' is seen as a huge *single* word by the ICU word wrapping algorithm.
Comment 5 Chris Aniszczyk CLA 2008-06-06 12:29:53 EDT
I would expect just to provide a way to scroll.

I would also like to re-design the patch so things were more top/down.
Comment 6 Ankur Sharma CLA 2009-11-11 07:04:16 EST
*** Bug 294746 has been marked as a duplicate of this bug. ***
Comment 7 Wojciech Galanciak CLA 2009-11-23 09:39:23 EST
Created attachment 152859 [details]
patch

This is a patch for this bug. When it calculates width it takes the widest word (in this case it is package name) + indent.
Comment 8 Chris Aniszczyk CLA 2009-11-23 10:35:06 EST
moving to Platform UI since the patch is against forms...
Comment 9 Chris Goldthorpe CLA 2009-11-23 15:47:54 EST
The patch does fix the problem. I need to review it further but I plan to add it to Eclipse 3.6.
Comment 10 Chris Goldthorpe CLA 2009-12-03 16:11:53 EST
The (first) patch attached to this bug has problems. The bug in TextSegment is that it only updates "width" when the contents of the text flows onto a new line. If the last TextFragment in the text is very long it's size does not get taken into account. The patch causes the width computation to be based on the final segment

If you set a FormText to something like "<form><p>The package" +
org.eclipse.test.platform.longname.unsplittable.and.very.long" +
" is an identifier that will always be on a single line</p></form>"; it will show up the bug in the patch because the lenght of the very long identifier will not be used in the computation. I will attach a better patch.
Comment 11 Chris Goldthorpe CLA 2009-12-03 16:20:26 EST
Created attachment 153778 [details]
Improved Patch

If you get a chance can you test this patch and verify that it fixes the original problem without any obvious regressions.
Comment 12 Chris Goldthorpe CLA 2009-12-03 17:10:45 EST
Patch committed to HEAD, Fixed. Please verify the fix which will be in tomorrow's integration build.