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

Bug 515877

Summary: GVT47: (Bidi) When "Show in Console", log information can't be properly mirrored for BiDi languages
Product: [Eclipse Project] Platform Reporter: Sharp Yang <yxiaobo>
Component: IDEAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, kitlo, kqli, sharonc, tomerm, wajnberg, yxiaobo
Version: 4.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
log don't mirror from clicking "Shown In Console"
none
Log is mirrored when run directly none

Description Sharp Yang CLA 2017-04-27 02:37:29 EDT
Created attachment 268026 [details]
log don't mirror from clicking "Shown In Console"

Build ID: I20170308-2000

Prerequisite: 
1. Click Window -> Preference -> General -> Globalization
2. Set "Right to lift" for "Graphical layout direction" and "Text direction"

Steps to reproduce:
1. Open the "Erro Log" View tab (Tool bar: Windows -> Show View)
2. Right click in the "Erro Log" View from one error item
3. Click "Show In Console" from the option list
4. Navigate to Console view tab and show the log details.

Problem Description:
The log text information can't be properly mirrored for BiDi languages.
If you run directly a problem java code, the log in Console display as RTL, see the attachment. 

Expected Result:
The text information can be mirrored from "Shown In Console" under bidi locale.
Comment 1 Sharp Yang CLA 2017-04-27 02:38:18 EDT
Created attachment 268027 [details]
Log is mirrored when run directly
Comment 2 Dani Megert CLA 2017-04-27 05:08:48 EDT
This is expected. See bug 227871 for details.

*** This bug has been marked as a duplicate of bug 227871 ***
Comment 3 Tomer Mahlin CLA 2017-04-27 05:35:22 EDT
@Dani, I think the solution in bug 227871 was to set orientation to LTR. This does not happen in case of this particular defect. Namely the image in comment #1 shows  LTR oriented console. 

By the way as I originally pointed out in bug 227871 in general case, just setting orientation of console to LTR won't be enough. Each row should be prepossessed using BidiUtils.applyBidiProcessing
Comment 4 Dani Megert CLA 2017-04-27 05:56:10 EDT
(In reply to Tomer Mahlin from comment #3)
> @Dani, I think the solution in bug 227871 was to set orientation to LTR.
> This does not happen in case of this particular defect. Namely the image in
> comment #1 shows  LTR oriented console. 

You probably wanted to say "RTL".

That's expected as bug 227871 is not completely fixed. We only fixed the stacktrace console as per bug 227871 comment 12.
Comment 5 Tomer Mahlin CLA 2017-04-27 07:00:12 EDT
No, I meant LTR. Your patch in bug 227871 includes following code change: 
    getTextWidget().setOrientation(SWT.LEFT_TO_RIGHT);
Comment 6 Tomer Mahlin CLA 2017-04-27 07:00:25 EDT
No, I meant LTR. Your patch in bug 227871 includes following code change: 
    getTextWidget().setOrientation(SWT.LEFT_TO_RIGHT);
Comment 7 Dani Megert CLA 2017-04-27 08:27:27 EDT
(In reply to Tomer Mahlin from comment #5)
> No, I meant LTR. Your patch in bug 227871 includes following code change: 
>     getTextWidget().setOrientation(SWT.LEFT_TO_RIGHT);

Sorry I don't get your point. The image from comment 1 *is* mirrored. Bug 227871 is to have the Console LTR, and that's what we did for the stacktrace console. Now this bug complains about this.
Comment 8 Tomer Mahlin CLA 2017-04-27 08:50:58 EDT
(In reply to Dani Megert from comment #7)
> (In reply to Tomer Mahlin from comment #5)
> > No, I meant LTR. Your patch in bug 227871 includes following code change: 
> >     getTextWidget().setOrientation(SWT.LEFT_TO_RIGHT);
> 
> Sorry I don't get your point. The image from comment 1 *is* mirrored. Bug
> 227871 is to have the Console LTR, and that's what we did for the stacktrace
> console. Now this bug complains about this.

I think you misunderstood the image in comment #1. The overall GUI is mirrored. The expectation for the log file orientation is to be LTR. However on image in comment #1 it appears RTL. The blue arrow pointing to the left indicates that log should have LTR orientation.
Comment 9 Dani Megert CLA 2017-04-27 09:36:43 EDT
(In reply to Tomer Mahlin from comment #8)
> (In reply to Dani Megert from comment #7)
> > (In reply to Tomer Mahlin from comment #5)
> > > No, I meant LTR. Your patch in bug 227871 includes following code change: 
> > >     getTextWidget().setOrientation(SWT.LEFT_TO_RIGHT);
> > 
> > Sorry I don't get your point. The image from comment 1 *is* mirrored. Bug
> > 227871 is to have the Console LTR, and that's what we did for the stacktrace
> > console. Now this bug complains about this.
> 
> I think you misunderstood the image in comment #1. The overall GUI is
> mirrored. The expectation for the log file orientation is to be LTR. However
> on image in comment #1 it appears RTL. The blue arrow pointing to the left
> indicates that log should have LTR orientation.

I know. Let me try to explain once again. There is not ONE Console view. Each type that logs to it is a separate implementation as said in  bug 227871. As I tried to explain, we fixed the stacktrace console. This bug wrongly asks to make that RTL again. The picture from comment 1 is the Java console. As I also said before in comment 4,  bug 227871 is not fixed yet, that's why the Java console is not fixed yet. I hope you understand now.
Comment 10 Sharp Yang CLA 2017-04-27 22:56:00 EDT
@Dani, In summary, the log display from clicking "Show In Console"should be LTR (which you said 'This is expected'). On the contrary, the image from comment 1 (Java consloe log)is an real issue which is logged as not fixed yet in bug 227871? So this is a duplicate bug, right?
Comment 11 Dani Megert CLA 2017-04-28 03:50:02 EDT
(In reply to Sharp Yang from comment #10)
> @Dani, In summary, the log display from clicking "Show In Console"should be
> LTR (which you said 'This is expected'). On the contrary, the image from
> comment 1 (Java consloe log)is an real issue which is logged as not fixed
> yet in bug 227871? So this is a duplicate bug, right?

Correct.