readd saveCurrentFile

pull/1342/head
yann300 3 years ago committed by davidzagi93@gmail.com
parent 628e4fa5ec
commit 8898acba3e
  1. 4
      apps/solidity-compiler/src/app/compiler-api.ts
  2. 1
      libs/remix-lib/src/types/ICompilerApi.ts
  3. 2
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts

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

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

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

Loading…
Cancel
Save