Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to access Icons under src/main/resources folder in Mars.2
How to access Icons under src/main/resources folder in Mars.2 [message #1735739] Wed, 22 June 2016 11:22
Vivek Veera is currently offline Vivek VeeraFriend
Messages: 18
Registered: July 2015
Junior Member
Hi All,

I have recently moved to Eclipse Mars.2 (4.5.2) from Eclipse Kepler (4.3) for development and building a jar using Maven 3.3.9. I am not able to access my icons placed under src/main/resources folder in a plug-in (say com.foo.bar.resource) from other plug-ins in my application. This happens for some Eclipse Extension Points like org.eclipse.ui.views or org.eclipse.ui.editors where icon attribute expects relative name of the icon. Whereas for other Extension Points like org.eclipse.ui.newWizards where icon attribute expects relative path of the icon, it works fine.

My resource plug-in folder structure is like this:

com.foo.bar.resource (my resource plug-in)
> src/main/resources
> com.foo.bar.resource.image
> logo.png
> header.png

I am accessing this resource from another plugin using "icon" attribute as below and the image (logo.png) is not accessible:

<extension
point="org.eclipse.ui.editors">
<editor
class="com.prd...EditorClass"
default="true"
extensions="mylang"
icon="platform:/plugin/com.foo.bar.resource/com/foo/bar/resource/image/logo.png"
id="com.prd.."
name="mylabel">
</editor>
</extension>

Now, if I move my images outside src/main/resources folder and place them directly under com.foo.bar.resource folder as below. Then its accessible.

com.foo.bar.resource (my resource plug-in)
> logo.png
> header.png

I did not face this problem in Eclipse Kepler and everything worked fine. I was able to access icons placed under src/main/resources folder in resource plugin from all Eclipse Extension Points.

I would like to understand difference between relative path and relative name which are used for icon attribute value in Eclipse Extension Points. Because, I face issue wherever relative name is expected for the icon and it works fine where icon attribute expects relative path of the icon. I could not find the difference on Eclipse online help.

Appreciate any help in understanding and resolving this issue.

Thanks.
Vivek
Previous Topic:Showing hidden directories in Project Explorer view
Next Topic:Problem exporting standalone GMF editor
Goto Forum:
  


Current Time: Sat Sep 22 01:49:30 GMT 2018

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

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

Back to the top