[ZEPPELIN-1026] set syntax highlight based on default bound interpreter#1415
[ZEPPELIN-1026] set syntax highlight based on default bound interpreter#1415minahlee wants to merge 10 commits intoapache:masterfrom
Conversation
9bc9e88 to
d50ba38
Compare
|
CI is green, ready for review. |
| "description": "Property 2 description" | ||
| }, ... | ||
| }, | ||
| "editor": { |
There was a problem hiding this comment.
Quick question - it's a bit not clear if this section is mandatory and if not, what is going to be the default one? May be it could be described in docs below.
Asking as there are i.e PRs that implement a new interpreters, before this section was introduced.
There was a problem hiding this comment.
Good point! If the language is not specified plain text mode will be used for syntax highlight, which will highlight nothing. I added description in fd7896e. Thanks for review :)
|
Looks great to me. |
| return factory.getInterpreter(getId(), name); | ||
| } | ||
|
|
||
| public Map<String, Object> getEditorSetting(String replName) { |
There was a problem hiding this comment.
I think this method is more make sense to be placed in InterpreterFactory, while editor setting is related interpreter and interpreter setting, not each note. What do you think?
There was a problem hiding this comment.
@Leemoonsoo It totally makes sense, I made change in e810da4. Please review.
69fc151 to
e810da4
Compare
|
@minahlee Great work! LGTM |
ed2f473 to
aa5eb2f
Compare
…ont-end <-> back-end communication
aa5eb2f to
c66fb0e
Compare
|
Merge if there is no more discussion |
What is this PR for?
This is complete work of #1148. Comments and tasks on #1148 has been handled in this PR.
interpreter-setting.json%replNamein paragraph, back-end check if the interpreter name withreplNameexists, and return language information to front-end if it does%replName, default interpreter's language will be usedWhat type of PR is it?
[Bug Fix | Improvement]
What is the Jira issue?
ZEPPELIN-1026
How should this be tested?
Screenshots (if appropriate)
Case 1. When the default interpreter set to python interpreter.
Before

Has
scalaas syntax highlight language when %python is not set.After

Has
pythonas syntax highlight language even when %python is not set.Case 2. When use alias name as repl name.
Before

After

Further possible improvements
There are still several cases that Zeppelin doesn't handle syntax highlight well. These can be handled with another jira ticket/PR.
Questions: