Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » unexpected null return value from IPluginModelBase.getBundleDescription()
unexpected null return value from IPluginModelBase.getBundleDescription() [message #595287] Wed, 15 April 2009 20:52
No real name is currently offline No real nameFriend
Messages: 6
Registered: July 2009
Junior Member
Hi all,

Someone on the equinox newsgroup suggested I post this here. We're
running Eclipse in headless mode and computing classpaths for plugin
projects via BundleDescriptions. On some runs, we unexpectedly get null
as the return value from a call to
IPluginModelBase.getBundleDescription(). Here is the code:


private IPluginModelBase findModel(IProject p) {
return PDECore.getDefault().getModelManager().findModel(p);
}

IProject p = ...;
BundleDescription bd = findModel(p).getBundleDescription();

The documentation says that null can be returned if the project is in a
classic format, but we know that's not the case here since most of the
time getBundleDescription() works correctly and returns a non-null value.
Our guess is that we're hitting some kind of race condition, but I tried
running the above code in a Job that locks the whole workspace, and we
still saw the problem. I searched Bugzilla and didn't see anything
directly relevant. Any advice on this issue would be very welcome.
Thanks!

Best,
Manu
Previous Topic:Plug-in View: Import As | Source Project
Next Topic:Headless build doesn't enforce OSGi constraints
Goto Forum:
  


Current Time: Mon Jun 14 23:53:30 GMT 2021

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

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

Back to the top