Commit 8e73be41 authored by yann300's avatar yann300

readd saveCurrentFile

parent 034863b9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment