Commit 91dccf8d authored by ioedeveloper's avatar ioedeveloper

Wait for workspace initialization before registering menu items

parent b45fbdff
...@@ -135,25 +135,27 @@ export class RemixAppManager extends PluginManager { ...@@ -135,25 +135,27 @@ export class RemixAppManager extends PluginManager {
} }
async registerContextMenuItems () { async registerContextMenuItems () {
await this.call('filePanel', 'registerContextMenuItem', { this.on('filePanel', 'workspaceInitializationCompleted', async () => {
id: 'flattener', await this.call('filePanel', 'registerContextMenuItem', {
name: 'flattenFileCustomAction', id: 'flattener',
label: 'Flatten', name: 'flattenFileCustomAction',
type: [], label: 'Flatten',
extension: ['.sol'], type: [],
path: [], extension: ['.sol'],
pattern: [], path: [],
sticky: true pattern: [],
}) sticky: true
await this.call('filePanel', 'registerContextMenuItem', { })
id: 'optimism-compiler', await this.call('filePanel', 'registerContextMenuItem', {
name: 'compileCustomAction', id: 'optimism-compiler',
label: 'Compile with Optimism', name: 'compileCustomAction',
type: [], label: 'Compile with Optimism',
extension: ['.sol'], type: [],
path: [], extension: ['.sol'],
pattern: [], path: [],
sticky: true pattern: [],
sticky: true
})
}) })
} }
} }
......
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