我正在为 Eclipse 3.2 (JBuilder 2007-8) 制作一个简单的额外 java 应用程序启动器供内部使用。
因此,我查找了所有相关文档,包括来自 eclipse.org 的 The Launching Framework,并设法使除启动快捷方式之外的所有其他内容都正常工作。
这是我的 plugin.xml 的一部分。
<extension
point="org.eclipse.debug.ui.launchShortcuts">
<shortcut
category="mycompany.javalaunchext.launchConfig"
class="mycompany.javalaunchext.LaunchShortcut"
description="launchshortcutsdescription"
icon="icons/k2mountain.png"
id="mycompany.javalaunchext.launchShortcut"
label="Java Application Ext."
modes="run, debug">
<perspective
id="org.eclipse.jdt.ui.JavaPerspective">
</perspective>
<perspective
id="org.eclipse.jdt.ui.JavaHierarchyPerspective">
</perspective>
<perspective
id="org.eclipse.jdt.ui.JavaBrowsingPerspective">
</perspective>
<perspective
id="org.eclipse.debug.ui.DebugPerspective">
</perspective>
</shortcut>
类别部分中的配置名称是正确的,并且我相信类部分中的类已正确实现。(基本上是从 org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut 复制过来的)
我真的不确定我是否应该在这里写一篇后续文章,但让我进一步澄清我的问题。我已经扩展了 org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut。另外,我已经将自己的记录器添加到构造函数和方法中,但是该类似乎甚至从未实例化。