Community
Participate
Working Groups
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50727) Build Identifier: any On Windows platform one is able to change System Editor's (and not only) orientation by pressing Ctrl+RightShift/Ctrl+LeftShift. SWT Text widget due to being implemented by platform editor, sticks to this behaviour. Unfortunately SWT StyledText doesn't respect these (or any other) hot key combination, thus impeding its usability for Arabic/Hebrew customers. It worth noting in this context that eclipse Text Editor did respect these feature prior to year 2003 but such behaviour was complained after under defect 165089. Eclipse Text Editor is basd on SWT StyledText indeed, however even if the discussed behaviour has been desided to be disoraged for Text Editor, it still highly important to StyledText, on Bidi systems (i.e. system having Arabic or Hebrew keyboard installed). We are willing to contribute the code backing up discussed functionality. Reproducible: Always Steps to Reproduce: 1. Run SWT application having StyledText widget. 2. Press Ctrl+RightShift. 3. Result: Nothing happens in sense that widget's orientation doesn't chagne
IMO StyledText doesn't need to offer this behaviour. Most clients do not want switch orientation on Ctrl+Shift. Once bug 143911 is fixed, the application will be able to implement this behaviour easily using the StyledText#setOrientation(int) API. Note: only windows xp with support for left-to-right installed or windows vista with Arabic or Hebrew keyboard layout install present the behaviour described in comment 0.
The last remark isn't correct. The discussed behaviour is supported for all localized Windows OS's and by virtually all editors (not only by system editor but also by MS Word for instance). The Arabic/Hebrew customers are largely dependant on such feature.
(In reply to comment #2) > The last remark isn't correct. You missed the point. We agree that: - This behaviour is very important for bidi users - Non-bidi users do not want this behaviour We need a rule for when to enable the behaviour. BidiUtil#isBidiPlatform() is the best match we have right now, but I don't want to tell people to use BidiUtil as I want to get rid of it.
Created attachment 148674 [details] patch
With the patch StyledText will switch orientation to: left-to-right when ctrl + left_shift is pressed right-to-left when ctrl + right_shift is pressed The action only occurs during the key up of the the shift key if: - it is bidi platform (BidiUtil.isBidiPlatform()==true, win32 only) - there was no other keystroke between the keydown and the keyup of the shift key. that is important to not break any ctrl+shift+letter keybinding. The native text widget in windows follows the same rules. Dani, are you okay with this behaviour. Do you think editors will need to be able to stop this behaviour ?
>Dani, are you okay with this behaviour. Do you think editors will need to be >able to stop this behaviour ? I only see a problem for users that assign 'Ctrl+Shift' to a hover. Out of the box we don't do this, so I guess it's OK. We can add API to stop this if we detect a problem in the future.
Okay, thanks Dani. Fixed in HEAD > 20091005
I've filed bug 291949 and bug 291950 for text and Java editors. We likely need support to listen and veto direction changes.
>We likely need support to listen and veto direction changes. Agree, this would be good in order to change the direction for all widgets inside the editor. Filed bug 292056 to track this.