readd saveCurrentFile

pull/5370/head
yann300 4 years ago
parent ae97092466
commit 1c866004bc
  1. 2
      apps/remix-ide/src/app/files/fileManager.js
  2. 4
      apps/solidity-compiler/src/app/compiler-api.ts
  3. 1
      libs/remix-lib/src/types/ICompilerApi.ts
  4. 2
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts

@ -22,7 +22,7 @@ const profile = {
icon: 'assets/img/fileManager.webp',
permission: true,
version: packageJson.version,
methods: ['file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath'],
methods: ['file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath', 'saveCurrentFile'],
kind: 'file-system'
}
const errorMsg = {

@ -140,6 +140,10 @@ export const CompilerApiMixin = (Base) => class extends Base {
return this.call('fileManager', 'open', fileName)
}
saveCurrentFile () {
return this.call('fileManager', 'saveCurrentFile')
}
resetResults () {
this.currentFile = ''
this.contractsDetails = {}

@ -32,6 +32,7 @@ export interface ICompilerApi {
writeFile: (file: string, content: string) => Promise<void>
readFile: (file: string) => Promise<string>
open: (file: string) => void
saveCurrentFile: () => void
logToTerminal: (log: terminalLog) => {}

@ -121,7 +121,7 @@ export class CompileTabLogic {
}
}
// TODO readd saving current file
// this.api.saveCurrentFile()
this.api.saveCurrentFile()
this.event.emit('removeAnnotations')
var currentFile = this.api.getAppParameter('currentFile')
return this.compileFile(currentFile)

Loading…
Cancel
Save