Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Polish users » Windowsbuilder design error przy SWT
Windowsbuilder design error przy SWT [message #819217] Mon, 12 March 2012 12:32 Go to next message
michal b is currently offline michal b
Messages: 1
Registered: March 2012
Junior Member
Cześć, zainstalowałem sobie windowbuildera do eclipsa 3.7, potem ściągnąłem biblioteke zgodnie ze wskazówkami z eclipse org/swt/eclipse php

I ok wczytało klasy bo kod już nie był czerwony, program mogę odpalić, lecz gdy chcę wejść w Design to dostaje błąd

WindowBuilder encountered unexpected internal error. 

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

java.lang.ClassCastException: org.eclipse.swt.widgets.Shell cannot be cast to org.eclipse.swt.widgets.Control


Na samym dole posta dam wyciąg z stack trace'a
Próbowałem też paru innych sposobów żeby wgrać to swt

- Ściągnąłem nowego eclipsa
- Dołączałem ręcznie swt.jar
- Próbowałem korzystać z workspace bez spacji w nazwie(gdzieś taki przypadek wyszukałem)
- Próbowałem różnych wersji SWT

Ogólnie już ze 2 godziny szukam rozwiązania po forach i bezskutecznie, więc będę wdzięczny za jakąkolwiek pomoc.

Stack trace:
java.lang.ClassCastException: org.eclipse.swt.widgets.Shell cannot be cast to org.eclipse.swt.widgets.Control
	at org.eclipse.wb.os.OSSupport.endShot(OSSupport.java:142)
	at org.eclipse.wb.internal.rcp.support.ToolkitSupportImpl.endShot(ToolkitSupportImpl.java:115)
	at org.eclipse.wb.internal.swt.support.ToolkitSupport.endShot(ToolkitSupport.java:92)
	at org.eclipse.wb.internal.swt.model.widgets.ControlInfo.refresh_fetch(ControlInfo.java:233)
	at org.eclipse.wb.internal.swt.model.widgets.ControlInfo.refresh_fetch(ControlInfo.java:157)
	at org.eclipse.wb.internal.swt.model.widgets.ControlInfo.refresh_fetch(ControlInfo.java:124)
	at org.eclipse.wb.internal.swt.model.widgets.ScrollableInfo.refresh_fetch(ScrollableInfo.java:49)
	at org.eclipse.wb.internal.swt.model.widgets.CompositeInfo.refresh_fetch(CompositeInfo.java:301)
	at org.eclipse.wb.core.model.ObjectInfo$6$1.run(ObjectInfo.java:496)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:139)
	at org.eclipse.wb.core.model.ObjectInfo$6.run(ObjectInfo.java:494)
	at org.eclipse.wb.core.model.ObjectInfo.execRefreshOperation(ObjectInfo.java:514)
	at org.eclipse.wb.core.model.ObjectInfo.refresh(ObjectInfo.java:492)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:583)
	at org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:525)
	at org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:452)
	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:449)
	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:468)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:418)
	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:266)
	at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:244)
	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(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)

Full context stack trace:
java.lang.ClassCastException: org.eclipse.swt.widgets.Shell cannot be cast to org.eclipse.swt.widgets.Control
	at org.eclipse.wb.os.OSSupport.endShot(OSSupport.java:142)
	at org.eclipse.wb.internal.rcp.support.ToolkitSupportImpl.endShot(ToolkitSupportImpl.java:115)
	at org.eclipse.wb.internal.swt.support.ToolkitSupport.endShot(ToolkitSupport.java:92)
	at org.eclipse.wb.internal.swt.model.widgets.ControlInfo.refresh_fetch(ControlInfo.java:233)
	at org.eclipse.wb.internal.swt.model.widgets.ControlInfo.refresh_fetch(ControlInfo.java:157)
	at org.eclipse.wb.internal.swt.model.widgets.ControlInfo.refresh_fetch(ControlInfo.java:124)
	at org.eclipse.wb.internal.swt.model.widgets.ScrollableInfo.refresh_fetch(ScrollableInfo.java:49)
	at org.eclipse.wb.internal.swt.model.widgets.CompositeInfo.refresh_fetch(CompositeInfo.java:301)
	at org.eclipse.wb.core.model.ObjectInfo$6$1.run(ObjectInfo.java:496)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:139)
	at org.eclipse.wb.core.model.ObjectInfo$6.run(ObjectInfo.java:494)
	at org.eclipse.wb.core.model.ObjectInfo.execRefreshOperation(ObjectInfo.java:514)
	at org.eclipse.wb.core.model.ObjectInfo.refresh(ObjectInfo.java:492)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:583)
	at org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:525)
	at org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:452)
	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:449)
	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:468)
	at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:418)
	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:266)
	at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:244)
	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(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)



Re: Windowsbuilder design error przy SWT [message #819420 is a reply to message #819217] Mon, 12 March 2012 18:38 Go to previous messageGo to next message
Tomasz Zarna is currently offline Tomasz Zarna
Messages: 164
Registered: July 2009
Senior Member
michal b wrote on Mon, 12 March 2012 17:32

This could be caused by a WindowBuilder bug (...)


Skoro tak to zgłoś im buga. Nie zapomnij napisać jakiej wersji WB używasz, z jakim Eclipse. Przydadzą się też kroki instalacji/konfiguracji (może tam coś przeoczyłeś) i kroki które kończą się wspomnianym stacktracem.
Re: Windowsbuilder design error przy SWT [message #822598 is a reply to message #819420] Fri, 16 March 2012 21:15 Go to previous message
Mariusz P. is currently offline Mariusz P.
Messages: 85
Registered: February 2010
Member
Doradzałbym odinstalowanie WindowBuildera, a po restarcie środowiska Eclipse ponowne jego zainstalowanie - być może coś nie do końca dobrze się pobrało i/lub zainstalowało. W jaki sposób instalujesz? Jakie repozytorium? Jakie wersje Eclipse, WindowBuildera, Javy? Wybierasz jakieś opcje przy instalacji? Wymaganymi składnikami do poprawnego działania WindowBuildera są JDT i PDE (PDT akurat konkretnie dla SWT, nie ma ich w paczce Eclipse Classic, więc trzeba doinstalować).

Nowy projekt SWT można stworzyć w następujący sposób: File->New->Other->WindowBuilder->SWT Designer->SWT/JFace Java Project. W ten sposób do projektu zostaną dołączone wszystkie wymagane biblioteki, w tym i SWT (bo tak naprawdę bibliotekę SWT otrzymujemy z Eclipse (zerknij do podkatalogu plugins i poszukaj pliku jar zaczynającego sie od od org.eclipse.swt...).

[Updated on: Fri, 23 March 2012 08:30]

Report message to a moderator

Previous Topic:Zmiana rodzaju zmiennej - code folding
Next Topic:Genuitec is Hiring Remote Eclipse Product Developers
Goto Forum:
  


Current Time: Thu Jul 31 23:45:09 EDT 2014

Powered by FUDForum. Page generated in 0.02155 seconds