0

I'm trying to Swing editor on Eclipse but I get an error:

Could not open the editor: An unexpected exception was thrown. 

It is my first time trying to use Swing Designer.

Does anyone know why the NullPointerException is thrown?

java.lang.NullPointerException
    at org.eclipse.wb.internal.core.editor.multi.SourcePage.updateSourceActions(SourcePage.java:140)
    at org.eclipse.wb.internal.core.editor.multi.SourcePage.handleActiveState(SourcePage.java:74)
    at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
    at org.eclipse.wb.internal.core.editor.multi.MultiPagesMode.showSource(MultiPagesMode.java:54)
    at org.eclipse.wb.internal.core.editor.multi.MultiPagesMode.create(MultiPagesMode.java:100)
    at org.eclipse.wb.internal.core.editor.multi.DesignerEditor.createPartControl(DesignerEditor.java:87)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
    at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459)
    at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:972)
    at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
    at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
    at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600)
    at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Andrew Thompson
  • 163,965
  • 36
  • 203
  • 405
CoffeeAddiKt
  • 99
  • 2
  • 12
  • See [What is a stack trace, and how can I use it to debug my application errors?](http://stackoverflow.com/q/3988788/418556) & [What is a Null Pointer Exception, and how do I fix it?](http://stackoverflow.com/q/218384/418556) *"It my first time trying to use swingDesigner."* The **Swing** designer? Really? There's a heck of a lot of `org.eclipse.swt..` references in that stack trace, and SWT is a separate GUI toolkit to Swing. – Andrew Thompson Jun 01 '15 at 16:33
  • You should report the bug to the Eclipse community, through their bugzilla system – aleroot Apr 13 '16 at 08:57

1 Answers1

0

I had the same problem, my solution was to uninstall the windowBuilder/SwingDesigner from eclipse and to reinstall it correctly from the original source (see http://www.eclipse.org/windowbuilder/download.php )

treaki
  • 1
  • 1