Community
Participate
Working Groups
Build Identifier: 20100218-1601 Using the Eclipse UI forms section, certain text will get cut off. For example, "Abc Test" just shows "Abc" and "Abc Variables" just shows "Abc". The "Abc" text is irrelevant. You can create your own form to test or use the org.eclipse.ui.forms.examples. I changed "Header Features" text in NewStylePage.java. After more investigating, I found similar issues with Eclipse IDE itself. In the plugin.xml editor Overview tab Testing says "Testin". The Runtime tab also seems to have cut off section text. I've testing my code on Ubuntu, Windows, and Mac without problems. I'm also seeing other odd behavior with Eclipse UI forms on Red Hat, but I'll leave that for other bug posts. Reproducible: Always Steps to Reproduce: 1. Create Eclipse UI FormPage with a Section 2. Set Section text to "Abc Test" Test is cut off when you run.
Created attachment 169316 [details] Plugin.xml overview page in Eclipse with 'g' cut off in Testing
Created attachment 169317 [details] Plugin.xml runtime page in Eclipse with "later)" cut off in Package Visibility section
I've just confirmed this is also an issue with 3.6, I20100513-1500.
Did you see this problem in Eclipse 3.5 also? I will see if I can find a machine running red hat to test on, I have not see the problem on Ubuntu or Windows.
Yes, 3.5 and 3.6. Let me know if you need any other info. Thanks.
This problem looks very similar to Bug 277268 which was fixed in Eclipse 3.5, I'm not sure why the problem you described is still happening even after that bug was fixed.
I also just test Eclipse 3.4.2 and it has the same problem as well.
Copying Bogdan Gheorghe who has an RHEL 5 system.
Bug 277268 reference seemed to imply opening and closing the section would fix the text, but it does not for me. Also, if you change the word "Test" to "Aaaaa" it works fine. Seems like certain words cause the problem - Test and variables is what I've found. Very strange.
The similarity with Bug 277268 is I think adding to the confusion, my guess is that this is a different bug but with the same symptom of not calculating the size correctly. I'm working on getting this tested on RHEL 5, until I can reproduce the problem I can't do too much.
I can see this on my RHEL5 with the I20100520-1744 build (and I confirmed that it was in a 3.5.2 build as well). Also Ubuntu 10.04 does not have this problem so it is likely a GTK-version problem (RHEL5 uses GTK 2.10, Ubuntu 10.04 uses GTK 2.18).
Ubuntu 9.1 works as well. Does that use GTK 2.18?
I was able to reproduce the problem on a virtual machine running RHEL5 but I don't yet know why it would be happening
Here is a snippet that will reproduce the problem, I used this in a project created with the plug-in with a view template. It seems that the width calculation is off by one. public void createPartControl(Composite parent) { Composite inner = new Composite(parent, SWT.NULL); FormToolkit toolkit = new FormToolkit(parent.getDisplay()); inner.setLayout(new GridLayout(1, false)); Section section = toolkit.createSection(inner, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); Composite client = toolkit.createComposite(section); section.setClient(client); section.setText("Feature"); }
Created attachment 170712 [details] Patch to allocate extra space to the label This is a patch which makes the problem go away by allocating 1 extra unit of width for the Label. I don't feel that I have got to the root of the problem yet but if anyone needs a workaround this patch should be safe.
Reassigning to SWT Here is a small snippet that reproduces the problem in a plug-in with a view. Note that I have only seen the failure on RHEL5, and the default font does not cause the problem to occur. public void createPartControl(Composite parent) { Composite inner = new Composite(parent, SWT.NULL); inner.setLayout(new GridLayout(1, false)); Label lab = new Label(inner, SWT.WRAP); lab.setText("Feature"); lab.setFont(JFaceResources.getHeaderFont()); }
Created attachment 170714 [details] Screenshot of bug in code which does not use UI forms.
Can someone from SWT take a look at this bug - it seems that SWT.Label is where the problem originates.
I took a look at this today and it is definitely a bug in the Pango that comes with GTK 2.10. It got fixed in GTK 2.12 (and onwards). The bug shows up whenever you are using a label with a bold font that has the SWT.WRAP style bit set. I want to take a quick look at 3.4.2 as Ken mentioned he was seeing the problem there as well...
Created attachment 204916 [details] similar issue on RHEL 5.5 and SWT 3.7.1 GA I used PDE Picasso to help investigate this issue. It looks like everything of Java Label instance works well. Both text value and width looks fine. The Label is created by FormToolkit with WRAP style, and uses normal font. However only part of string is shown by GTK.
Old versions of GTK2 and SWT. Label has had many fixes for wrapping in the last years. Please file a new bug against 4.8 if the issue re-occurs.