Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352656

Summary: 4.1 workbench not mirrored when launch Eclipse with -nl ar
Product: [Eclipse Project] Platform Reporter: Kit Lo <kitlo>
Component: UIAssignee: Oleg Besedin <ob1.eclipse>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, Michael_Rennie, Mike_Wilson, pwebster, remy.suen
Version: 4.2   
Target Milestone: 4.2 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to adopt the rules currently in 3.8 none

Description Kit Lo CLA 2011-07-20 14:59:10 EDT
Build ID: I20110719-2201

Accroding to http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fbidi.html , if "-nl ar" option is used, the orientation will be right to left. And, that's how Eclipse 3.x worked.

In the current build, orientation for "-nl ar" is left-to-right. Note: orientation is switched to right-to-left when I use "-nl ar -dir rtl".
Comment 1 Eric Moffatt CLA 2011-09-06 15:24:57 EDT
Created attachment 202837 [details]
Patch to adopt the rules currently in 3.8


The E4Application first sets the value in the appContext based on whether '-dir rtl' is defined. This is for direct e4 RCP support.

Then the WorkbenchPlugin then overrides the value in the context based on the same rules as 3.8. The patch includes the application of the patch from bug 303889 to bring it up to par.
Comment 2 Eric Moffatt CLA 2011-09-06 16:02:51 EDT
I've just installed the language packs and tried out various nl settings. To me everything seems OK.

Kit, I'm going to mark this as fixed. Feel free to re-open if the management of the settings aren't what you expect.
Comment 3 Eric Moffatt CLA 2011-09-15 12:59:27 EDT
The behavior works except that 'mixed mode' (i.e. '-nl ar' with no language packs) seems to get the dialogs RTL'd but not the shell...
Comment 4 Eric Moffatt CLA 2011-12-09 11:34:00 EST
Moving to M5.
Comment 5 Michael Rennie CLA 2012-02-23 13:43:40 EST
Eric, I migrated your fix to Git form and pushed it to:

https://github.com/mrennie/eclipse.platform.ui/tree/mrennie/bug352656

While testing I did not notice the 'mixed-mode' problem you describe. When I launch with '-nl ar' (or any others that are rtl) *and* have no translation packs installed I do not get any mirroring at all - as I would expect from the fix for bug 303889.

The commit also contains a few clean-ups in WorkbenchPlugin for raw types, etc.
Comment 6 Eric Moffatt CLA 2012-04-17 14:00:08 EDT
Mike, I'm going to move this to 4.2.1. Once you get your commit rights feel free to check in the minimal change version (or the full one without adding generics)...
Comment 7 Mike Wilson CLA 2012-04-17 16:02:53 EDT
To be clear, Mike once you have commit rights, go ahead and "check in the minimal change version (or the full one without adding generics)". 

The 4.2.1 comment just meant "I'm not going to look at it again in the triaging bucket"
Comment 8 Oleg Besedin CLA 2012-04-18 11:38:04 EDT
(In reply to comment #0)
> Build ID: I20110719-2201
> 
> Accroding to
> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fbidi.html
> , if "-nl ar" option is used, the orientation will be right to left. And,
> that's how Eclipse 3.x worked.
> 
> In the current build, orientation for "-nl ar" is left-to-right. Note:
> orientation is switched to right-to-left when I use "-nl ar -dir rtl".

Kit, please make sure you have actual Bidi language packs installed. In the bug 303889 on request of Bidi team we changed default orientation to remain LTR if Bidi language packs are not present.

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