[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] OffscreenEditPart factory during build requires UI thread

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!