Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 156775 Details for
Bug 80056
[StyledText] StyledText sets IME to Arabic when caret placed in Hebrew
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
new API for setting specific keyboard language
BidiUtil_patch.txt (text/plain), 2.03 KB, created by
Ira Fishbein
on 2010-01-21 07:21:31 EST
(
hide
)
Description:
new API for setting specific keyboard language
Filename:
MIME Type:
Creator:
Ira Fishbein
Created:
2010-01-21 07:21:31 EST
Size:
2.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java,v >retrieving revision 1.51 >diff -u -r1.51 BidiUtil.java >--- Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java 1 Jul 2009 14:50:44 -0000 1.51 >+++ Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java 21 Jan 2010 12:19:04 -0000 >@@ -70,9 +70,10 @@ > static final int ETO_CLIPPED = 0x4; > static final int ETO_GLYPH_INDEX = 0x0010; > // Windows primary language identifiers >- static final int LANG_ARABIC = 0x01; >- static final int LANG_HEBREW = 0x0d; >- static final int LANG_FARSI = 0x29; >+ public static final int LANG_ARABIC = 0x01; >+ public static final int LANG_HEBREW = 0x0d; >+ public static final int LANG_FARSI = 0x29; >+ public static final int LANG_EN = 0x09; > // code page identifiers > static final String CD_PG_HEBREW = "1255"; //$NON-NLS-1$ > static final String CD_PG_ARABIC = "1256"; //$NON-NLS-1$ >@@ -521,6 +522,28 @@ > } > } > /** >+ * Set the keyboard language to the specified language. >+ * <p> >+ * >+ * @param language integer representing language. LANG_XXX constants might be used >+ * @return true if given language was successfully set, false otherwise. >+ */ >+public static boolean setSpecificKeyboardLanguage(int langCode){ >+ if (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) >+ return false; >+ int currentLang = OS.PRIMARYLANGID(OS.LOWORD(OS.GetKeyboardLayout(0))); >+ if (currentLang == langCode) >+ return true; >+ int [] list = getKeyboardLanguageList(); >+ for (int i=0; i<list.length; i++) { >+ if (langCode == OS.PRIMARYLANGID(OS.LOWORD(list[i]))) { >+ OS.ActivateKeyboardLayout(list[i], 0); >+ return true; >+ } >+ } >+ return false; >+} >+/** > * Sets the orientation (writing order) of the specified control. Text will > * be right aligned for right to left writing order. > * <p>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 80056
: 156775