Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Platform.getExtensionRegistry() returns null !!
Platform.getExtensionRegistry() returns null !! [message #899027] Mon, 30 July 2012 09:02 Go to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
Hello,
I have an error with the class org.eclipse.core.runtime.Platform. When I
execute the instruction:
IExtensionRegistry registry = Platform.getExtensionRegistry();
registry is null.

is there something I missed ?

Re: Platform.getExtensionRegistry() returns null !! [message #899034 is a reply to message #899027] Mon, 30 July 2012 09:39 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 2012-07-30 11:02, becks m wrote:
> Hello,
> I have an error with the class org.eclipse.core.runtime.Platform. When I
> execute the instruction:
> IExtensionRegistry registry = Platform.getExtensionRegistry();
> registry is null.
> is there something I missed ?

It is documented when the result could be null:

"Note this method is purely a convenience and {@link
RegistryFactory#getRegistry()} should generally be used instead."

Checking RegistryFactory#getRegistry() we find:

"Returns the default extension registry specified by the registry provider.
May return <code>null</code> if the provider has not been set or if the
registry has not been created."

HTH & Greetings from Bremen,

Daniel Krügler
Re: Platform.getExtensionRegistry() returns null !! [message #899489 is a reply to message #899034] Wed, 01 August 2012 07:17 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

If you use Eclipse 4 you could use @Inject IExtensionRegistry factory to get the IExtensionRegistry object.
Previous Topic:E4 Switch Views
Next Topic:How to perform an action after eclipse plugin is opened
Goto Forum:
  


Current Time: Tue Mar 19 11:01:58 GMT 2024

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

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

Back to the top