Problem embedding SWT application within JBuilder [message #442296] |
Tue, 31 August 2004 18:49 |
S Dix Messages: 43 Registered: July 2009 |
Member |
|
|
Hi all,
I have one SWT application. I have the eclipse plugin for the same too.
Everything is working fine.
Now I am trying to build JBuilder plugin for the same application. I have
written one small code to check the embedding of my SWT code within the
java.awt.Panel and everything is working fine.
Now when I try to get the Shell using the following code,
java.awt.Canvas canvas = new Canvas();
SWT_AWT.new_Shell( DisplayThread.getInstance().getDisplay(), canvas );
DisplayThread.getInstance().getDisplay().syncExec( new Runnable()
{
public void run()
{
org.eclipse.swt.widgets.Shell shell = SWT_AWT.new_Shell(
DisplayThread.getInstance().getDisplay(), canvas );
shell.setLayout(new org.eclipse.swt.layout.FillLayout());
}
} );
I get the followind exception
org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:2717)
at org.eclipse.swt.SWT.error(SWT.java:2616)
at org.eclipse.swt.SWT.error(SWT.java:2587)
at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
at org.eclipse.swt.widgets.Control.createHandle(Control.java:46 2)
at
org.eclipse.swt.widgets.Composite.createHandle(Composite.jav a:173)
at
org.eclipse.swt.widgets.Decorations.createHandle(Decorations .java:320)
at org.eclipse.swt.widgets.Shell.createHandle(Shell.java:436)
at org.eclipse.swt.widgets.Control.createWidget(Control.java:47 7)
at
org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.j ava:129)
at
org.eclipse.swt.widgets.Decorations.createWidget(Decorations .java:327)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:251)
at org.eclipse.swt.widgets.Shell.win32_new(Shell.java:341)
at org.eclipse.swt.awt.SWT_AWT.new_Shell(SWT_AWT.java:269)
at com.myplugins.common.SWTContainer$1.run(SWTContainer.java:49 )
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:106)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2749)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2434)
at
com.myplugins.common.DisplayThread.swtEventLoop(DisplayThrea d.java:72)
at com.myplugins.common.DisplayThread.run(DisplayThread.java:65 )
org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:2717)
at org.eclipse.swt.SWT.error(SWT.java:2616)
at org.eclipse.swt.SWT.error(SWT.java:2587)
at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
at org.eclipse.swt.widgets.Control.createHandle(Control.java:46 2)
at
org.eclipse.swt.widgets.Composite.createHandle(Composite.jav a:173)
at
org.eclipse.swt.widgets.Decorations.createHandle(Decorations .java:320)
at org.eclipse.swt.widgets.Shell.createHandle(Shell.java:436)
at org.eclipse.swt.widgets.Control.createWidget(Control.java:47 7)
at
org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.j ava:129)
at
org.eclipse.swt.widgets.Decorations.createWidget(Decorations .java:327)
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:251)
at org.eclipse.swt.widgets.Shell.win32_new(Shell.java:341)
at org.eclipse.swt.awt.SWT_AWT.new_Shell(SWT_AWT.java:269)
at com.myplugins.common.SWTContainer$1.run(SWTContainer.java:49 )
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:106)
at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2749)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2434)
at
com.myplugins.common.DisplayThread.swtEventLoop(DisplayThrea d.java:72)
at com.myplugins.common.DisplayThread.run(DisplayThread.java:65 )
I have checked the Handles in the TaskManager. The number of Handles are
not increasing for JBuilder.exe process.
Can someone help with this, what is going wrong.
Thanks,
Sid
|
|
|
Powered by
FUDForum. Page generated in 0.02953 seconds