Skip to content

How do I obtain the path of the front-end plug-in installed at runtime #13203

Answered by xai
zx616456607 asked this question in General
Discussion options

You must be logged in to vote

Hi @zx616456607,

You can use the pluginPath attribute of a plugin to determine its deployment path.

As a practical example, let's create a Theia command that lists such information for all plugins:

const showInstalledPlugins = {
    id: 'show-installed-plugins',
    label: "Show installed plugins"
};
context.subscriptions.push(theia.commands.registerCommand(showInstalledPlugins, (...args: any[]) => {
    let plugins = '';
    for (const plugin of theia.plugins.all){
        plugins += `${plugin.id} (${plugin.pluginType}) at ${plugin.pluginPath}\n`;
    }
    theia.window.showInformationMessage(`Installed plugins: ${plugins}`);
}));

Also, in practice, we recommend writing VSCode extensions…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@zx616456607
Comment options

Answer selected by zx616456607
Comment options

You must be logged in to vote
1 reply
@zx616456607
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #13202 on December 21, 2023 12:11.