Merge pull request #1984 from ethereum/issue#1978-switch_file

Update Vyper Plugin, and enables switch file for FileManager
pull/3094/head
yann300 6 years ago committed by GitHub
commit 29d2910604
  1. 2
      package.json
  2. 7
      src/app/files/fileManager.js
  3. 8
      src/remixAppManager.js

@ -67,8 +67,8 @@
"yo-yoify": "^3.7.3"
},
"dependencies": {
"remix-plugin": "0.0.2-alpha.6",
"http-server": "^0.11.1",
"remix-plugin": "0.0.2-alpha.8",
"remixd": "0.1.8-alpha.6"
},
"repository": {

@ -22,7 +22,7 @@ const profile = {
// File System profile
// - events: ['currentFileChanged']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile', 'switchFile']
class FileManager extends FileSystemApi {
constructor (localRegistry) {
@ -113,10 +113,9 @@ class FileManager extends FileSystemApi {
return path ? path[1] : null
}
async getCurrentFile () {
getCurrentFile () {
const path = this.currentFile()
if (!path) throw new Error('no file selected')
console.log('Get current File', path)
if (!path) throw new Error('No file selected')
return path
}

@ -62,9 +62,11 @@ export class RemixAppManager extends AppManagerApi {
displayName: 'Vyper',
events: ['compilationFinished'],
methods: [],
notifications: {},
url: 'https://remix-vyper.surge.sh/',
description: 'compile vyper contracts',
notifications: {
'fileManager': ['currentFileChanged']
},
url: 'https://remix-vyper-plugin.surge.sh',
description: 'Compile vyper contracts',
kind: 'compile',
icon: 'data:image/svg+xml;base64,PHN2ZyBpZD0iRmxhdF9Mb2dvIiBkYXRhLW5hbWU9IkZsYXQgTG9nbyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMjA0OCAxNzczLjYyIj4gIDx0aXRsZT52eXBlci1sb2dvLWZsYXQ8L3RpdGxlPiAgPHBvbHlsaW5lIHBvaW50cz0iMTAyNCA4ODYuODEgNzY4IDEzMzAuMjIgMTAyNCAxNzczLjYyIDEyODAgMTMzMC4yMiAxMDI0IDg4Ni44MSIgc3R5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