Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Running my Editor in different threads?
Running my Editor in different threads? [message #448718] Sat, 29 April 2006 07:04 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.lokahl.de

Hi,

I've extended an Editor from MultiPageEditorPart.
Is there a way to get eclipse to run/open different instances of this
editor in different threads?

Best regards,
Lorenz
Re: Running my Editor in different threads? [message #448736 is a reply to message #448718] Mon, 01 May 2006 07:36 Go to previous messageGo to next message
Eclipse UserFriend
Truck Turner wrote:
> Hi,
>
> I've extended an Editor from MultiPageEditorPart.
> Is there a way to get eclipse to run/open different instances of this
> editor in different threads?

What are you trying to do?

Eclipse runs all editor methods that it would call in the UI thread. It
must. But editors sometimes spin off other threads to do processing or
Jobs to do long running operations.

ex: the Java editor comes with the java reconciler thread which runs in
the background.

Any thread that's not the UI thread must use Display#(a)syncExec(*) any
time that thread wants to update UI components.

Later,
PW
Re: Running my Editor in different threads? [message #448776 is a reply to message #448736] Tue, 02 May 2006 04:09 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.lokahl.de

> What are you trying to do?
>
> Eclipse runs all editor methods that it would call in the UI thread. It
> must. But editors sometimes spin off other threads to do processing or
> Jobs to do long running operations.
>
> ex: the Java editor comes with the java reconciler thread which runs in
> the background.
>
> Any thread that's not the UI thread must use Display#(a)syncExec(*) any
> time that thread wants to update UI components.
>
> Later,
> PW

Hi Paul,

I'm writing a plugin which uses Hibernate.
Since I'm pretty lazy I wanted to re-use the commonly spreaded
'HibernateUtil' class (from the Hibernate in Action book).
That one uses ThreadLocal vars to keep a session and a tx for each
thread - well I guess this is ok for Servlets.

But I need a session and a tx for each of my editors opened.
If it would've been possible to just configure my plugin to use
different threads for each editor it would've been no work for me.

So, now I changed the HibernateUtil class to a Registry that's kept in
the plugin class. Wasn't that much effort ;-)

Thanks anyway,
T^2
Previous Topic:where is StatusTextEditor?
Next Topic:[MultiPageEditorPart] Is there any mechanizm to synchronized EditorPart?
Goto Forum:
  


Current Time: Sun Aug 31 08:18:52 EDT 2025

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

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

Back to the top