Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » how to read a file in another plugin?
how to read a file in another plugin? [message #905927] Fri, 31 August 2012 10:17
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
Hi All,

I have model.ecore in a plugin com.kosala.model\model

com.kosala.model
-src
-\model\model.ecore

I need to read model.ecore, while i am in com.kosala.logic plugin by giving the relative path.

I followed this link <http://www.vogella.com/blog/2010/07/06/reading-resources-from-plugin/>

Problem:

My code gives NullPonterException

BundleContext bc=FrameworkUtil.getBundle(new com.kosala.model.src.Activator().getClass()).getBundleContext();
new com.kosala.osgi.Activator().start(bc);
Bundle bundle = bc.getBundle();


any help is appriciated.

Thanks in advance
K
Previous Topic:Non p2 compliant plugin not loading in Solaris
Next Topic:Creating extensions in plugin.xml programmatically?
Goto Forum:
  


Current Time: Wed Nov 26 09:29:30 GMT 2014

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

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