AbstractUIPlugin.initializeImageRegistry is called TOO LATE [message #259393] |
Wed, 07 July 2004 16:31 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03333 seconds