|
|
|
@ -217,6 +217,21 @@ This instance of Remix you are visiting WILL NOT BE UPDATED.\n |
|
|
|
|
Please make a backup of your contracts and start using http://remix.ethereum.org`)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function importExternal (url, cb) { |
|
|
|
|
handleImports.import(url, |
|
|
|
|
(loadingMsg) => { |
|
|
|
|
toolTip(loadingMsg) |
|
|
|
|
}, |
|
|
|
|
(error, content, cleanUrl, type, url) => { |
|
|
|
|
if (!error) { |
|
|
|
|
filesProviders[type].addReadOnly(cleanUrl, content, url) |
|
|
|
|
cb(null, content) |
|
|
|
|
} else { |
|
|
|
|
cb(error) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ----------------- Compiler -----------------
|
|
|
|
|
var compiler = new Compiler((url, cb) => { |
|
|
|
|
var provider = fileManager.fileProviderOf(url) |
|
|
|
@ -226,22 +241,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org |
|
|
|
|
if (exist) { |
|
|
|
|
return provider.get(url, cb) |
|
|
|
|
} else { |
|
|
|
|
return cb('Unable to import "' + url + '": File not found') |
|
|
|
|
importExternal(url, cb) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
handleImports.import(url, |
|
|
|
|
(loadingMsg) => { |
|
|
|
|
$('#output').append($('<div/>').append($('<pre/>').text(loadingMsg))) |
|
|
|
|
}, |
|
|
|
|
(error, content, cleanUrl, type, url) => { |
|
|
|
|
if (!error) { |
|
|
|
|
filesProviders[type].addReadOnly(cleanUrl, content, url) |
|
|
|
|
cb(null, content) |
|
|
|
|
} else { |
|
|
|
|
cb(error) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
importExternal(url, cb) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
var offsetToLineColumnConverter = new OffsetToLineColumnConverter(compiler.event) |
|
|
|
|