我正在为Eclipse Juno编写一个插件,我想使用AbstractSourceLookupDirector类。当我看到API它说它有一个构造函数,但当我在我的代码中使用以下语句时,它说“无法实例化类型AbstractSourceLookupDirector”
AbstractSourceLookupDirector srclookupDir = new AbstractSourceLookupDirector();
您能否告诉我如何使用AbstractSourceLookupDirector。 参考:http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupDirector.html
非常感谢提前!
答案 0 :(得分:0)
它是一个Abstract类,您无法在Java中实例化抽象类。 您需要做的是配置扩展点org.eclipse.debug.core.sourceLocators 并让你的类扩展AbstractSourceLookupDirector juno文档中给出了一个例子 http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_debug_core_sourceLocators.html