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?
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.
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.
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.
精彩评论