Bug 433762

Summary: Bidi_4.4: BTD is not enforced on tree in New folder dialog
Product: [Eclipse Project] Platform Reporter: amir <bamir>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, Lina.Kemmel, markus.kell.r, tomerm, wajnberg
Version: 4.4Flags: markus.kell.r: review-
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
New folder dialog
none
Patch for the defect none

Description amir CLA 2014-04-29 09:13:22 EDT
Created attachment 242480 [details]
New folder dialog

1. Enable Bidi support: From Preferences -> General -> Globalization check enable Bidi support and set Base text direction to RTL.

2. Open new folder dialog


Result: The BTD settings is not enforced on project/folder names in tree in new folder dialog
Comment 1 Moshe WAJNBERG CLA 2014-04-29 09:17:30 EDT
Created attachment 242481 [details]
Patch for the defect
Comment 2 Moshe WAJNBERG CLA 2014-04-29 09:18:15 EDT
Hello Dani,

Could you please review this patch ?

Thank you very much for your review
Comment 3 Markus Keller CLA 2014-04-30 05:06:39 EDT
I don't think that's the right fix.

Why can't we just call Control#setTextDirection(int) on the Shell somewhere in IDEWorkbenchWindowAdvisor? For controls that need structured text handling, we do need to set the concrete STT, but in the general case, it's not necessary to set the BTD on each and every control.
Comment 4 Tomer Mahlin CLA 2014-04-30 05:56:21 EDT
Hi Markus. This is the right fix :-)). The approach you describe is the right approach for GUI mirroring associated with translation. This is because in that case entire application should be mirrored. Thus setting GUI direction to RTL on the top most level and propagating it to the rest of components is the right approach.

 As opposed to that applying text direction preference is applicable only to specific contexts in which end user text can appear. End user text is the text which is directly or indirectly introduced into the product by the end user / customer. Usually we distinguish between PII (translatable text) and end user text. Text direction should not be applied to PII.

Obviously almost every editable control (input field, combo box) belongs to the category of contexts in which  end user text appear. As opposed to that not all labels show end user text. The specific instance reported in this defect does.

Thus the method is:
(a) inspect the GUI 
(b) find all contexts in which end user text appear
(c) apply necessary API to assure its display is in accordance with user preferences (General -> Globalization).