启动 Eclipse 插件模板

Launching Eclipse plug in template(启动 Eclipse 插件模板)

本文介绍了启动 Eclipse 插件模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过选择eclipse提供的插件模板创建了一个Eclipse插件项目.然后我运行插件,它打开了另一个 Eclipse,插件在那里执行.为什么会这样?插件是拿eclipse的应用类来创建workbench的吗?

I created a Eclipse plug-in project by selecting a plug-in template provides by the eclipse. Then i ran the plug-in it opened another eclipse and the plug-in executed there.Why so? is the plugin taking eclipse's application class to create workbench?

推荐答案

作为如果您想在主工作区中运行插件,您必须导出插件并将其安装在主 Eclipse 中"的详细说明.@greg-449 在他的回答中.你可以这样做.

As an elaboration of "If you want to run the plugin in your main workspace you will have to export the plugin and install it in your main Eclipse." that @greg-449 had in his answer. You can do this.

从文件"菜单中,选择导出...",然后选择可部署插件和片段向导.

From the File menu, choose Export... and then choose the Deployable plug-ins and fragments wizard.

  1. 选择您要导出的插件.
  2. 作为目的地,选择Install into host
  3. 按下完成

由于您可能没有对插件进行签名,但您确实信任它,因此对警告说是":您正在安装包含未签名内容的软件.

As you are probably not signing your plug-in, but you do trust it, say Yes to the Warning: you are installing software that contains unsigned content.

在提示启用插件时重新启动 Eclipse.

Restart Eclipse when prompted to to enable the plug-ins.

您现在应该会看到您的新插件.为了制作这个示例,我使用了新的插件向导并选择了Hello, World Command"模板.下面的箭头指向插件在 UI 中所做的贡献.

You should now see your new plug-ins. To make this example I used the new Plug-in wizard and choose the "Hello, World Command" template. The arrows below point to the contributions in the UI that the plug-in made.

这篇关于启动 Eclipse 插件模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:启动 Eclipse 插件模板

基础教程推荐