简体   繁体   English

如何在RCP应用程序中获取Eclipse共享图像?

[英]How to get eclipse Shared images in RCP application?

I tried to access the eclipse shared images using: 我尝试使用以下方式访问Eclipse共享图像:

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

but it returned null! 但它返回null! I also tried IDE.SharedImages.IMG_OBJ_PROJECT instead of ISharedImages.IMG_OBJ_PROJECT but no use it still returns null. 我也尝试了IDE.SharedImages.IMG_OBJ_PROJECT而不是ISharedImages.IMG_OBJ_PROJECT,但是没有使用它仍然返回null。 So how to get the shared images in eclipse RCP application? 那么如何在Eclipse RCP应用程序中获取共享图像?

ISharedImages.IMG_OBJ_PROJECT is deprecated and returns null, the non-deprecated values in ISharedImages work. ISharedImages.IMG_OBJ_PROJECT已被废弃,返回null,在非弃用值ISharedImages工作。

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. 对于项目的图像IDE.SharedImages.OBJ.PROJECT可以使用,但当您使用基于工作台顾问IDEWorkbenchAdvisor它增加了IDE共享的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM