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)  ### 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 3022bffcbd0c4366e348e0757c13c5e142083935 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:33:30Z Define InterpreterCompletion structure to thrift file commit c1bf04afebc44203634d65e7d4d6fa6199c139dc Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:33:56Z Change v -> v.name & v.value in front commit fb14dc53c742bfc0d99f7eb1d3d7ad71545a3486 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:36:28Z Add automatically generated thrift class commit 09e0d29df3922497ff44d62d14fa1773dceda834 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:37:22Z Apply new InterpreterCompletion class under zeppelin-interpreter/ commit 582b9faf8a75b241b3a77c2390dc4d7f12891a93 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:37:43Z Apply new InterpreterCompletion class under zeppelin-server/ commit 769fd49ec042b0b07995e91516867eecd1e6bf45 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:38:03Z Apply new InterpreterCompletion class under zeppelin-zengine/ commit 903525e82a8f050591c64c3d20951657963771ae Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T16:38:38Z Apply new InterpreterCompletion class to all interpreter class files commit 2dead3e72a1a2187e43ea057ca1ee8ddf8fb92ed Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-09T17:31:49Z Change return type commit f4a4a4e1f909d6d9da4c5194f38f4efd123bf3cd Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T00:35:17Z Fix type casting error in SparkInterpreter commit 7e662da45dedd14e627a9f02d42abe202bac23fc Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T00:54:21Z Remove console.log commit 0444804911e22c72a4d170c31bf944b154b0b435 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T03:07:29Z Fix travis error commit 9eeda0218968993e87514a70cf95ea5314fd351b Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T17:20:12Z Remove abstract and make it return null by default commit 3777a41bb52359516375dc6239cd794ba13d79ba Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T17:22:06Z Address @jongyoul review commit 3c6fd26cb956bfb33706dc2c2581e567bab8dfb6 Author: AhyoungRyu <fbdkdu...@hanmail.net> Date: 2016-06-10T18:03:12Z Address @minalee feedback ---- --- 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. ---