Commit a7fc92dd authored by yann300's avatar yann300

remove use of fileProviderOf in compiler UI

parent 1d5e2e02
...@@ -86,17 +86,12 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => { ...@@ -86,17 +86,12 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => {
setClose(true) setClose(true)
} }
const _errorClick = (errFile, errLine, errCol) => { const _errorClick = async (errFile, errLine, errCol) => {
if (errFile !== plugin.getAppParameter('currentFile')) { if (errFile !== plugin.getAppParameter('currentFile')) {
// TODO: refactor with this._components.contextView.jumpTo // TODO: refactor with this._components.contextView.jumpTo
const provider = plugin.fileProviderOf(errFile) if (await plugin.fileExists(errFile)) {
if (provider) {
provider.exists(errFile).then(() => {
plugin.open(errFile) plugin.open(errFile)
plugin.call('editor', 'gotoLine', errLine, errCol) plugin.call('editor', 'gotoLine', errLine, errCol)
}).catch(error => {
if (error) return console.log(error)
})
} }
} else { } else {
plugin.call('editor', 'gotoLine', errLine, errCol) plugin.call('editor', 'gotoLine', errLine, errCol)
......
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