Question

I tried to access the eclipse shared images using:

PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_PROJECT);

but it returned null! I also tried IDE.SharedImages.IMG_OBJ_PROJECT instead of ISharedImages.IMG_OBJ_PROJECT but no use it still returns null. So how to get the shared images in eclipse RCP application?

Was it helpful?

Solution

ISharedImages.IMG_OBJ_PROJECT is deprecated and returns null, the non-deprecated values in ISharedImages work.

For the project image IDE.SharedImages.OBJ.PROJECT can be used but only if you are using a workbench advisor based on IDEWorkbenchAdvisor which adds the IDE shared images.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top