Summary: | StyledText#addBidiSegmentListener(..) only works if RTL input language is installed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Markus Keller <markus.kell.r> | ||||
Component: | SWT | Assignee: | Markus Keller <markus.kell.r> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | daniel_megert, Lina.Kemmel, markus.kell.r, robin, Silenio_Quarti, tomerm | ||||
Version: | 4.3 | Keywords: | api | ||||
Target Milestone: | 4.3 M6 | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Whiteboard: | |||||||
Bug Depends on: | |||||||
Bug Blocks: | 400662 | ||||||
Attachments: |
|
Description
Markus Keller
2013-02-13 14:21:38 EST
Created attachment 228136 [details]
Fix
Can we fix this for M6? I can release the fix unless there's opposition.
My only concern is whether this will case performance degradation on Windows. Do you have any numbers? The command line switch will only help eclipse plugins. I am not a big fun of system properties, but we could add this line to the beginning of isBidi(): if (!"true".equals(System.getProperty("org.eclipse.swt.checkBidiLocale"))) return true; It will cause more BidiSegmentListener callbacks, but it can't be a relevant performance degradation, since we already accept this unconditionally on Mac and GTK, and on Windows platforms where a bidi keyboard language is installed. In the Eclipse SDK, the only relevant BidiSegmentListener is in the JavaSourceViewer. This is called every time a line is rendered in a Java editor. When I scroll 1000 lines of StyledText (takes about 30s here), both YourKit and System.currentTimeMillis() have a hard time measuring any time spent in StyledText#getBidiSegments(..). Often, it's 0ms, sometimes 1ms. Accumulated over the 30s, it's around 30ms. I think we should just remove this and we don't need a system property. OK, +1 to your patch. |