解决Eclipse RCP开发中Run As菜单项只出现一次的问题
症状:
运行RCP application后,在Project Explorer里面右键某个项目,可以看到context menu里面有Run As这么个选项,可是当第二次右键同一个项目时,Run As却消失了,不管你有没有真正地Run这个application,Run As都只会在context menu中出现一次。
调查:
在org.eclipse.debug.ui这个插件的extension point中有这么一段逻辑
<extension point="org.eclipse.core.runtime.adapters"> <factory class="org.eclipse.core.runtime.IAdaptable" adaptableType="org.eclipse.core.resources.IResource"> <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/> </factory></extension>