开发者

Using a Command in multiple Plugins

开发者 https://www.devze.com 2023-02-25 00:48 出处:网络
Is it possible to define a Command in one plugin and use it at another plugin? Thanks Patr开发者_如何学GoickYes! Commands are designed as abstractions. They can be found with their ids and can be use

Is it possible to define a Command in one plugin and use it at another plugin?

Thanks Patr开发者_如何学Goick


Yes! Commands are designed as abstractions. They can be found with their ids and can be used in other plugins. You don't even have to depend on the plugin that defines the command.


I think it is possible by adding the plugin which has the Command to the dependencies of the other plugin in which you want to use it.


You don't even need a dependency to the plug-in defining the command.

As soon as the command is declared, it is made known to the ICommandService which is provided by the workbench.

0

精彩评论

暂无评论...
验证码 换一张
取 消