Community
Participate
Working Groups
M5, Linux Opened new workbench. Do NOT open the java perspective. Opened CVS perspective, loaded team plugins from dev.eclipse.org. Switch to resource perspective. Import binary plugins for all except the team plugins. Finish. The first project (ant core) appears in the workspace, and I get the following npe: <?xml version="1.0" encoding="UTF-8"?> <log> <log-entry date="Thu Apr 18 11:33:14 EDT 2002"> <status plugin-id="org.eclipse.pde.ui" severity="ERROR" message="java.lang.NullPointerException" code="0"> <exception message="null" trace=" java.lang.NullPointerException at org.eclipse.jdt.internal.core.JavaModelManager.runOperation(JavaModelManager.java:1150) at org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.java:550) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:1911) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:1882) at org.eclipse.pde.internal.ui.wizards.imports.UpdateClasspathOperation.run(UpdateClasspathOperation.java:97) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.createProject(PluginImportOperation.java:216) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.run(PluginImportOperation.java:101) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1343) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard$2.run(PluginImportWizard.java:122) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98) "> </exception> </status> </log-entry>
Autobuild was off at the time.
After switching to the Java perspective, deleting the single project, and importing them all again, it worked fine.
Offending line is: this.getJavaModel().getWorkspace().run(operation, monitor); which means that the JavaModel wouldn't be initialized at this point.
Fixed by making getJavaModel() lazily allocate the model if not already existing. Also discarded getJavaModel(workspace). Fixed