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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top