Wrong newsgroup.
"Federica" <a@xxx> wrote in message news:d58jd6$u5q$1@xxxxxxxxxxxxxxxxxxx
Hi all,
I'm writing a plugin, and I'm blocked on a strange behavior. My plugin
contains a wizard, and as soon as I start a debug session for it and try
to open the wizard I get the following message on the console:
Unhandled event loop exception
Reason:
Workspace is closed.
In the .log file, I find the exception shown at the end of this
messasge. I'm running Eclipse 3.1 M6. I've tried to debug the problem,
and here is what I'm seeing. The exception happens because when
ResourcesPlugin.getWorkspace() is called ResourcesPlugin.workspace is
null. The filed is set to null only in two places: at static
initialization (when the class is loaded), and in the shutdown() method.
I've placed a Watch on the workspace variable, and I do see it being
initialized with a valid instance before the debugged Workbench shows
up. However, when I try to open my wizard, I end up in the exception
without seing any more assignment to the workspace variable.
Can someone give me a hint? I'm totally lost!
Thank you,
Federica
java.lang.IllegalStateException: Workspace is closed.
at
org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java
:320)
at
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.createTreeViewer(Co
ntainerSelectionGroup.java:255)
at
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.createContents(Cont
ainerSelectionGroup.java:205)
at
org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.<init>(ContainerSel
ectionGroup.java:142)
at
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.createContents(Re
sourceAndContainerGroup.java:174)
at
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.<init>(ResourceAn
dContainerGroup.java:135)
at
org.eclipse.ui.dialogs.WizardNewFileCreationPage.createControl(WizardNewFile
CreationPage.java:189)
at
teja.TejaViewerCreationWizard$CreationPage.createControl(TejaViewerCreationW
izard.java:60)
at
org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1020)
at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1013)
at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1003)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1001)
at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:753)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:345)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:803)
at org.eclipse.jface.window.Window.open(Window.java:781)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:181)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Action
ContributionItem.java:538)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionI
tem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContribu
tionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306)
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:228)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156)
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:324)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:315)
at org.eclipse.core.launcher.Main.basicRun(Main.java:268)
at org.eclipse.core.launcher.Main.run(Main.java:942)
at org.eclipse.core.launcher.Main.main(Main.java:926)