Bug 224369 - BIDI3.4:HCG Inconsistent display of Voltage positive node (V+)
Summary: BIDI3.4:HCG Inconsistent display of Voltage positive node (V+)
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-27 10:07 EDT by Helena Halperin CLA
Modified: 2008-04-01 03:45 EDT (History)
6 users (show)

See Also:


Attachments
positive voltage (74.78 KB, image/png)
2008-03-27 10:08 EDT, Helena Halperin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helena Halperin CLA 2008-03-27 10:07:21 EDT
Build ID: Integration build ID I20080324-1005

Steps To Reproduce:
1. Install:  - Eclipse SDK with NL Bidi package
2.  Run mirrored Eclipse with Hebrew translation (use command line argument -nl iw)
3. Create a simple project in the workspace
4. Go to File->Example…->Logic Diagram. Next. Finish
5. Drag the Voltage positive node (V+)  from the palette to the editor.
6. Expand voltage options in the palette
7. Inspect V+ display in opened views: editor, palette, outline

Expected result: Positive voltage should be displayed V+
Actual result: Positive voltage is displayed V+ and +V


More information:
Comment 1 Helena Halperin CLA 2008-03-27 10:08:34 EDT
Created attachment 93799 [details]
positive voltage
Comment 2 Anthony Hunter CLA 2008-03-27 11:34:02 EDT
This is a specific issue with the string "V+". The same issue occurs when you enter you enter the string "V+" into a text field in rtl mode on a GMF (GEF) based diagram, "+V" is displayed.

The string is persisted as "V+".

Interestingly that is you enter "+V", it also gets flipped on the diagram back to "V+".

I traced the code and the BiDi processor is creating two fragments "V" and "+" and flipping them. I am not sure we want to look at changing this, as the processing must be there for a reason. Can we confirm that this is a bug?
 
The problem also occurs on Windows.
Comment 3 Pratik Shah CLA 2008-03-27 17:27:18 EDT
(In reply to comment #2)
>Can we confirm that this is a bug?

It seems the menu shows it correctly, so maybe it is a bug, but I am not sure.  Helena, can you test with another app or with SWT's StyledText?  What does the direct-edit cell-editor do?
Comment 4 Helena Halperin CLA 2008-03-31 08:43:08 EDT
Looks like right to left text direction in controls that display +V.
Please try to change the base text direction of string to LTR, using TextProcessor. According to TextProcessor implementation (https://bugs.eclipse.org/bugs/attachment.cgi?id=34133) when there is at least one token found the string is wrapped with LRE on the left side and PDF on the right side. TextProcessor should be used in the following way:
For V+:   str = TextProcessor (str, "+") 
Comment 5 Randy Hudson CLA 2008-03-31 11:11:39 EDT
(In reply to comment #4)
> Looks like right to left text direction in controls that display +V.
> Please try to change the base text direction of string to LTR, using
> TextProcessor. According to TextProcessor implementation
> (https://bugs.eclipse.org/bugs/attachment.cgi?id=34133) when there is at least
> one token found the string is wrapped with LRE on the left side and PDF on the
> right side. TextProcessor should be used in the following way:
> For V+:   str = TextProcessor (str, "+") 

But the same string is being displayed in both the Menu and the Palette. However, one is being rendered by GTK, the other using icu4j. The real problem is that the results are not consistent. We should fix the problem, not avoid it by inserting bidi control characters.
Comment 6 Tomer Mahlin CLA 2008-04-01 03:45:36 EDT
  I just wnated to make sure everybody understand what the expected display is, such that the efforts to resolve the issue are applied in the right direction.
  The expected display is: V+