Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » swing/awt threading question
swing/awt threading question [message #440009] Tue, 20 July 2004 16:04 Go to next message
David Scott is currently offline David ScottFriend
Messages: 19
Registered: July 2009
Junior Member
i am writing a ViewPart for the eclipse Workbench using a simple JList
swing component inside swt. the ViewPart registers itself as an
ISelectionProvider using an adapter for the ListSelectionModel in the
JList. The ViewPart is providing IAdaptable(s) for the Property view and
the Outline view which are both still swt components. When the
ListSelectionModel fires the Property view is notified by the adapter
and it got an SWTException indicating a threading error - so in the
ISelectionProvider adapter i put the notification inside a
Display.getDefault().asyncExec(). ok, so this left me wondering when i
get calls coming from swt components - do i need to wrap them in
EventQueue.invokeLater()?

thanks-
Re: swing/awt threading question [message #440039 is a reply to message #440009] Wed, 21 July 2004 16:38 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Yes. Swing widgets are single threaded and should only be called from the
event dispatch thread.

"David Scott" <user@example.net> wrote in message
news:cdjfnp$rc8$1@eclipse.org...
> i am writing a ViewPart for the eclipse Workbench using a simple JList
> swing component inside swt. the ViewPart registers itself as an
> ISelectionProvider using an adapter for the ListSelectionModel in the
> JList. The ViewPart is providing IAdaptable(s) for the Property view and
> the Outline view which are both still swt components. When the
> ListSelectionModel fires the Property view is notified by the adapter
> and it got an SWTException indicating a threading error - so in the
> ISelectionProvider adapter i put the notification inside a
> Display.getDefault().asyncExec(). ok, so this left me wondering when i
> get calls coming from swt components - do i need to wrap them in
> EventQueue.invokeLater()?
>
> thanks-
>
Previous Topic:Coolbar repaint on application regaining focus (Win2K)
Next Topic:Table header color
Goto Forum:
  


Current Time: Thu Apr 18 08:45:57 GMT 2024

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

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

Back to the top