diff --git a/package.json b/package.json index 512007d912..153e7f6506 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ }, "dependencies": { "http-server-legacy": "latest", - "remix-plugin": "0.0.2-alpha.3", + "remix-plugin": "0.0.2-alpha.5", "remixd": "0.1.8-alpha.6" }, "repository": { diff --git a/src/app/components/plugin-manager-proxy.js b/src/app/components/plugin-manager-proxy.js index 1b324718cf..e356215bd8 100644 --- a/src/app/components/plugin-manager-proxy.js +++ b/src/app/components/plugin-manager-proxy.js @@ -9,9 +9,9 @@ class PluginManagerProxy { constructor () { this.event = new EventManager() this._listeners = {} - this._listeners['vyper'] = (data) => { - registry.get('compilersartefacts').api['__last'] = new CompilerAbstract(data.language, data.result, data.content) - this.event.trigger('sendCompilationResult', [data.title, data.content, data.language, data.result]) + this._listeners['vyper'] = (file, source, languageVersion, data) => { + registry.get('compilersartefacts').api['__last'] = new CompilerAbstract(languageVersion, data, source) + this.event.trigger('sendCompilationResult', [file, source, languageVersion, data]) } this._listeners['solidity'] = (file, source, languageVersion, data) => { registry.get('compilersartefacts').api['__last'] = new CompilerAbstract(languageVersion, data, source) diff --git a/src/app/editor/SourceHighlighters.js b/src/app/editor/SourceHighlighters.js index e2ea39bb76..02a426d1f6 100644 --- a/src/app/editor/SourceHighlighters.js +++ b/src/app/editor/SourceHighlighters.js @@ -19,10 +19,9 @@ class SourceHighlighters extends EditorApi { this.highlighters = {} } - highlight (lineColumnPos, filePath, hexColor) { + highlight (position, filePath, hexColor) { const { from } = this.currentRequest try { - const position = JSON.parse(lineColumnPos) if (!this.highlighters[from]) this.highlighters[from] = new SourceHighlighter() this.highlighters[from].currentSourceLocation(null) this.highlighters[from].currentSourceLocationFromfileName(position, filePath, hexColor) diff --git a/src/app/editor/sourceHighlighter.js b/src/app/editor/sourceHighlighter.js index 1991e58f84..2bd6b2fb86 100644 --- a/src/app/editor/sourceHighlighter.js +++ b/src/app/editor/sourceHighlighter.js @@ -42,20 +42,24 @@ class SourceHighlighter { this._deps.fileManager.switchFile(this.source) } - const backgoundClass = style || 'alert-info' const css = csjs` .highlightcode { position:absolute; z-index:20; + background-color: ${style || 'var(--info)'}; } .highlightcode_fullLine { position:absolute; z-index:20; opacity: 0.5; + background-color: ${style || 'var(--info)'}; + } + .customBackgroundColor { + background-color: ${style || 'var(--info)'}; } ` - this.statementMarker = this._deps.editor.addMarker(lineColumnPos, this.source, css.highlightcode + ' ' + backgoundClass) + this.statementMarker = this._deps.editor.addMarker(lineColumnPos, this.source, css.highlightcode.className + ' ' + css.customBackgroundColor.className) this._deps.editor.scrollToLine(lineColumnPos.start.line, true, true, function () {}) if (lineColumnPos.start.line === lineColumnPos.end.line) { @@ -68,7 +72,7 @@ class SourceHighlighter { line: lineColumnPos.start.line + 1, column: 0 } - }, this.source, css.highlightcode_fullLine) + }, this.source, css.highlightcode_fullLine.className) } } }