Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315323 - Multiline tooltips do not align correctly in bidi.
Summary: Multiline tooltips do not align correctly in bidi.
Status: CLOSED DUPLICATE of bug 388110
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 18:21 EDT by Graham O Keeffe CLA
Modified: 2012-09-10 07:05 EDT (History)
1 user (show)

See Also:


Attachments
screenshot of alignment and sample view (32.70 KB, application/octet-stream)
2010-06-01 18:23 EDT, Graham O Keeffe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham O Keeffe CLA 2010-06-01 18:21:21 EDT
Build Identifier: M20100211-1343

Bidi multiline tooltips do not always align correctly. By multiline I mean a
tooltip that contains a \n to add a carriage return.

For example 

Button button = new Button(parent, SWT.NONE);
button.setText("Click me");
button.setToolTipText("Use the data source name when referring to this data
source\nprogrammatically. Use caution when changing this name.");

Because the second line of text is shorter than the first, it will need to
align to the right for rtl languages. However, intermittently it will align to
the left instead.

I have attached an eclipse plugin that creates a view with a button. The button
has a multiline arabic tooltip. I have also attached a screenshot showing the
tooltip with correct and incorrect alignment. If you add it to eclipse, it will
appear under "RTL Test Views" -> "RTL Tooltip Test View" in the "Show View"
dialog. With eclipse started in rtl mode, the first time you hover over the
button, the tooltip will align correctly. The second time it will not. The
third time it will again, and so on and so forth. So it seems like it flips
from aligning correctly to incorrectly on each hover over. That is not true for
all instances of this issue though. 

This is one example of a tooltip from our product. We have lots of multiline
tooltips, that all essentially boil down to an
org.eclipse.swt.widgets.Control.setToolTipText() call. Some show the behavior
where they appear to flip from aligning to misaligning, but other are far less
consistent. Some may be correctly aligned 80% of the time and others can be
misaligned 80% of the time.


Reproducible: Always

Steps to Reproduce:
1. Add sample view to eclipse
2. Open the sample view
3. Hover over the button in the view.
Comment 1 Graham O Keeffe CLA 2010-06-01 18:23:00 EDT
Created attachment 170719 [details]
 screenshot of alignment and sample view
Comment 2 Dani Megert CLA 2012-09-10 07:05:48 EDT

*** This bug has been marked as a duplicate of bug 388110 ***