Skip to content

Commit

Permalink
setup plugin api before plugins are started
Browse files Browse the repository at this point in the history
- in current Theia code plugins are loaded and activated before the plugin api becomes ready. This change fixes this problem.

Signed-off-by: elaihau <[email protected]>
  • Loading branch information
elaihau authored and elaihau committed Feb 21, 2019
1 parent 0702db1 commit fcb4001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/hosted/browser/hosted-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export class HostedPluginSupport {
pluginID = getPluginId(plugins[0].model);
}
const rpc = this.createServerRpc(pluginID, hostKey);
setUpPluginApi(rpc, container);
const hostedExtManager = rpc.getProxy(MAIN_RPC_CONTEXT.HOSTED_PLUGIN_MANAGER_EXT);
hostedExtManager.$init({
plugins: plugins,
Expand All @@ -161,7 +162,6 @@ export class HostedPluginSupport {
env: { queryParams: getQueryParameters() },
extApi: initData.pluginAPIs
}, confStorage);
setUpPluginApi(rpc, container);
this.mainPluginApiProviders.getContributions().forEach(p => p.initialize(rpc, container));
this.backendExtManagerProxy = hostedExtManager;
});
Expand Down

0 comments on commit fcb4001

Please sign in to comment.