在注册表中找不到应用程序

时间:2013-12-26 16:57:52

标签: java eclipse console eclipse-rcp

有时,在代码发生微小变化后,我无法运行Eclipse RCP应用程序。如果运行,应用程序将报告错误

!ENTRY org.eclipse.osgi 4 0 2013-12-26 20:42:02.482
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "MY_APPLICATION_NAME" could not be found in the registry. The applications available are: SOME_POOR_LIST_OF_APPLICATIONS.

例如,上次我失去了一个能力:

1)向ApplicationWorkbenchAdvisor添加了一个尚未使用的函数

代码如下:

private MessageConsole findConsole(String name) {
    ConsolePlugin plugin = ConsolePlugin.getDefault();
    IConsoleManager conMan = plugin.getConsoleManager();
    IConsole[] existing = conMan.getConsoles();
    for (int i = 0; i < existing.length; i++)
        if (name.equals(existing[i].getName()))
            return (MessageConsole) existing[i];
    // no console found, so create a new one
    MessageConsole myConsole = new MessageConsole(name, null);
    conMan.addConsoles(new IConsole[] { myConsole });
    return myConsole;
}

2)导致添加一个依赖:org.eclipse.ui.console

这一切如何导致此错误?

0 个答案:

没有答案
相关问题