Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 298747 - [EditorMgmt] Bidi Incorrect file type direction in mirrored "Editor Selection" dialog
Summary: [EditorMgmt] Bidi Incorrect file type direction in mirrored "Editor Selection...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-04 06:53 EST by Helena Halperin CLA
Modified: 2010-01-26 08:13 EST (History)
4 users (show)

See Also:


Attachments
patch (1.32 KB, patch)
2010-01-04 07:41 EST, Helena Halperin CLA
remy.suen: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helena Halperin CLA 2010-01-04 06:53:53 EST
Build Identifier: I20091210-1301

Bidi bug.
When Eclipse is run with Hebrew locale (-nl iw), file types in "Editor Selection" dialog are displayed incorrect (for example, ndl. instead of .ndl)
This bug is one of the cases that are described in Bug 130587. It is excluded to a separate bug, since bug 130587 contains different cases that needed different fixes.

Reproducible: Always

Steps to Reproduce:
1.Run Eclipse with Hebrew locale (-nl iw), eclipse is mirrored
2.Open Preferences-> General-> Editors -> File Associations ->Add assosiated editors
3.Select External programs
Expected result .ndl
Actual result ndl.
Comment 1 Helena Halperin CLA 2010-01-04 07:41:54 EST
Created attachment 155221 [details]
patch

The bug can be resolved by using TextProcessor#process on the label, when the delimeter is "."
Attached patch to fix the bug
Comment 2 Oleg Besedin CLA 2010-01-04 13:37:07 EST
On my computer most of the entries in the list are not "simple" extensions (i.e., ",ndl"), but description texts (i.e., "C/C++ Header"). Some of the textual entries have dots in them, for instance, "ASP.NET Master Page"). How would such entries be processed?
Comment 3 Helena Halperin CLA 2010-01-05 12:07:04 EST
Strings like "C/C++ Header" or "ASP.NET Master Page" will remain unchanged. TextProcessor will only affect the string if the string starts or ends with neutral characters. For example the string ".ndl" after the processing will be displayed as expected, as ".ndl", while currently, without the processing the string ".ndl" will be displayed in mirrored GUI as "ndl.", which is incorrect.
Comment 4 Remy Suen CLA 2010-01-07 08:18:30 EST
(In reply to comment #3)
> Strings like "C/C++ Header" or "ASP.NET Master Page" will remain unchanged.

Thanks for the information Helena. I don't think the string 'ASP.NET' would even be altered at all in its presentation in RTL mode since it just uses Latin characters, correct?
Comment 5 Oleg Besedin CLA 2010-01-07 09:50:18 EST
(In reply to comment #4)
> (In reply to comment #3)
> > Strings like "C/C++ Header" or "ASP.NET Master Page" will remain unchanged.
> Thanks for the information Helena. I don't think the string 'ASP.NET' would
> even be altered at all in its presentation in RTL mode since it just uses Latin
> characters, correct?

That's what confuses me too - see the original description saying:
> (for example, ndl. instead of .ndl)

So, ".ndl" is transposed, but not "ASP.NET Master Page"? How does the TextProcessor knows how to differentiate those two strings? Or, if this applies only to BiDi characters, then only file extensions with BiDi characters are a problem?
Comment 6 Helena Halperin CLA 2010-01-07 10:31:12 EST
This is correct, that string like "ASP.NET" will be displayed the same in RTL, while string like ".NET" will be displayed "NET." in RTL. The difference is that ".NET" starts with neutral character. To see, you can type the string in Notepad and select Right to left reading order in context menu. 
TextProcessor checks the string and changes the string if the string contains Bidi characters OR the string contains neutral characters at the start or at the end.
Comment 7 Remy Suen CLA 2010-01-19 12:24:50 EST
(In reply to comment #1)
> Created an attachment (id=155221) [details]
> patch

Released to HEAD with amended copyright headers. Thank you, Helena.
Comment 8 Remy Suen CLA 2010-01-19 12:25:05 EST
Forgot to resolve.
Comment 9 Remy Suen CLA 2010-01-26 08:13:57 EST
Verified with I20100125-1800 on Windows XP.