0

如何调试“找不到查看描述符”?我确信在 addView() 中传递的视图 ID(在透视图的 createInitialLayout() 方法期间调用)实际上是我所引用的视图的视图 ID,并且该视图在其插件中声明。事实上,它在我的工作区中工作,但在二进制文件中不起作用,尽管二进制文件中存在相同的插件。

不过,我得到“未找到视图描述符”(最后附加了堆栈跟踪)。

任何提示表示赞赏。

    org.eclipse.ui.PartInitException: View descriptor not found: myTree.TreeView
    at org.eclipse.ui.internal.FolderLayout.addView(FolderLayout.java:75)
    at com.xxx.yyy.perspective.perspectives.RelEngPerspective.addViews(RelEngPerspective.java:87)
    at com.xxx.yyy.perspective.perspectives.RelEngPerspective.createInitialLayout(RelEngPerspective.java:81)
    at org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Perspective.java:816)
    at org.eclipse.ui.internal.Perspective.createPresentation(Perspective.java:270)
    at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:156)
    at org.eclipse.ui.internal.tweaklets.Workbench3xImplementation.createPerspective(Workbench3xImplementation.java:55)
    at org.eclipse.ui.internal.WorkbenchPage.createPerspective(WorkbenchPage.java:1672)
    at org.eclipse.ui.internal.WorkbenchPage.busyResetPerspective(WorkbenchPage.java:927)
    at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:876)
    at org.eclipse.ui.internal.WorkbenchPage$14.run(WorkbenchPage.java:3093)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.resetPerspective(WorkbenchPage.java:3091)
    at org.eclipse.ui.internal.ResetPerspectiveAction.run(ResetPerspectiveAction.java:59)
    at org.eclipse.ui.internal.PerspectiveAction.run(PerspectiveAction.java:70)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
4

1 回答 1

1

build.properties如果它在您的工作区而不是二进制文件中工作,则声明视图的插件可能存在问题。请检查您plugin.xml是否在使用插件导出的工件中。

于 2012-10-11T15:21:23.797 回答