diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index cb0773b2b0..038458e87d 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -33,7 +33,7 @@ const profile = { location: 'sidePanel', documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html', version: packageJson.version, - methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig'] + methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig', 'compileFile'] } @@ -508,6 +508,21 @@ class CompileTab extends ViewPlugin { onActivation () { this.call('manager', 'activatePlugin', 'solidity-logic') this.listenToEvents() + this.call('filePanel', 'registerContextMenuItem', { + id: 'solidity', + name: 'compileFile', + label: 'Compile', + type: [], + extension: ['.sol'], + path: [], + pattern: [] + }) + } + + compileFile (event) { + if (event.path.length > 0) { + this.compileTabLogic.compileFile(event.path[0]) + } } onDeactivation () { diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index be7e405499..bdf361e8c9 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -130,7 +130,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { row = location.start.line column = location.start.column locationString = row + 1 + ':' + column + ':' - fileName = Object.keys(lastCompilationResult.contracts)[file] + fileName = Object.keys(lastCompilationResult.sources)[file] } warningCount++ const msg = message(item.name, item.warning, item.more, fileName, locationString) diff --git a/package-lock.json b/package-lock.json index c942a158c0..2de36d2f31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.14.0-dev", + "version": "0.15.0-dev", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a01e2a6346..868b32492d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.14.0-dev", + "version": "0.15.0-dev", "license": "MIT", "description": "Ethereum Remix Monorepo", "keywords": [