Skip to main content



      Home
Home » Eclipse Projects » GEF » Creating EditParts and Figures outside the SWT Thread
Creating EditParts and Figures outside the SWT Thread [message #167787] Thu, 10 February 2005 20:01 Go to next message
Eclipse UserFriend
We are creating a graphical editor using GEF. Unfortunately the creation of
the EditParts,
IFigures and the layout code takes a long time (~30 seconds). Does GEF
support putting
up some loading message or icon in the middle of the FigureCanvas while
loading and laying-out a model
off of the SWT thread? The purpose of doing this is to allow users to switch
to
other files will our model is being loaded. Is this possible?
Re: Creating EditParts and Figures outside the SWT Thread [message #167864 is a reply to message #167787] Fri, 11 February 2005 11:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Nick Lerissa wrote:
> We are creating a graphical editor using GEF. Unfortunately the creation of
> the EditParts,
> IFigures and the layout code takes a long time (~30 seconds). Does GEF
> support putting
> up some loading message or icon in the middle of the FigureCanvas while
> loading and laying-out a model
> off of the SWT thread? The purpose of doing this is to allow users to switch
> to
> other files will our model is being loaded. Is this possible?
>
>

I don't think GEF has any facilities in place for this specifically.
You can have your EditPart return a 'wait' figure as its figure while
you are loading the true stuff. Then when its loaded, fire an event
that causes your editpart to update its figure to the true figure.

So simply swap out the figures when you have the real one prepared.

CL
Re: Creating EditParts and Figures outside the SWT Thread [message #168030 is a reply to message #167787] Sun, 13 February 2005 20:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Why does it take 30 seconds? Is it GEF, or just loading the file that is
the problem.

You can create UI jobs which communicate with the main thread. You can also
invoke Display.asyncExec to access the correct thread.

What are you doing during this 30 seconds? I may have some more ideas.

"Nick Lerissa" <nick_lerissa@yahoo.com> escreveu na mensagem
news:cuh00q$37m$1@www.eclipse.org...
>
> We are creating a graphical editor using GEF. Unfortunately the creation
> of the EditParts,
> IFigures and the layout code takes a long time (~30 seconds). Does GEF
> support putting
> up some loading message or icon in the middle of the FigureCanvas while
> loading and laying-out a model
> off of the SWT thread? The purpose of doing this is to allow users to
> switch to
> other files will our model is being loaded. Is this possible?
>
>
Re: Creating EditParts and Figures outside the SWT Thread [message #168281 is a reply to message #168030] Mon, 14 February 2005 16:39 Go to previous message
Eclipse UserFriend
It takes 30 seconds because the models are quite big and layout data is
not stored in the model and needs to be calculated once the once the
figures have been created.

If I load the model in a seperate thread and show a loading image while
the loading is taking place, I'm assuming that creation of the EditParts,
Figures, and layout still need to take place in the SWT thread. Is this
assumption correct?

Randy Hudson wrote:

> Why does it take 30 seconds? Is it GEF, or just loading the file that is
> the problem.

> You can create UI jobs which communicate with the main thread. You can also
> invoke Display.asyncExec to access the correct thread.

> What are you doing during this 30 seconds? I may have some more ideas.

> "Nick Lerissa" <nick_lerissa@yahoo.com> escreveu na mensagem
> news:cuh00q$37m$1@www.eclipse.org...
>>
>> We are creating a graphical editor using GEF. Unfortunately the creation
>> of the EditParts,
>> IFigures and the layout code takes a long time (~30 seconds). Does GEF
>> support putting
>> up some loading message or icon in the middle of the FigureCanvas while
>> loading and laying-out a model
>> off of the SWT thread? The purpose of doing this is to allow users to
>> switch to
>> other files will our model is being loaded. Is this possible?
>>
>>
Previous Topic:Wizards and errors and undoability.
Next Topic:ComponentEditPolicy and deletion
Goto Forum:
  


Current Time: Wed Jun 18 15:08:14 EDT 2025

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

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

Back to the top