< prev index next >
src/java.desktop/unix/classes/sun/awt/X11InputMethodBase.java
Print this page
rev 59106 : imported patch client
*** 672,711 ****
if (xmodifiers != null) {
int imIndex = xmodifiers.indexOf("@im=");
if (imIndex != -1) {
imInfo = xmodifiers.substring(imIndex + 4);
}
- } else if (System.getProperty("os.name").startsWith("SunOS")) {
- File dtprofile = new File(System.getProperty("user.home") +
- "/.dtprofile");
- String languageEngineInfo = null;
- try {
- BufferedReader br = new BufferedReader(new FileReader(dtprofile));
- String line = null;
-
- while ( languageEngineInfo == null && (line = br.readLine()) != null) {
- if (line.contains("atok") || line.contains("wnn")) {
- StringTokenizer tokens = new StringTokenizer(line);
- while (tokens.hasMoreTokens()) {
- String token = tokens.nextToken();
- if (Pattern.matches("atok.*setup", token) ||
- Pattern.matches("wnn.*setup", token)){
- languageEngineInfo = token.substring(0, token.indexOf("setup"));
- break;
- }
- }
- }
- }
-
- br.close();
- } catch(IOException ioex) {
- // Since this method is provided for internal testing only,
- // we dump the stack trace for the ease of debugging.
- ioex.printStackTrace();
- }
-
- imInfo = "htt " + languageEngineInfo;
}
return imInfo;
}
--- 672,681 ----
< prev index next >