Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Fragment Project as a resource project
Fragment Project as a resource project [message #522580] Tue, 23 March 2010 09:00 Go to next message
czetsuya is currently offline czetsuyaFriend
Messages: 9
Registered: March 2010
Location: Philippines
Junior Member
Hi,

I know fragment is used for language and platform specific codes. I just want to ask if I can also used it to stored my resources, like images, text files etc.

For example, I have a plugin that used an image, that image will be stored in the fragment say in the res directory. Unfortunately, when I invoked the code:
Activator.getImageDescriptor("res/alt_about.gif").createImage();
//it throws java.lang.NullPointerException 


I thought the fragment would share the host plugin's Activator but it seems it can't find the res folder.

BTW, I've also included the res folder in the fragment's Build Configuration

Thanks,
czetsuya


Re: Fragment Project as a resource project [message #523336 is a reply to message #522580] Thu, 25 March 2010 23:24 Go to previous message
Qiangsheng Wang is currently offline Qiangsheng WangFriend
Messages: 5
Registered: February 2010
Junior Member
It does work. Double check that you include the resources folder,ie. res in your case, in your build.properties file for the binary build. You said that you did that, but it should work then.



[Updated on: Thu, 25 March 2010 23:25]

Report message to a moderator

Previous Topic:Errorlog View problem
Next Topic:Creating my own console in my RCP, redirecting output, want the same coloring as in normal console
Goto Forum:
  


Current Time: Sat Apr 27 05:04:30 GMT 2024

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

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

Back to the top