I am using Linux/GTK, and see the problem below when using a fresh install of Eclipse 3.1 with Designer 4.1 unpacked into it.
I was previously using v4.0, and never saw the problem in the earlier version (and I'm pretty sure I tried doing this with Eclipse 3.1, but definitely with 3.0).
When I create a new project and ask for a "Designer|SWT/JFace Java Project", then click "Finish", I get a project that contains entries for:
JRE
ECLIPSE_HOME/plugins/org.eclipse.osgi_3.1.0.jar (followed by filespec)
ECLIPSE_HOME/plugins/org.eclipse.ui.forms_3.1.0.jar (followed by filespec)
ECLIPSE_HOME/plugins/org.eclipse.core.runtime_3.1.0.jar (followed by filespec)
I also get a stack trace on the console like this:
- Code: Select all
java.lang.NullPointerException
at com.swtdesigner.model.util.jdt.ProjectUtilities.getPluginClasspathPathJars(ProjectUtilities.java:92)
at com.swtdesigner.model.util.jdt.ProjectUtilities.addClassPathLibraries(ProjectUtilities.java:81)
at com.swtdesigner.model.util.jdt.ProjectUtilities.addPluginLibraries(ProjectUtilities.java:70)
at com.swtdesigner.model.util.jdt.ProjectUtilities.addSWTLibrary(ProjectUtilities.java:74)
at com.swtdesigner.wizards.swt.JavaSWTProjectCreationWizard.selectAndReveal(JavaSWTProjectCreationWizard.java:39)
at org.eclipse.jdt.internal.ui.wizards.JavaProjectWizard.performFinish(JavaProjectWizard.java:69)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:676)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:349)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
at org.eclipse.jface.window.Window.open(Window.java:787)
at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:114)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Then I use "File|New->Other..." and select Designer/SWT/Application Window, give a classname of "MyTest" and click "Finish".
The project shows up with errors, saying that it can't resolve "org.eclipse.swt" (in the imports section) and that it doesn't know what "Shell" is (in the main code).
By using "Project Properties" and adding external JARs to the build path I can get rid of the unresolved warnings, but I never used to have to do this so I would like to know if something else is wrong (I'm quite prepared to accept this may be my fault).
Any ideas would be most appreciated
thanks
nick