Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » AbstractUIPlugin.initializeImageRegistry is called TOO LATE
AbstractUIPlugin.initializeImageRegistry is called TOO LATE [message #259393] Wed, 07 July 2004 16:31
Eclipse UserFriend
Originally posted by: otousset.skynet.be

Hi,

I have a plugin with a X1Plugin class.
In this class I have:

public class X101Plugin extends AbstractUIPlugin {
...
protected void initializeImageRegistry(ImageRegistry reg) {
try {
URL baseURL = getStateLocation().toFile().toURL();
reg.put("I1", ImageDescriptor.createFromURL(new URL(baseURL,
"icons/Icones 0A1_16.png")));
} catch(MalformedURLException ex) {
}
...
}

I have also a view MyView with this code:

public class MyView extends ViewPart {
...
public void createPartControl(Composite parent) {
...
makeActions();
...
}

private void makeActions() {
...

action1.setImageDescriptor(X101Plugin.getDefault().getImageR egistry().getDes
criptor("I1"));
...
}
...
}

My problem is that makeActions() is called before initializeImageRegistry().
(I have traced it)
And my image is not yet in the image registry.
I have no error but no image (only red squares in place).

Can anyone help me ?

Thanks a lot.
Previous Topic:Question About PDE Build
Next Topic:Markers in 3.0 - image doesn't use my icon
Goto Forum:
  


Current Time: Thu Sep 18 04:25:44 EDT 2025

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

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

Back to the top