Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 178081 - [Import/Export] BIDI3.3:<HCG:Dir\File path appear in RTL order instead of LTR order>
Summary: [Import/Export] BIDI3.3:<HCG:Dir\File path appear in RTL order instead of LTR...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.4 M6   Edit
Assignee: Markus Keller CLA
QA Contact: Daniel Rolka CLA
URL:
Whiteboard:
Keywords: nl
: 234632 273926 392284 (view as bug list)
Depends on: 274829 230854 427794
Blocks:
  Show dependency tree
 
Reported: 2007-03-19 12:00 EDT by Tamir Noach CLA
Modified: 2014-03-03 13:23 EST (History)
18 users (show)

See Also:


Attachments
Undesired order of File path in the text box. (40.35 KB, image/pjpeg)
2007-05-01 05:37 EDT, Tamir Noach CLA
no flags Details
Patch v01 (8.95 KB, patch)
2010-05-10 02:03 EDT, Prakash Rangaraj CLA
markus.kell.r: review-
Details | Diff
Import wizard (26.21 KB, image/png)
2013-09-23 10:52 EDT, Daniel Rolka CLA
no flags Details
Export wizard (35.95 KB, image/png)
2013-09-23 10:52 EDT, Daniel Rolka CLA
no flags Details
Run as dialog (40.65 KB, image/png)
2013-09-23 10:58 EDT, Daniel Rolka CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamir Noach CLA 2007-03-19 12:00:29 EDT
Build ID: Ver 3.3

Steps To Reproduce:
Build ID: Version 3.3

Steps To Reproduce:
Note: Treat Caps Lock latin letters as BiDi (Hebrew/Arabic) letters.
Also, this defect is relevant when eclipse is being run with -dir rtl.
The defect is relevant to each window that perform the following operations :Open File,Import,Export,Browse...,Save As,New etc'.
For instance we describe an Import files from Dir path which contain BIDI Dir names.

1.Run eclipse with -dir rtl flag.
2.Create a simple project in your workspace.
3.Go to "File -> Import... -> FileSystem" and Browse a path as suggested above. e.g:
c:\ies\ABC\DEF\test.txt

Actual Result: test.txt\DEF\ABC\c:\ies

Expected Result:c:\ies\ABC\DEF\test.txt





More information:
More information:
Even though the directionality of eclipse is RTL, the user would like to see the File path and names in LTR order,which is the natural order.
Also those widget better have Left alignment
Comment 1 Tamir Noach CLA 2007-03-20 06:19:23 EDT
Dear developers.
There is another issue we need to discuss regarding this defect.
We divide it into two categories:

1. The one with less severity.
When we run eclipse with -dir rtl and we choose the dir/file/arguments or any complex expression which involve the \,-,.,(,) special characters, we don't see it as we want too. 
e.g :Workspace Data. Go to Run..-> Run->Main Tab. We don't see the complex expression as we want in the "Location" text box: 
Actual Res: workspace_loc}/../runtime-New_configuration}$
Exp Res: ${workspace_loc}/../runtime-New_configuration

BUT this can be fixed, by left-side Ctrl+shift keystrokes to change the alignment of the text box. So thats why this issue is less concerning.

