diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 7ebc4aface..8058a38275 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -429,7 +429,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org } // CONTENT VIEWS & DEFAULT PLUGINS - const compileTab = new CompileTab(registry.get('config').api) + const compileTab = new CompileTab(registry.get('config').api, registry.get('filemanager').api) const run = new RunTab( blockchain, registry.get('config').api, diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 4441993d34..8066128218 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -32,8 +32,9 @@ const profile = { // - methods: ['getCompilationResult'] class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerApi - constructor (config) { + constructor (config, fileManager) { super(profile) + this.fileManager this.config = config this.queryParams = new QueryParams() this.compileTabLogic = new CompileTabLogic(this, this.contentImport) @@ -87,6 +88,10 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA return super.getCompilationResult() } + getFileManagerMode () { + return this.fileManager.mode + } + /** * set the compiler configuration * This function is used by remix-plugin compiler API. diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index d0b30cec64..9a96319e9a 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -1,6 +1,6 @@ import { compile } from '@remix-project/remix-solidity' import { CompileTabLogic, parseContracts } from '@remix-ui/solidity-compiler' // eslint-disable-line -import { ConfigurationSettings } from '@remix-project/remix-lib-ts' +import type { ConfigurationSettings } from '@remix-project/remix-lib-ts' export const CompilerApiMixin = (Base) => class extends Base { currentFile: string @@ -158,10 +158,6 @@ export const CompilerApiMixin = (Base) => class extends Base { this.configurationSettings = settings } - getFileManagerMode () { - return 'browser' - } - fileExists (fileName) { return this.call('fileManager', 'exists', fileName) } diff --git a/apps/solidity-compiler/src/app/compiler.ts b/apps/solidity-compiler/src/app/compiler.ts index f003f33c76..1080bf6ff3 100644 --- a/apps/solidity-compiler/src/app/compiler.ts +++ b/apps/solidity-compiler/src/app/compiler.ts @@ -68,4 +68,8 @@ export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements setAppParameter (name, value) { localStorage.setItem(name, value) } + + getFileManagerMode () { + return 'browser' + } }