java - Can the Spell Checker Framework used for code hinting? -


i looking @ spell checker framework , wondering if can use implement code hinting in app. can implement custom 'code' dictionary? wondering if possible approach code completion before embarking.

good code completion (in personal opinion) context sensitive , should show completions things in scope , applicable current position within code. example, in java doesn't make sense show method name completions outside of method. makes sense plain spell checking against english language dictionary code comments, not method , variable names, etc.

if want functional code editor think need come own editor (e.g., not use textview per se) , own completions, perhaps using system spell checker api spell check code comments. might want @ source code textview.java , editor.java ideas on how implement own code editor , completion ui @ editor level (maybe in conjunction other open source code editors).

if needs relatively simple might able by adding spans of type suggestionspan text in textview (this spell checker does) completion info.

the spelling framework designed check 1 or more words against dictionary without regard context. (see spellcheckersession. don't lot of context.)

another thing: while actively composing text (entering word) completions handled input method, shows completions (usually) in word choice list in soft input area. don't want completions/suggestions since input method handles completions editor types defined inputtype , if try spoof editor as, say, plain text, less ideal results. in case want handle completions in editor (sort of way textview handles suggestions when tapping on misspelled words) , ensure editor disables ime suggestions via type_text_flag_no_suggestions (which disables spell checker well). guess write input method go along editor if ambitious.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -