mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
review feedback
This commit is contained in:
parent
036b0f6aa7
commit
361429e15c
5 changed files with 17 additions and 18 deletions
|
@ -18,9 +18,7 @@ export function initializeInput($el, $actionsEl, $copyAsCurlEl, output) {
|
|||
|
||||
// this may not exist if running from tests
|
||||
let appSense = uiModules.get('app/sense');
|
||||
if (appSense.setupResizeCheckerForRootEditors) {
|
||||
appSense.setupResizeCheckerForRootEditors($el, input, output);
|
||||
}
|
||||
appSense.setupResizeCheckerForRootEditors($el, input, output);
|
||||
|
||||
input.autocomplete = new Autocomplete(input);
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ var Mode = function () {
|
|||
this.$behaviour = new CstyleBehaviour();
|
||||
this.foldingRules = new CStyleFoldMode();
|
||||
this.createModeDelegates({
|
||||
"script-": ScriptMode
|
||||
});
|
||||
"script-": ScriptMode
|
||||
});
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
@ -36,9 +36,7 @@ oop.inherits(Mode, TextMode);
|
|||
this.getNextLineIndent = function (state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
|
||||
if (state == "string_literal") {
|
||||
// noop
|
||||
} else {
|
||||
if (state !== "string_literal") {
|
||||
var match = line.match(/^.*[\{\(\[]\s*$/);
|
||||
if (match) {
|
||||
indent += tab;
|
||||
|
|
|
@ -12,7 +12,7 @@ var AceTokenizer = acequire("ace/tokenizer").Tokenizer;
|
|||
var ScriptHighlightRules = require("./script_highlight_rules").ScriptHighlightRules;
|
||||
|
||||
|
||||
var ScriptMode = function () {
|
||||
export var ScriptMode = function () {
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
this.$behaviour = new CstyleBehaviour();
|
||||
this.foldingRules = new CStyleFoldMode();
|
||||
|
@ -20,9 +20,6 @@ var ScriptMode = function () {
|
|||
oop.inherits(ScriptMode, TextMode);
|
||||
|
||||
(function () {
|
||||
// this.getCompletions = function (editor, session, pos, prefix) {
|
||||
// return [];
|
||||
// };
|
||||
|
||||
this.HighlightRules = ScriptHighlightRules;
|
||||
|
||||
|
@ -62,5 +59,3 @@ oop.inherits(ScriptMode, TextMode);
|
|||
|
||||
|
||||
}).call(ScriptMode.prototype);
|
||||
|
||||
module.exports.ScriptMode = ScriptMode;
|
||||
|
|
|
@ -4,10 +4,10 @@ let oop = ace.require("ace/lib/oop");
|
|||
let TextHighlightRules = ace.require("ace/mode/text_highlight_rules").TextHighlightRules;
|
||||
|
||||
let painlessKeywords = (
|
||||
"def|int|long|byte|String|new|null|for|if|return|ctx"
|
||||
"def|int|long|byte|String|float|double|char|null|if|else|while|do|for|continue|break|new|try|catch|throw|this|instanceof|return|ctx"
|
||||
);
|
||||
|
||||
var ScriptHighlightRules = function () {
|
||||
export var ScriptHighlightRules = function () {
|
||||
this.name = "ScriptHighlightRules";
|
||||
this.$rules = {
|
||||
"start": [
|
||||
|
@ -62,5 +62,4 @@ var ScriptHighlightRules = function () {
|
|||
]
|
||||
}
|
||||
};
|
||||
oop.inherits(ScriptHighlightRules, TextHighlightRules);
|
||||
module.exports.ScriptHighlightRules = ScriptHighlightRules;
|
||||
oop.inherits(ScriptHighlightRules, TextHighlightRules);
|
|
@ -1,5 +1,14 @@
|
|||
require('ace');
|
||||
|
||||
const module = require('ui/modules').get('app/sense');
|
||||
|
||||
module.run(function (Private, $rootScope) {
|
||||
module.setupResizeCheckerForRootEditors = ($el, ...editors) => {
|
||||
// mock the resize checker
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
require('ui/chrome')
|
||||
.setRootTemplate(require('./index.html'))
|
||||
.setRootController(function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue