无法在 Eclipse 中创建 python 视图
我已经将 PyDev 插件安装到 Eclipse 中。当我创建新的 python 项目时,我必须切换到 Python 视图。不幸的是我收到这样的消息:
Could not create the view: An unexpected exception was thrown.
java.lang.RuntimeException: Can't find id: org.eclipse.jst.servlet.ui.EnhancedJavaRendering
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.findId(NavigatorContentDescriptorManager.java:459)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.computeSequenceNumbers(NavigatorContentDescriptorManager.java:476)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.access$0(NavigatorContentDescriptorManager.java:462)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager$NavigatorContentDescriptorRegistry.readRegistry(NavigatorContentDescriptorManager.java:512)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.<init>(NavigatorContentDescriptorManager.java:130)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.<clinit>(NavigatorContentDescriptorManager.java:44)
at org.eclipse.ui.internal.navigator.NavigatorContentService.<clinit>(NavigatorContentService.java:93)
at org.eclipse.ui.navigator.CommonViewer.<init>(CommonViewer.java:96)
at org.python.pydev.navigator.ui.PydevPackageExplorer$PydevCommonViewer.<init>(PydevPackageExplorer.java:77)
at org.python.pydev.navigator.ui.PydevPackageExplorer.createCommonViewer(PydevPackageExplorer.java:174)
at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:193)
at org.python.pydev.navigator.ui.PydevPackageExplorer.createPartControl(PydevPackageExplorer.java:188)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:643)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3713)
at org.eclipse.ui.internal.WorkbenchPage.busyResetPerspective(WorkbenchPage.java:1046)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:950)
at org.eclipse.ui.internal.WorkbenchPage$14.run(WorkbenchPage.java:3175)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.resetPerspective(WorkbenchPage.java:3173)
at org.eclipse.ui.internal.handlers.ResetPerspectiveHandler.execute(ResetPerspectiveHandler.java:84)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
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:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
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:344)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
如何处理?
I' ve installed PyDev plugin to Eclipse. When I am creating new python project I have to switch to Python view. Unfortunately I get this message:
Could not create the view: An unexpected exception was thrown.
java.lang.RuntimeException: Can't find id: org.eclipse.jst.servlet.ui.EnhancedJavaRendering
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.findId(NavigatorContentDescriptorManager.java:459)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.computeSequenceNumbers(NavigatorContentDescriptorManager.java:476)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.access$0(NavigatorContentDescriptorManager.java:462)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager$NavigatorContentDescriptorRegistry.readRegistry(NavigatorContentDescriptorManager.java:512)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.<init>(NavigatorContentDescriptorManager.java:130)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.<clinit>(NavigatorContentDescriptorManager.java:44)
at org.eclipse.ui.internal.navigator.NavigatorContentService.<clinit>(NavigatorContentService.java:93)
at org.eclipse.ui.navigator.CommonViewer.<init>(CommonViewer.java:96)
at org.python.pydev.navigator.ui.PydevPackageExplorer$PydevCommonViewer.<init>(PydevPackageExplorer.java:77)
at org.python.pydev.navigator.ui.PydevPackageExplorer.createCommonViewer(PydevPackageExplorer.java:174)
at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:193)
at org.python.pydev.navigator.ui.PydevPackageExplorer.createPartControl(PydevPackageExplorer.java:188)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:643)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3713)
at org.eclipse.ui.internal.WorkbenchPage.busyResetPerspective(WorkbenchPage.java:1046)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:950)
at org.eclipse.ui.internal.WorkbenchPage$14.run(WorkbenchPage.java:3175)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.resetPerspective(WorkbenchPage.java:3173)
at org.eclipse.ui.internal.handlers.ResetPerspectiveHandler.execute(ResetPerspectiveHandler.java:84)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
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:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
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:344)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
How to deal with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当我得到新版本的 Pydev 时,我遇到了同样的问题。我访问了 pydev.org 安装说明,发现现在需要 Java 7。当我升级 Java 并确保 Eclipse 使用新版本后,问题就自行解决了。
I had the same problem when I got the new release of Pydev. I went to pydev.org installation instructions and noticed Java 7 is now required. Once I upgraded Java--and made sure Eclipse was using the new version--the problem resolved itself.
虽然您在启动 PyDev 包资源管理器时遇到问题,但真正的问题是另一个插件 - 它找不到 org.eclipse.jst.servlet.ui.EnhancedJavaRendering,所以,我猜这是安装网络工具。
Although you're having the problem when starting PyDev package explorer, the real problem is with another plugin -- it can't find org.eclipse.jst.servlet.ui.EnhancedJavaRendering, so, I'm guessing it's some problem in the installation of webtools.
我迟到了这个问题,但我确实找到了答案。尽管您可能拥有 Java 1.7 JRE,但您需要安装 1.7 JDK。确保 Eclipse 了解首选项中的更新 >安装的 JRE。如果您只看到 Java SE 6 并且您确实安装了 Java SE 7,请单击搜索。确保选中 7。您可以通过查看 About Eclipse > 来双重确保它使用的是 1.7。安装详细信息(按钮)>配置(选项卡),然后查找 -vm 之后的行。
我还必须摆弄 ~/workspace 下的 .metadata 文件夹和文件,才能使 Eclipse 中的 Pydev Package Explorer 窗格正确显示。
I'm late to this question, but I did manage to figure out the answer. Although you may have the Java 1.7 JRE, you need to install the 1.7 JDK. Make sure that Eclipse knows about the update in preferences > Installed JREs. Click on search if you only see Java SE 6 and you did install the Java SE 7. Make sure 7 is checked. You can make doubly sure it's using 1.7 by looking under About Eclipse > Installation Details (button) > Configuration (tab), and look for the line after -vm.
I also had to fiddle with the .metadata folder and files under ~/workspace to get the Pydev Package Explorer pane in Eclipse to display correctly.