Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Providing Images
Providing Images [message #43597] Mon, 02 February 2009 08:22
Damian Philipp is currently offline Damian PhilippFriend
Messages: 30
Registered: July 2009
Member
Hello,

as I got my plugin mostly working, now there is a desire for some sleek
looks. Thus, I need to add some images. I came across the interesting
article at
http://www.eclipse.org/articles/Article-Using%20Images%20In% 20Eclipse/Using%20Images%20In%20Eclipse.html
which mentions, that each AbstractUIPlugin has an ImageRegistry built-in
and all I need to do is initialize it.

However, attempting to do this yielded some trouble. I tried
initializing the ImageRegistry in
AbstractUIPlugin#initializeImageRegistry(ImageRegistry) as recommended
in the JavaDoc but got stuck when I discovered that ImageDescriptor is
abstract and no implementation is available.

There is an Implementation FileImageDescriptor, but its Package-Private.
Is there any reason for this? The class appears to be rather
straugt-forward, copying it to my own plugin showed no errors. Can this
class be made public?


Additionally, I gave some thought to this image-situation. Is there any
particular reason, why there is no extension point to add Images
declaratively to the platform ImageRegistry or at least the plugin
ImageRegistry? An ID, the plugin ID (in case of platform registry) and
the path within the plugin should be sufficient to be able to
automatically create an ImageDescriptor for every Image specified.

When implemented in
AbstractUIPlugin#initializeImageRegistry(ImageRegistry) this should not
break any existing functionality. Anyone wishing to use the new
extension point just has to add a call to super.

Specifying a few icons seems like a fairly common use-case, especially
since eclipse doesn't provide much of its own Icons. (Every once in a
while I come across a site offering all the current eclipse icons for
download and inclusion in custom plugins - most IDE-Icons are missing
from API).

Regards
Damian Philipp
Previous Topic:How to exclude test directory in Export
Next Topic:Providing Images
Goto Forum:
  


Current Time: Tue Mar 19 05:31:41 GMT 2024

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

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

Back to the top