| Summary: | [typing][BiDi] BIDI3.6_BDL: Wrong behavior of JavaEditor when typing parenthesis with active keyboard Hebrew | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ira Fishbein <fira> | ||||
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P5 | CC: | camle, daniel_megert, fira, kitlo, Lina.Kemmel, pwebster, sadir, tomerm | ||||
| Version: | 3.6 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 162720 [details]
parenthesis in JavaEditor
When I try to reproduce it, it inserts a '*' when typing '(' and a ')' when typing ')'. Guess that's because I have a different keyboard (yes, I switched to Hebrew input ;-).
Also verified in older versions: this never worked so far.
Lina, would you be willing to take a look?
Hi, This transformation (i.e. character mirroring, a.k.a. symmetric swapping) is provided on the OS level (input method). When the keyboard language is a Bidi language, character received from the OS is already mirrored (swapped). This behavior can be observed in a regular notepad: 1. Open an LTR notepad and type English characters 'abc'. 2. Switch keyboard language to Hebrew. 3. Type opening curly bracket and then opening square bracket. Result: 'abc}]' I.e. "mirrorable" characters typed on a Hebrew keybiard get mirrored - even though their resolved direction is LTR (notice that their relative order in display matches the typing sequence). This transformation occurs not on display level - mirrored characters are introduced to the "buffer". I don't think that this feature should be treated as a problem. User can still input any desired character. E.g. for opening bracket: - by switching keyboard language to non-Bidi and typing the opening bracket, - by typing a closing bracket (which Bidi users actually use to do when typing regular Bidi text..) I agree. If it comes from the OS then there's not much we can here. Although it comes from OS, I still believe there is something that can be done. For example, when keyPressed event accures, if current language is Bidi, parenthesis might be switched. When Bidi users type regular Bidi text, it is typed from right to left and therefore it makes sence to type closing parenthesis instead of an opening one. In this case, the 'icon' on the keyboard is identical to the displayed character. In JavaEditor the situation is different, the 'icon' on the keyboard is different from the displayed character. Patch would be welcome. Sorry, I think we should not violate the default Windows keyboard mapping.. Symbols displayed on the keyboard keys for mirrrorable characters mismatch the glyphs seen on display indeed (which happens either in LTR or RTL direction BTW), however keyboards are not Windows-centric and thus do not reflect Windows specifics. I also tend to agree with Lina. . |
Build Identifier: 3.6.0 - I20100313-1044 1. Open Eclipse, create Java project and java class inside the project 2. When current keyboard is set to Hebrew, type (upper case – Hebrew characters): private void ABC 3. now try to add empty parenthesis – ( ) type '(' -> it will be displayed as ')' type ')' -> it will add '( )' the result will look like: )() Note: The same problem exists with curly brackets - {} and square brackets[] Reproducible: Always