| Summary: | org.eclipse.java2d.label broken in bidi when text string has embedded brackets | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michael R Cooper <coopermr> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe |
| Version: | 4.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
That is the correct bidi reordering. expecting: [... is a test of bracket]Is this BIDI enabled not ... is a test of bracket]Is this BIDI enabled] The error we have in our product using eclipse is: NON-BIDI [Deprecated]Use Browser URL BIDI Deprecated]Use Browser URL] That is incorrect - the only thing that should be done is the whole text string should just get right justified. Please read http://www.unicode.org/reports/tr9/ You can use the TextProcessor to solve your problem: http://wiki.eclipse.org/New_Bidi_APIs |
Build Identifier: 3.6.2 code sample here: public class PrimaryView extends ViewPart { private Button clickMeButton; public PrimaryView() { super(); } public void createPartControl(final Composite parent) { Canvas canvas = new Canvas(parent, SWT.NULL); LightweightSystem lws = new LightweightSystem(canvas); Label lb = new Label(); lb.setText("[this is a test of bracket]Is this BIDI enabled"); lws.setContents(lb); } public void setFocus() { } } the output will look like this when in bidi: ... is a test of bracket]Is this BIDI enabled] Reproducible: Always Steps to Reproduce: 1.build the code snippet 2.put in bidi env 3.run snippet