[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Deadlock eclipse UI startup and DiagramUIPlugin activation from builder

After some various failures (that seemed like the more correct approaches), I seem to have a hackish sort of workaround.
Its not a good general solution, but it avoids the
problem with the class loader lock and syncExec() in a secondary thread deadlocking with the UI thread that is loading classes.


1) I set my diagram editor plugin to auto start, implementing
  IStartup, and providing an empty earlyStartup() method.

2) In the static initializer for the plugin, I put the code from DiagramUIPlugin that initialized the preferences pages that the
DiagramUIPlugin also initializes.


The result is that the initial thread that's doing workbench startup
loads all of the classes involved in the deadlock so that the secondary
thread never (for these classes) is required to dynamically load them
or get the class loader lock.

It works, but, yuck, there's no reason the same deadlock can't happen
for other classes or reasons.

Does anyone else have any better suggestions or comments?