GitHub user AhyoungRyu reopened a pull request: https://github.com/apache/zeppelin/pull/984
[ZEPPELIN-982] Improve interpreter completion API ### What is this PR for? When people implement a new interpreter, they extend [interpreter.java](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java) as described in [here](https://zeppelin.apache.org/docs/0.6.0-SNAPSHOT/development/writingzeppelininterpreter.html). Among the several methods in [interpreter.java](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java), [completion API](https://github.com/apache/zeppelin/blob/master/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L109) enables auto-completion. However this API is too simple compared to other project's auto-completion and hard to add more at the moment. So for the aspect of further expansion, it would be better to separate and restructure this API before the this release( 0.6.0 ). ### What type of PR is it? Improvement ### Todos * [x] - Create new structure : `InterpreterCompletion` in `RemoteInterpreterService.thrift` and regenerate `zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/*` files * [x] - Change all existing `List<String> completion` -> `List<InterpreterCompletion> completion` * [x] - Change `paragraph.controller.js` to point real `name` and `value` ### What is the Jira issue? [ZEPPELIN-982](https://issues.apache.org/jira/browse/ZEPPELIN-982) ### How should this be tested? Since this improvement is just API change, it should work same as before. So after applying this patch, and check whether auto-completion works well or not. Use `. + ctrl` for auto-completion. For example, ``` %spark sc.version ``` When after typing `sc.` and pushing `. + ctrl` down, `version` should be shown in the auto-completion list. ### Screenshots (if appropriate) ![auto_completion](https://cloud.githubusercontent.com/assets/10060731/15952521/72937782-2e76-11e6-8246-4faf0dd77a5b.gif) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No You can merge this pull request into a Git repository by running: $ git pull https://github.com/AhyoungRyu/incubator-zeppelin ZEPPELIN-982 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/984.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #984 ---- commit b12b056fbee3030e002a9109f80611ca6ed1d851 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:33:30Z Define InterpreterCompletion structure to thrift file commit c42f3b51131aaaf99d17c9046e396b08cf3320d3 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:33:56Z Change v -> v.name & v.value in front commit e36c2d4f426c944eed43550921bf234fcfb4f05f Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:36:28Z Add automatically generated thrift class commit c67a16896f9dcced6102c3b258dc8e2b381e7cbf Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:37:22Z Apply new InterpreterCompletion class under zeppelin-interpreter/ commit 6e8340ddca8a0885c130387e9571f73402b3d877 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:37:43Z Apply new InterpreterCompletion class under zeppelin-server/ commit f93b7c2e0b21a600567dab8d7dbe4763bea52f03 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:38:03Z Apply new InterpreterCompletion class under zeppelin-zengine/ commit eeb5cf3f549c0de09628b26fc54dcb305c722b86 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:38:38Z Apply new InterpreterCompletion class to all interpreter class files commit 936e6fbfbddfacc88f7ada38998b87f2ec5b757e Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T17:31:49Z Change return type commit 476181286f00cbc3d800751f404ab37a2a35ef6f Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T00:35:17Z Fix type casting error in SparkInterpreter commit b4e2e9f7f9c5bd3861efaf93516367a5a10d8119 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T00:54:21Z Remove console.log commit 559059d2622ee4d99de1bdfad1fb37b65dc9805c Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T03:07:29Z Fix travis error ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---