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 #590961] Mon, 02 February 2009 10:33
Damian Philipp is currently offline Damian PhilippFriend
Messages: 30
Registered: July 2009

i just realized that the swt group is actually a better place for this,
so here goes the cross-post.

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 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).

Damian Philipp
Previous Topic:Can I use ant build rcp product?Anybody has correct example?
Next Topic:Missing Plugin version while updating ?
Goto Forum:

Current Time: Sat Jul 31 03:26:22 GMT 2021

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

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

Back to the top