Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » OffscreenEditPart factory during build requires UI thread
OffscreenEditPart factory during build requires UI thread [message #234014] Wed, 17 June 2009 22:18 Go to next message
Fred A. Kulack is currently offline Fred A. KulackFriend
Messages: 17
Registered: July 2009
Junior Member
I'm having some trouble and hoping someone can help.

We have a DiagramEditor for our product, IBM DDQB (Data Discovery
and Query Builder). I have a builder which runs diagram and EMF
validation.

It uses OffscreenEditPartFactory.createDiagramEditPart()
to generate edit parts used during validation and then creates problem
markers for issues. All this was originally based off of generated
GMF validation code.

The problem is that for some of the larger diagrams that our clients have,
this OffscreenEditPartFactory.createDiagramEditPart() takes on the order
of 10-30 seconds.

Because this method doesn't run correctly unless its on the UI thread,
it must be run using Display.syncExec() or Display.asyncExec() and the
UI locks up during this time. The actual validation doesn't require the
UI thread and the 10-30 seconds is only the createDiagramEditPart()
method call.

I've played around with creating my own Display and Shell in the current
thread for the OffscreenEditPartFactory to use during the run, but have
had no luck, always ending up with an invalid thread access by various
pieces of the framework.

Does anyone have any recommendations for avoiding the UI thread requirement
with OffscreenEditPartFactory.createDiagramEditPart()?

We use eclipse 3.4.2. More details available at any time.
Thanks!
Re: OffscreenEditPart factory during build requires UI thread [message #234145 is a reply to message #234014] Thu, 18 June 2009 18:25 Go to previous message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Yes, editparts creation have to be on the UI thread unfortunately... I'd
recommend, as you figured out on your own, multiple display threads
(assuming you're on Windows). Invalid thread access problems are fixed
with GMF 2.2 any RC build. Try it let us know about the any issues you
find with multiple display threads.

Cheers,
Alex
Previous Topic:Layout information persistence
Next Topic:Custom Layout in Compartment
Goto Forum:
  


Current Time: Wed Apr 01 22:27:25 GMT 2020

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

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

Back to the top