简体   繁体   English

通过Java代码执行eclipse插件

[英]Execute eclipse plugin through java code

I've created a plugin in Eclipse, and I can run that plugin by selecting the option in the menu. 我已经在Eclipse中创建了一个插件,然后可以通过选择菜单中的选项来运行该插件。

How can I execute this plugin through Java code? 如何通过Java代码执行此插件? For example, before doing some operation I want to first call that plugin. 例如,在执行某些操作之前,我要先调用该插件。

You should use: 您应该使用:

Platform.getBundle("id_of_plugin").start(); 

Where id_of_plugin is your plugin's id. 其中id_of_plugin是您插件的ID。 Here is the Platform API for Eclipse Juno release. 这是Eclipse Juno发行版的Platform API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM