remix plugin usage & add comments

pull/1/head
yann300 5 years ago
parent f9f5b18555
commit 24ba9f118c
  1. 10
      src/app.js
  2. 1
      src/app/components/side-panel.js
  3. 2
      src/app/components/vertical-icons.js
  4. 3
      src/app/panels/terminal.js
  5. 2
      src/remixAppManager.js

@ -222,7 +222,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
// APP_MANAGER
const appManager = new RemixAppManager([])
const appManager = new RemixAppManager({})
const workspace = JSON.parse(localStorage.getItem('workspace'))
// SERVICES
@ -262,7 +262,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
networkModule,
offsetToLineColumnConverter
])
appManager.activate(['contentImport', 'theme', 'sourceHighlighters', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'udapp', 'network', 'offsetToLineColumnConverter'])
// LAYOUT & SYSTEM VIEWS
const appPanel = new MainPanel()
@ -272,7 +271,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
appManager.register([
appPanel
])
appManager.activate(['mainPanel'])
// those views depend on app_manager
const menuicons = new VerticalIcons(appManager)
@ -302,8 +300,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
settings
])
appManager.activate(['menuicons', 'home', 'sidePanel', 'pluginManager', 'fileExplorers', 'settings'])
// CONTENT VIEWS & DEFAULT PLUGINS
let compileTab = new CompileTab(
editor,
@ -342,6 +338,10 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...appManager.registeredPlugins()
])
appManager.activate(['contentImport', 'theme', 'sourceHighlighters', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'udapp', 'network', 'offsetToLineColumnConverter'])
appManager.activate(['mainPanel'])
appManager.activate(['menuicons', 'home', 'sidePanel', 'pluginManager', 'fileExplorers', 'settings'])
// Set workspace after initial activation
if (Array.isArray(workspace)) appManager.activate(workspace)

@ -59,6 +59,7 @@ const sidePanel = {
required: true
}
// TODO merge with vertical-icons.js
export class SidePanel extends AbstractPanel {
constructor (appManager, verticalIcons) {

@ -16,7 +16,7 @@ const profile = {
required: true
}
// Component
// TODO merge with side-panel.js. VerticalIcons should not be a plugin
export class VerticalIcons extends Plugin {
constructor (appManager) {

@ -96,7 +96,8 @@ class Terminal extends Plugin {
self._jsSandboxContext = {}
self._jsSandboxRegistered = {}
// TODO move this to the application start
// TODO move this to the application start. Put it in mainView.
// We should have a HostPlugin which add the terminal.
opts.appManager.register(this)
opts.appManager.activate('terminal')

@ -42,11 +42,13 @@ export class RemixAppManager extends PluginEngine {
this.event.emit('added', plugin.name)
}
// TODO check whether this can be removed
ensureActivated (apiName) {
if (!this.isActive(apiName)) this.activateOne(apiName)
this.event.emit('ensureActivated', apiName)
}
// TODO check whether this can be removed
ensureDeactivated (apiName) {
if (this.isActive(apiName)) this.deactivateOne(apiName)
this.event.emit('ensureDeactivated', apiName)

Loading…
Cancel
Save