call to ResourceManager in a separate plugin problem

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

call to ResourceManager in a separate plugin problem

Postby ezfresh » Thu Apr 12, 2007 6:13 am

I'm a java and rcp novice so, forgive me.

I've got an image that I'd like to use as the background for this com.xxx.UI project that I've got.
Everything worked fine when I had the com.swtdesigner package (including ResourceManager.java) within the UI project. However, I wanted to pull out any common resources and put them into a separate plugin so the plugin can be included across multiple applications. (this allows me to eliminate the com.swtdesigner package within the com.xxx.UI project)

So, I now have a com.xxx.resources plugin that includes Fonts/Colors files as well as a package that contains the ResourceManager class.

My image is in a directory within com.xxx.UI project and my call to the getPluginImage() method now calls the new com.xxx.resources plugin. Why am I getting a null when the image is returned to the UI? How can I fix the ResourceManager so that I can accomplish what I'm trying to do?
ezfresh
 
Posts: 2
Joined: Wed Apr 11, 2007 6:08 am

Postby ezfresh » Thu Apr 12, 2007 10:01 am

I found out what I had done.

In case someone else is as dumb as I am, I simply forgot to add
org.eclipse.core.runtime as a dependency in my new resource plugin

sigh
ezfresh
 
Posts: 2
Joined: Wed Apr 11, 2007 6:08 am

Postby Eric Clayberg » Mon Apr 23, 2007 5:08 am

Yes, the getPluginImage() method requires org.eclipse.core.runtime which provides the ability to find a resource relative to a plugin.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests