Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Extension and Extension Points(Cannot access extension point created in a plugin in some other plugin. Either Factory is null or the Extension object is null if we do some work arround for factory object)
Extension and Extension Points [message #1729789] Tue, 19 April 2016 06:38 Go to next message
Yash Agarwal is currently offline Yash AgarwalFriend
Messages: 2
Registered: April 2016
Junior Member



I have created an extension point in one plugin(say plugin 'X') and I have installed that plugin in a new workspace. In this new workspace, I have created a plugin project and I am trying to access the extension point through below code:

1.

public class Tester {

public static void main(String[] args) {
IExtensionRegistry registry =Platform.getExtensionRegistry();
registry.getExtensionPoint(extensionPointId);
}

}




The problem here is the registry is null.




I searched on the internet and found some other way of getting the registry. But the problem there was IExtensionPoint object was null.
Re: Extension and Extension Points [message #1729842 is a reply to message #1729789] Tue, 19 April 2016 12:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29394
Registered: July 2009
Senior Member
This is not a question about modeling. Note that you should run your
test code as an Equinox application, not a stand alone Java main if you
want the registry to be initialized property by the OSGi runtime.


On 19.04.2016 14:17, Yash Agarwal wrote:
>
>
>
> I have created an extension point in one plugin(say plugin 'X') and I
> have installed that plugin in a new workspace. In this new workspace,
> I have created a plugin project and I am trying to access the
> extension point through below code:
>
> 1.
>
> public class Tester {
>
> public static void main(String[] args) {
> IExtensionRegistry registry =Platform.getExtensionRegistry();
> registry.getExtensionPoint(extensionPointId);
> }
>
> }
>
>
>
>
> The problem here is the registry is null.
>
>
>
> I searched on the internet and found some other way of getting the
> registry. But the problem there was IExtensionPoint object was null.
Previous Topic:[EMF] "@generated NOT" does not work
Next Topic:Modelling Attribute Dependencies
Goto Forum:
  


Current Time: Mon Jun 25 06:31:32 GMT 2018

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

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

Back to the top