Вопрос

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