Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » "Invalid thread access" while closing editor
"Invalid thread access" while closing editor [message #96001] Thu, 17 July 2003 19:22 Go to next message
Eclipse UserFriend
Hi,
I always get an exception like below, when ever I call
===
editors[ editorIndex ].getPage( ).closeEditor( (editorPart, true );
====
Anyone know how can I avoid this problem?

Thanks
Elwin
====== Exceptions ====
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:2332)
at org.eclipse.swt.SWT.error(SWT.java:2262)
at org.eclipse.swt.widgets.Widget.error(Widget.java:385)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:315)
at
org.eclipse.swt.widgets.Control.removeMouseMoveListener(Cont rol.java:1599)
at org.eclipse.ui.internal.PartDragDrop.dispose(PartDragDrop.ja va:182)
at
org.eclipse.ui.internal.EditorWorkbook.disableTabDrag(Editor Workbook.java:425)
at
org.eclipse.ui.internal.EditorWorkbook.removeListeners(Edito rWorkbook.java:742)
at org.eclipse.ui.internal.EditorWorkbook.remove(EditorWorkbook .java:679)
at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.j ava:193)
at
org.eclipse.ui.internal.EditorPresentation.closeEditor(Edito rPresentation.java:80)
at
org.eclipse.ui.internal.EditorPresentation.closeEditor(Edito rPresentation.java:70)
at
org.eclipse.ui.internal.EditorManager.closeEditor(EditorMana ger.java:127)
at
org.eclipse.ui.internal.WorkbenchPage.closeEditor(WorkbenchP age.java:823)
Re: "Invalid thread access" while closing editor [message #96517 is a reply to message #96001] Fri, 18 July 2003 10:09 Go to previous message
Eclipse UserFriend
Elwin wrote:
> Hi,
> I always get an exception like below, when ever I call
> ===
> editors[ editorIndex ].getPage( ).closeEditor( (editorPart, true );
> ====
> Anyone know how can I avoid this problem?
>
> Thanks
> Elwin
> ====== Exceptions ====
> org.eclipse.swt.SWTException: Invalid thread access

Sounds like you are trying to run UI code on a non-UI thread. Detailed
info here:

http://dev.eclipse.org/help21/index.jsp?topic=/org.eclipse.p latform.doc.isv/guide/swt_threading.htm

There is some sample code that might help you about 3/4 of the way down
that page.

Jeff
Previous Topic:how to setup one jar file for multiple plugins?
Next Topic:XSLT + Xalan-Problems
Goto Forum:
  


Current Time: Tue Jul 15 09:06:00 EDT 2025

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

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

Back to the top