hanbyul-crew / processing

'플롯셋싱' 프로세싱 텍스트 에디터 한글 입력 버그 해결을 위한 저장소
Other
0 stars 0 forks source link

Editor 클래스 분석 결과 #1

Open wonderino opened 11 years ago

wonderino commented 11 years ago

프로세싱의 TextArea가 JEditTextArea임 https://github.com/hanbyul-crew/processing/blob/master/app/src/processing/app/Editor.java

이게 JEdit Syntax 프로젝트에서 왔다고 함. protected JEditTextArea textarea;

해당 부분은 이거 https://github.com/hanbyul-crew/processing/blob/master/app/src/processing/app/syntax/JEditTextArea.java


processing.app.syntax.JEditTextArea

The text area component from the JEdit Syntax (syntax.jedit.org) project. This is a very early version of what later was completely rewritten and become jEdit (jedit.org). Over the years we've also added minor features for use with Processing (notably mouse wheel support and copyAsHTML). [fry]

jEdit's text area component. It is more suited for editing program source code than JEditorPane, because it drops the unnecessary features (images, variable-width lines, and so on) and adds a whole bunch of useful goodies such as:

More flexible key binding scheme Supports macro recorders Rectangular selection Bracket highlighting Syntax highlighting Command repetition Block caret can be enabled It is also faster and doesn't have as many problems. It can be used in other applications; the only other part of jEdit it depends on is the syntax package. To use it in your app, treat it like any other component, for example:

JEditTextArea ta = new JEditTextArea();
 ta.setTokenMarker(new JavaTokenMarker());
 ta.setText("public class Test {\n"
     + "    public static void main(String[] args) {\n"
     + "        System.out.println(\"Hello World\");\n"
     + "    }\n"
     + "}");

Author: Slava Pestov


processing.app.syntax.JEditTextArea 클래스에

private InputMethodSupport inputMethodSupport = null;

라는 부분이 있군요 https://github.com/hanbyul-crew/processing/blob/master/app/src/processing/app/syntax/im/InputMethodSupport.java

processing.app.syntax.im.InputMethodSupport

Support in-line Japanese input for PDE. (Maybe Chinese, Korean and more) This class is implemented by Java Input Method Framework and handles If you would like to know more about Java Input Method Framework, Please see http://java.sun.com/j2se/1.5.0/docs/guide/imf/ This class is implemented to fix Bug #854. http://dev.processing.org/bugs/show_bug.cgi?id=854

Author: Takashi Maekawa (takachin@generative.info)

뭔가 해결의 실마리가 될 부분인 것 같습니다.


위의 InputMethodSupport의 키고끔을 프로세싱 'preference' 창에서 [] Enable complex text input(i.e. Japanese, requires restart of Processing) 이라는 체크박스를 통해 조작할 수 있습니다.

프로세싱 // what we want to see
ㅍㅡㄹㅗㅅㅔㅅㅣㅇ // after turning off the check box
플롯셋싱 // after turning on the check box

으로 나오는 상황


wonderino commented 11 years ago

https://developer.apple.com/search/index.php?q=java

wonderino commented 11 years ago

프로세싱 자바 버젼

http://wiki.processing.org/w/Supported_Platforms#Java_Versions Java Versions

Java 1.6 (or "Java 6") is required to run the 2.0 version of the Processing Development Environment and projects created with it. If you get an UnsupportedClassVersionError when using a library or other Java code, that means the code was compiled for a later version of Java than is supported by Processing. Recompile this code and set the 'target' to an earlier Java release (1.6 or earlier should do fine) and you'll be all set. Java 7 We're not sure when we'll be supporting Java 7. At the end of February 2013, Java 6 will be hitting end-of-life status, which means that no further updates to Java 6 will be made by Oracle. A few notes on the status of Java 7 support: Java 7 on the Mac is pretty mediocre when compared to Apple's 1.6 implementation, and it doesn't support retina displays. So we will probably stick with 1.6 on OS X for a while. Also, Apple doesn't support 1.7 on OS X 10.6, which is probably a third of our OS X users. Supporting 10.6 and 10.8, for 32- and 64-bits is already a freaking nightmare. Adding 1.7 to the mix (since we'd need to keep 1.6 support/testing as well) is impossible without additional help. The security updates that are being discontinued for Java 6 have a lot more to do with applets in the browser than with local applications like Processing. If we were supporting applets or JNLP-launched applications, it would definitely be a concern. Also, because we don't have an installer that places java.exe in a usable generic location on folks' machines, that means it shouldn't be possible to use Processing as an attack vector for Java-related attacks. All that being said, we're putting a lot of effort into working toward supporting Java 7 because the writing is on the wall: we need to move to 7 eventually. The Experimental Mode work is part of that, and Manindra is doing some additional hacking based on what he learned there to help make the transition possible.

wonderino commented 11 years ago

java 1.6 에서 Input Method Framework는 아래의 링크를 참조 http://docs.oracle.com/javase/6/docs/technotes/guides/imf/overview.html http://docs.oracle.com/javase/6/docs/technotes/guides/imf/

wonderino commented 11 years ago

public class CompositionTextManager extends java.lang.Object

This class Manage texts from input method by begin-process-end steps. First, if a user start inputing via input method, beginCompositionText is called from InputMethodSupport. Second, the user continues from input method, processCompositionText is called and reflect user inputs to text area. Finally the user try to commit text, endCompositionText is called.

http://processing.org/reference/javadoc/everything/processing/app/syntax/im/CompositionTextManager.html

wonderino commented 11 years ago

java 1.7 input method framework도 참조 http://docs.oracle.com/javase/7/docs/technotes/guides/imf/