Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Different Behaviour between Platforms hide shell
Different Behaviour between Platforms hide shell [message #483537] Tue, 01 September 2009 23:39
Christian is currently offline ChristianFriend
Messages: 72
Registered: July 2009
Member
Hello,

Just wanted to ask if someone beside me found has tried that and found
strange behaviour. Would be nice if someone could reproduce the problem.

In my WorkbenchWindowAdvisor I register a Selectionlistener with a
TrayItem. The listeners job is to to enlarge the shell again from an
iconified state.
following code:

private void hookMinimized(final IWorkbenchWindow window) {
enlarge = new Listener() {
public void handleEvent(Event e) {
IHandlerService ihs =
(IHandlerService)window.getService(IHandlerService.class);
try {
ihs.executeCommand(EnlargeShellHandler.CommandID, null);
} catch (Exception e1) {
logger.warn(e1, e1);
}
}
};
}
....

On Windows this code seems to work fine.
Though on some Linux systems I was presented with the following
stacktrace by some users:

#
org.eclipse.core.commands.ExecutionException: No activeWorkbenchWindow
found while executing eu.jucy.gui.maximizeGUI
#
at
org.eclipse.ui.handlers.HandlerUtil.noVariableFound(HandlerU til.java:40)
#
at
org.eclipse.ui.handlers.HandlerUtil.getVariableChecked(Handl erUtil.java:89)
#
at
org.eclipse.ui.handlers.HandlerUtil.getActiveWorkbenchWindow Checked(HandlerUtil.java:210)
#
at
eu.jucy.gui.EnlargeShellHandler.execute(EnlargeShellHandler. java:23)
#
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:294)
#
at
org.eclipse.core.commands.Command.executeWithChecks(Command. java:476)
#
at
org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:178)
#
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:247)
#
at
eu.jucy.gui.ApplicationWorkbenchWindowAdvisor$6.handleEvent( ApplicationWorkbenchWindowAdvisor.java:245)
#
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
#
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
#
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3493)
#
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3112)
#
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
#
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
#
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
#
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
#
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
#
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
#
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
#
at eu.jucy.gui.Application.start(Application.java:74)
#
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
#
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(EclipseS tarter.java:368)
#
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
#
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
#
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
#
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
#
at java.lang.reflect.Method.invoke(Method.java:597)
#
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
#
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
#
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
#
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)


Has anyone else ever noticed such a problem?

Christian
Previous Topic:Programmatically associate views to categories
Next Topic:Can I use a command parameter in its handler's enabledWhen?
Goto Forum:
  


Current Time: Thu Mar 23 22:10:26 GMT 2017

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

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