Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » swt widget called from Menu(calling swt widget from plugin Menu causes crash: org.eclipse.swt.SWTError: Not implemented [multiple displays])
swt widget called from Menu [message #734903] Mon, 10 October 2011 10:46
Lutz  is currently offline Lutz Friend
Messages: 4
Registered: September 2011
Junior Member
Plattrom is Linux x86_64, eclipse 3.7.1

executing following code:

public class Commit extends Git {
protected Process runShell(String arg) throws IOException {
Display firstDisplay = new Display();
Shell firstShell = new Shell(firstDisplay);
firstShell.setText("First Example");
firstShell.setSize(200, 100);
firstShell.open();
while (!firstShell.isDisposed()) {
if (!firstDisplay.readAndDispatch())
firstDisplay.sleep();
}
firstDisplay.dispose();


return Runtime.getRuntime().exec(
System.getenv("ASTA_PLUGIN_SH") + " commit " + arg + " xxx");
// ("/home/lutz/tmp/test.sh" +" " + arg);
}
}

causes the eclipse application to crash:

!STACK 0
org.eclipse.swt.SWTError: Not implemented [multiple displays]
at org.eclipse.swt.SWT.error(SWT.java:4308)
at org.eclipse.swt.widgets.Display.checkDisplay(Display.java:760)
at org.eclipse.swt.widgets.Display.create(Display.java:896)
at org.eclipse.swt.graphics.Device.<init>(Device.java:157)
at org.eclipse.swt.widgets.Display.<init>(Display.java:500)
at org.eclipse.swt.widgets.Display.<init>(Display.java:491)
at com.eads.asta.plugin.commit.handler.Commit.runShell(Commit.java:11)
at com.eads.asta.plugin.Git.execute(Git.java:46)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)


Is there an other way to call Widgets?
Thanks a lot in advance Razz
  • Attachment: Git.java
    (Size: 2.47KB, Downloaded 213 times)
  • Attachment: Commit.java
    (Size: 0.69KB, Downloaded 272 times)
Previous Topic:Is the StyledText class Customizable of the editor plugin ?
Next Topic:Dandelion PlugIn: Connection Error
Goto Forum:
  


Current Time: Fri Apr 26 11:39:21 GMT 2024

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

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

Back to the top