Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Display not available when plugin starts()
Display not available when plugin starts() [message #1049005] Thu, 25 April 2013 08:18
Laurent Petit is currently offline Laurent Petit
Messages: 21
Registered: December 2010
Junior Member
tl;dr: is it ok (as in technically possible, not as in 'recommanded or not recommanded') for a start() method of an UI plugin to call Display.asyncExec(new Runnable()) ?

Hello,

My plugin is a UI plugin (extends AbstractUIPlugin, FWIW).

It declares a Builder, and also a classpath container, among other things.

It also happens to have Preferences, extending AbstractPreferenceInitializer, using method initializeDefaultPreferences(), and declared via plugin.xml.

Recently, lots of users have reported problems for restarting their Eclipse, especially after a crash (be it unwanted, or provoked by them because Eclipse became unresponsive).

(I can now easily reproduce the situation by force-crashing my target platform, and then restarting).

What I see is that my plugin is started early on by the OSGi platform.

And since my Preferences depend on some JDT preferences, at some point there is a null pointer exception, because JDT preferences try to get some JFace PreferenceConverter, which in turn tries to get the Display.

But the display is not even created yet, and my plugin - and more than often the entire Eclipse - refuses to start.

Thanks in advance,

-- Laurent
Previous Topic:Eclipse plugin project with no view
Next Topic:Get an Iproject from Export Wizard
Goto Forum:
  


Current Time: Tue Sep 23 22:36:28 GMT 2014

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

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