[英]how to add plug in dependency in eclipse
我想知道为什么以及如何为eclipse中的任何项目添加依赖插件。
Plug-in Dependencies from the Eclipse Documentation Archives Eclipse文档存档中的插件依赖项
Hope this helps. 希望这可以帮助。
单击项目,选择属性,转到Java Build Path ..添加jar或添加外部jar应解决您的问题。
How to Resolve What Plugin to Add to the Dependencies 如何解决要添加到依赖项的插件
I needed to know what dependency to add (to an Eclipse Plug-in) as well as how to add it. 我需要知道要添加的依赖项(到Eclipse插件)以及如何添加它。 The errors I got in the Java code were:
我在Java代码中得到的错误是:
The type org.eclipse.jface.text.source.Annotation cannot be resolved. It is indirectly referenced from required .class files
in the java 'package' statement and: 在java'package'语句中:
The hierarchy of the type JavaDecodePlugin is inconsistent
To find what plugin supplied the Annotation class I searched the 'plugins' directory of the where the Eclipse code was installed on my (windows) machine (\\app\\androidDev\\eclipse) for a reference to that class: 为了找到哪个插件提供了Annotation类,我搜索了我的(windows)机器(\\ app \\ androidDev \\ eclipse)上安装Eclipse代码的位置的'plugins'目录,以获取对该类的引用:
C:\app\androidDev\eclipse\plugins>grep -r org.eclipse.jface.text.source.Annotation *
Binary file org.eclipse.jface.text_3.8.2.v20121126-164145.jar matches
Binary file org.eclipse.text_3.5.200.v20120523-1310.jar matches
it was referenced in two plugins/jars. 它在两个插件/罐中引用。 I searched the jars for the desired class.
我在罐子里搜寻了所需的课程。 The first plugin/jar didn't contain it, the second did.
第一个插件/ jar不包含它,第二个插件/ jar。
C:\app\androidDev\eclipse\plugins>jar -tf org.eclipse.jface.text_3.8.2.v20121126-164145.jar |grep Annotations
org/eclipse/jface/text/link/LinkedPositionAnnotations.class
org/eclipse/jface/text/source/projection/ProjectionSupport$ProjectionAnnotationsPainter.class
C:\app\androidDev\eclipse\plugins>jar -tf org.eclipse.text_3.5.200.v20120523-1310.jar |grep Annotations
org/eclipse/jface/text/source/Annotation.class
org/eclipse/jface/text/source/AnnotationMap.class
org/eclipse/jface/text/source/AnnotationModel$1.class
org/eclipse/jface/text/source/AnnotationModel$2.class
org/eclipse/jface/text/source/AnnotationModel$AnnotationsInterator.class
org/eclipse/jface/text/source/AnnotationModel$InternalModelListener.class
org/eclipse/jface/text/source/AnnotationModel$MetaIterator.class
org/eclipse/jface/text/source/AnnotationModel$RegionIterator.class
org/eclipse/jface/text/source/AnnotationModel.class
org/eclipse/jface/text/source/AnnotationModelEvent.class
So I knew what plugin I needed now. 所以我知道我现在需要什么插件。 As Plug-in Dependencies shows (as in the answer above) You need to go to 'Package Explorer' expand 'META-INF', open 'MANIFEST.MF', open the 'Dependencies' tab and click the 'Add' button on the 'Required Plug-ins' section, type part of the name of the plug-in in the 'Select a Plug-in text area, let it find the fullname of the plugin (perhaps select the desired plugin) and click Ok.
正如Plug-in Dependencies所示(如上面的答案所示)你需要转到'Package Explorer'展开'META-INF',打开'MANIFEST.MF',打开'Dependencies'选项卡,然后点击'Add'按钮在“必需的插件”部分,在“选择插件”文本区域中键入插件名称的一部分,让它找到插件的完整名称(可能选择所需的插件),然后单击“确定”。
(This answer is somewhat to document the process so if I have to do this again after I forget what I did, I, and you, will know) (这个答案在某种程度上是为了记录这个过程,所以如果我忘记了我做了之后必须再做一遍,我,你,你会知道的)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.