|
|
@ -8,7 +8,7 @@ const requiredModules = [ // services + layout views + system views |
|
|
|
'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'fileExplorers', |
|
|
|
'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'fileExplorers', |
|
|
|
'terminal', 'settings', 'pluginManager'] |
|
|
|
'terminal', 'settings', 'pluginManager'] |
|
|
|
|
|
|
|
|
|
|
|
export function isNative (name) { |
|
|
|
export function isNative (name) { |
|
|
|
const nativePlugins = ['vyper', 'workshops', 'ethdoc', 'etherscan'] |
|
|
|
const nativePlugins = ['vyper', 'workshops', 'ethdoc', 'etherscan'] |
|
|
|
return nativePlugins.includes(name) || requiredModules.includes(name) |
|
|
|
return nativePlugins.includes(name) || requiredModules.includes(name) |
|
|
|
} |
|
|
|
} |
|
|
@ -36,9 +36,9 @@ export class RemixAppManager extends PluginManager { |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onActivated (plugin) { |
|
|
|
onPluginActivated (plugin) { |
|
|
|
this.pluginLoader.set(plugin, this.actives) |
|
|
|
this.pluginLoader.set(plugin, this.actives) |
|
|
|
this.event.emit('activate', plugin.name) |
|
|
|
this.event.emit('activate', plugin) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getAll () { |
|
|
|
getAll () { |
|
|
@ -51,9 +51,9 @@ export class RemixAppManager extends PluginManager { |
|
|
|
return Object.keys(this.registered) |
|
|
|
return Object.keys(this.registered) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onDeactivated (plugin) { |
|
|
|
onPluginDeactivated (plugin) { |
|
|
|
this.pluginLoader.set(plugin, this.actives) |
|
|
|
this.pluginLoader.set(plugin, this.actives) |
|
|
|
this.event.emit('deactivate', plugin.name) |
|
|
|
this.event.emit('deactivate', plugin) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onRegistration (plugin) { |
|
|
|
onRegistration (plugin) { |
|
|
@ -62,6 +62,16 @@ export class RemixAppManager extends PluginManager { |
|
|
|
this.event.emit('added', plugin.name) |
|
|
|
this.event.emit('added', plugin.name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ensureActivated (apiName) { |
|
|
|
|
|
|
|
if (!this.isActive(apiName)) this.activateOne(apiName) |
|
|
|
|
|
|
|
this.event.emit('ensureActivated', apiName) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ensureDeactivated (apiName) { |
|
|
|
|
|
|
|
if (this.isActive(apiName)) this.deactivateOne(apiName) |
|
|
|
|
|
|
|
this.event.emit('ensureDeactivated', apiName) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
deactivatePlugin (name) { |
|
|
|
deactivatePlugin (name) { |
|
|
|
if (requiredModules.includes(name)) return |
|
|
|
if (requiredModules.includes(name)) return |
|
|
|
super.deactivatePlugin(name) |
|
|
|
super.deactivatePlugin(name) |
|
|
|