How do I obtain the path of the front-end plug-in installed at runtime #13203
-
Feature Description: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @zx616456607, You can use the 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 or Theia extensions. Both are generally more effective and better supported compared to Theia plugins. I hope this helps you to achieve what you need. |
Beta Was this translation helpful? Give feedback.
-
@zx616456607 Is the answer sufficient? If so, could you mark it as answer above? |
Beta Was this translation helpful? Give feedback.
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:
Also, in practice, we recommend writing VSCode extensions…