Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Unable to switch to Design View
Unable to switch to Design View [message #718174] Tue, 23 August 2011 13:47 Go to next message
Caleb  is currently offline Caleb
Messages: 22
Registered: July 2009
Junior Member
Hi,

I'm using a freshly installed Eclipse 3.7 (64bit), with the latest WindowBuilder for SWT that I've just downloaded on Win7 64bit.

I created a new SWT Application Window, which seems to run fine and show the code view, but whenever I click on the "Design" tab, I get the following error:
Quote:
Internal Error
WindowBuilder encountered unexpected internal error.

This could be caused by a WindowBuilder bug or by a misconfiguration issue, conflict, partial update, etc.

java.lang.IllegalArgumentException: Path must include project and resource name: /org.eclipse.swt


Stack trace:
Stack trace:
java.lang.IllegalArgumentException: Path must include project and resource name: /org.eclipse.swt
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2163)
	at org.eclipse.core.internal.resources.Container.getFolder(Container.java:222)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addAbsoluteLocation(ProjectClassLoader.java:280)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addRuntimeClassPathEntries(ProjectClassLoader.java:124)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addFragment_runtimeClassPathEntries(ProjectClassLoader.java:168)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addFragments(ProjectClassLoader.java:157)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addRuntimeClassPathEntries(ProjectClassLoader.java:127)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.getClasspathUrls(ProjectClassLoader.java:73)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.create(ProjectClassLoader.java:64)
	at org.eclipse.wb.internal.core.parser.AbstractParseFactory.createClassLoader_project(AbstractParseFactory.java:792)
	at org.eclipse.wb.internal.core.parser.AbstractParseFactory.getClassLoader(AbstractParseFactory.java:747)
	at org.eclipse.wb.internal.core.parser.AbstractParseFactory.initializeClassLoader(AbstractParseFactory.java:732)
	at org.eclipse.wb.internal.rcp.parser.ParseFactory.getRootContext(ParseFactory.java:132)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java:1185)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:244)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.access$9(JavaInfoParser.java:240)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:153)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:1)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:153)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:151)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:513)
	at org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:501)
	at org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:434)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
	at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:431)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:450)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:400)
	at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381)
	at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90)
	at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:248)
	at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:226)
	at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
	at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	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.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2745)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1432)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
	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(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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)

Full context stack trace:
java.lang.IllegalArgumentException: Path must include project and resource name: /org.eclipse.swt
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2163)
	at org.eclipse.core.internal.resources.Container.getFolder(Container.java:222)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addAbsoluteLocation(ProjectClassLoader.java:280)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addRuntimeClassPathEntries(ProjectClassLoader.java:124)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addFragment_runtimeClassPathEntries(ProjectClassLoader.java:168)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addFragments(ProjectClassLoader.java:157)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.addRuntimeClassPathEntries(ProjectClassLoader.java:127)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.getClasspathUrls(ProjectClassLoader.java:73)
	at org.eclipse.wb.internal.core.utils.reflect.ProjectClassLoader.create(ProjectClassLoader.java:64)
	at org.eclipse.wb.internal.core.parser.AbstractParseFactory.createClassLoader_project(AbstractParseFactory.java:792)
	at org.eclipse.wb.internal.core.parser.AbstractParseFactory.getClassLoader(AbstractParseFactory.java:747)
	at org.eclipse.wb.internal.core.parser.AbstractParseFactory.initializeClassLoader(AbstractParseFactory.java:732)
	at org.eclipse.wb.internal.rcp.parser.ParseFactory.getRootContext(ParseFactory.java:132)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java:1185)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:244)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.access$9(JavaInfoParser.java:240)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:153)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:1)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:153)
	at org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:151)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:513)
	at org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:501)
	at org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:434)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
	at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:431)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:450)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:400)
	at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381)
	at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90)
	at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:248)
	at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:226)
	at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
	at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
	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.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2745)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1432)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
	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(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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)
Re: Unable to switch to Design View [message #718390 is a reply to message #718174] Wed, 24 August 2011 08:01 Go to previous messageGo to next message
Caleb  is currently offline Caleb
Messages: 22
Registered: July 2009
Junior Member
I fixed it by including the swt.jar to the project manually, instead of setting up SWT as was recommended here: www.eclipse.org/swt/eclipse.php.
That page recommended importing the ZIP file as a project and then using it as a dependency, and that's what caused the exception above.

Maybe there is still a way to make this work even by using the SWT project as a dependency... can anyone help?
Re: Unable to switch to Design View [message #718578 is a reply to message #718390] Wed, 24 August 2011 17:37 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
It seems that you try to use project where source and output location are project itself, instead of "src" and "bin".
Actually I can not even force Eclipse to create such project.

I think that link which you provide is very old.
Now recommended way to create SWT/JFace project is creating plugin and importing SWT, JFace and other plugins, so allow PDE manage classpath for you.


Konstantin Scheglov,
Google, Inc.
Re: Unable to switch to Design View [message #718595 is a reply to message #718578] Wed, 24 August 2011 19:32 Go to previous messageGo to next message
Caleb  is currently offline Caleb
Messages: 22
Registered: July 2009
Junior Member
Konstantin Scheglov wrote on Wed, 24 August 2011 13:37
...
Now recommended way to create SWT/JFace project is creating plugin and importing SWT, JFace and other plugins, so allow PDE manage classpath for you.


I've never heard about that before! (I'm new to both Eclipse and Java)

I did hear about adding User Libraries in Preferences > Java > Build Path > User Libraries, and then adding them to any project I want... is that something similar?
Re: Unable to switch to Design View [message #718870 is a reply to message #718595] Thu, 25 August 2011 14:29 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
User libraries is something in the middle between:
1. adding jars directly into project;
2. managing classpath using PDE.
Such libraries allow use make modifications only in one place, instead of changing classpath for each project.
But when you update your Eclipse you still will need to change library to include new SWT, JFace, etc.

In contrast with PDE you specify name of library and PDE will find and use it in your plugins folder.


Konstantin Scheglov,
Google, Inc.
Re: Unable to switch to Design View [message #719357 is a reply to message #718870] Fri, 26 August 2011 19:36 Go to previous messageGo to next message
Caleb  is currently offline Caleb
Messages: 22
Registered: July 2009
Junior Member
Strangely enough, they give the same instructions on how to use JFace: http://wiki.eclipse.org/JFace#Create_the_Eclipse_SWT.2FJFace_Project
Are you sure that this is not a WindowBuilder problem? Because the project itself compiles fine, it's only WindowBuilder the complains.

Re: Unable to switch to Design View [message #719529 is a reply to message #719357] Sat, 27 August 2011 16:16 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
Well, I can not setup these projects to reproduce.
So, if you can provide projects, which can be imported into workspace to reproduce problem, I can take closer look.


Konstantin Scheglov,
Google, Inc.
Re: Unable to switch to Design View [message #721014 is a reply to message #719529] Wed, 31 August 2011 17:09 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
I've fixed problem in WindowBuilder trunk.

Problem is that you use old style Java project, when *.java and *.class files are directly in project folder, instead of separate "src" and "bin" folders.


Konstantin Scheglov,
Google, Inc.
Re: Unable to switch to Design View [message #721057 is a reply to message #721014] Wed, 31 August 2011 19:46 Go to previous message
Caleb  is currently offline Caleb
Messages: 22
Registered: July 2009
Junior Member
Thanks for fixing it!
Previous Topic:Latest version?
Next Topic:Exposing Shell's Styles by default
Goto Forum:
  


Current Time: Sun Sep 21 06:15:14 GMT 2014

Powered by FUDForum. Page generated in 0.03011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software