简体   繁体   English

如何编辑eclipse插件?

[英]How to edit an eclipse plugin?

An eclipse plugin called JDTCommentsV2_1.0.9 does the following in eclipse: 名为JDTCommentsV2_1.0.9的eclipse插件在eclipse中执行以下操作:

http://i90.photobucket.com/albums/k274/alaa_137/eclipse_zps8fbc1a0b.png

I'm trying to add/edit some comments inside. 我正在尝试在其中添加/编辑一些评论。 eg add Run TestComment or just change one of the comments' name. 例如,添加Run TestComment或仅更改注释名称之一。

I have the .jar file and here's how it looks inside: 我有.jar文件,这是里面的样子:

在此处输入图片说明

Question is which files should i edit and how. 问题是我应该编辑哪些文件以及如何编辑。

Thank you 谢谢

edit: After following @greg449 and @Robin Green's instructions, I exported the jar file to eclipse, and edited the plugins.xml file. 编辑:按照@ greg449和@Robin Green的说明进行操作之后,我将jar文件导出到eclipse,并编辑了plugins.xml文件。 But if i export the files now as a jar, it doesn't work (nothing is changed in the menu). 但是,如果我现在将文件导出为jar文件,将无法正常工作(菜单中没有任何更改)。 Finally i tried what @Robin Green said (Run -> Run As -> eclipse application) but there is no eclipse application under Run As . 最后,我尝试了@Robin Green所说的(运行->运行方式-> eclipse应用程序),但是在Run As下没有eclipse application I got only Java Applet and Java Application . 我只有Java AppletJava Application I'm wondering why. 我想知道为什么。 Might it be because i'm using ADT? 可能是因为我正在使用ADT吗?

edit2: I downloaded another version of eclipse (not ADT) and here i do have the Run As eclipse application bar". Can't i add it to ADT ? edit2:我下载了eclipse的另一个版本(不是ADT),在这里我有运行方式eclipse应用程序栏。“我不能将其添加到ADT中吗?

edit3: The picked answer works for eclipse JDT and not eclipse ADT. edit3:选择的答案适用于Eclipse JDT,而不适用于Eclipse ADT。

It looks like you have a jar containing an existing Eclipse plugin so in your Eclipse you do File > Import and choose General > Existing Projects into Workspace and select the jar as the source. 看起来您有一个包含现有Eclipse插件的jar,因此在Eclipse中,执行File > Import然后选择General > Existing Projects into Workspace然后选择jar作为源。

Once you have the plugin project installed in your workspace you are going to have to work out how the plugin works by looking at the source and the plugin.xml . 在工作空间中安装了插件项目后,您将不得不通过查看源代码和plugin.xml来确定插件的工作方式。

Once you have modified the plugin use Export > Plug-in Development > Deployable plug-ins and fragments to build a new plugin jar. 修改插件后,使用“ Export > Plug-in Development > Deployable plug-ins and fragments来构建新的插件jar。

一般来说,您可以从其源代码控制存储库中签出源代码,或者从其网站将其下载为存档文件,然后将其导入到Eclipse中,就像其他任何项目一样。

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

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