2. This category is what we describe in the defect.
In this case the orientation of the widget canot be changed by the user, because it's a READ ONLY widget.
e.g: The file name display in the Package Explorer.
e.g: The path as displayed in the Tool Tip Text component.
Comment 2 Tamir Noach CLA 2007-03-20 10:27:28 EDT
Changing the Severity to match to BiDi criteria
Comment 3 Tod Creasey CLA 2007-04-26 16:27:47 EDT
-dir rtl will not give text processing in a non bidi Locale. Do you have this issue with -nl iw?
Comment 4 Tamir Noach CLA 2007-05-01 05:35:52 EDT
(In reply to comment #3)
> -dir rtl will not give text processing in a non bidi Locale. Do you have this
> issue with -nl iw?

This defect has been verified with eclipse-SDK-I20070430-1300 Stream Integratin Build.
when i run the defect with -nl iw flag the defect still exist.
See the attached image please.
Comment 5 Tamir Noach CLA 2007-05-01 05:37:59 EDT
Created attachment 65456 [details]
Undesired order of File path in the text box.
Comment 6 Paul Webster CLA 2009-07-06 10:46:22 EDT
I think this is the live text typing problem (does not go through text processor)

PW
Comment 7 Prakash Rangaraj CLA 2010-05-10 02:03:04 EDT
Created attachment 167658 [details]
Patch v01

Using TextProcessor to process/deprocess the text
Comment 8 Dani Megert CLA 2012-10-18 02:28:22 EDT
*** Bug 234632 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2012-10-18 02:28:55 EDT
*** Bug 392284 has been marked as a duplicate of this bug. ***
Comment 10 Dani Megert CLA 2012-10-18 02:29:12 EDT
*** Bug 273926 has been marked as a duplicate of this bug. ***
Comment 11 Dani Megert CLA 2013-09-20 11:41:13 EDT
Daniel, maybe Moshe (Moshe WAJNBERG <wajnberg@il.ibm.com>) can provide a patch. He did before for similar bugs. If not, you might want to see how he fixed similar bug 273728 and bug 404234.
Comment 12 Daniel Rolka CLA 2013-09-23 10:52:10 EDT
Created attachment 235719 [details]
Import wizard
Comment 13 Daniel Rolka CLA 2013-09-23 10:52:30 EDT
Created attachment 235721 [details]
Export wizard
Comment 14 Daniel Rolka CLA 2013-09-23 10:58:36 EDT
Created attachment 235723 [details]
Run as dialog

The import and export wizards issue seems to be fixed, see 'Import and export wizards' attachments. However there is still the issue with the location field in the 'Run as...' dialog, see 'Run as dialog' attachment

It was verified in the build: I20130918-2000

I'll investigate the location issue,
Daniel
Comment 15 Daniel Rolka CLA 2013-09-23 11:46:30 EDT
(In reply to Daniel Rolka from comment #14)
> Created attachment 235723 [details]
> Run as dialog
> 
> The import and export wizards issue seems to be fixed, see 'Import and
> export wizards' attachments. However there is still the issue with the
> location field in the 'Run as...' dialog, see 'Run as dialog' attachment
> 
> It was verified in the build: I20130918-2000
> 
> I'll investigate the location issue,
> Daniel

I've made quick investigation and it looks that the issue is connected to the 'bundleclass://org.eclipse.debug.ui/org.eclipse.debug.ui.WorkingDirectoryBlock' class that processes using the '${workspace_loc' pattern (for instance the setDefaultWorkingDir method)

I'm going to reassign this bug to the JDT component,
Daniel
Comment 16 Dani Megert CLA 2013-09-30 09:51:52 EDT
(In reply to Daniel Rolka from comment #15)
> (In reply to Daniel Rolka from comment #14)
> > Created attachment 235723 [details]
> > Run as dialog
> > 
> > The import and export wizards issue seems to be fixed, see 'Import and
> > export wizards' attachments. However there is still the issue with the
> > location field in the 'Run as...' dialog, see 'Run as dialog' attachment
> > 
> > It was verified in the build: I20130918-2000
> > 

Did you try to type into that field?

Moving back to UI since this bug is about the import/export wizards. If that's fixed then we can close it. If there's still a bug in Debug, then a new bug must be opened (if there's none already).
Comment 17 Daniel Rolka CLA 2013-09-30 12:33:50 EDT
Yes, typing in the 'From directory' and 'Into directory' fields in the import wizard works fine. So I will close the bug. For the issue reported in the  comment 1 I've opened the new bug 418366 for JDT

Daniel
Comment 18 Markus Keller CLA 2013-10-03 10:34:19 EDT
Comment on attachment 167658 [details]
Patch v01

For editable fields, org.eclipse.jface.util.BidiUtils is the only way to go. We don't use TextProcessor for that.
Comment 19 Paul Webster CLA 2013-10-03 10:42:21 EDT
We need to apply the BiDi utils.

PW
Comment 20 Markus Keller CLA 2013-10-03 10:43:32 EDT
RTL support is still broken in the Import/Export wizards. Easiest way to see that on Windows is to append "\" at the end of the "From directory" (will be rendered on the left of the path). When I type Hebrew characters on Windows, then the path is also mangled.

BidiUtils has no support for Combo at this time, since the SWT APIs are missing (bug 407927). In the import dialog, we could add processing for "Into folder" (since that's a Text), but not for the Combo (main request from comment 0).

To enable support for the new Bidi stuff, add this to the command line: -bidi "on=y;textDir=rtl" 

To see which fields are Bidi-processed, set BidiUtils.DEBUG to true. Processed fields will get a colored background and a tooltip with the structured text type.
Comment 21 Lina Kemmel CLA 2013-10-10 09:39:53 EDT
For the time being you can call org.eclipse.swt.widgets.Combo#setTextDirection(SWT.LEFT_TO_RIGHT)
- which will enforce LTR base direction on combo (the API is supported on win32 only).
Comment 22 Daniel Rolka CLA 2013-10-10 09:58:55 EDT
The issue presented by the 'Undesired order of File path in the text box' snapshot seems to be the SWT one. I've opened the Bug419143 to the SWT component for it.

The partial fix for the 'Into folder' Text widget has been pushed to Gerrit: https://git.eclipse.org/r/#/c/17269/

To apply Bidi support for Combos used in the wizard we have to have the Bug407927 fixed

Daniel
Comment 23 Paul Webster CLA 2013-10-15 14:01:46 EDT
(In reply to Daniel Rolka from comment #22)
> 
> The partial fix for the 'Into folder' Text widget has been pushed to Gerrit:
> https://git.eclipse.org/r/#/c/17269/

I've released the fix for the Into folder: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4d09b580d350e3fa5704595ed663809a5133a6da

PW