Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top