I am using eclipse e4. I need to add an image for checkbox(checked and unchecked). I have tried adding the image in the following way in table viewer. I can see only red spots in place of the image.
I have used the following code snippet.
private void createCheckedImage() {
Bundle bundle = FrameworkUtil.getBundle(ColumnLabelProvider.class);
URL url = FileLocator.find(bundle, new Path("icons/checkbox_yes.png"), null);
ImageDescriptor imageDcr = ImageDescriptor.createFromURL(url);
CHECKED = imageDcr.createImage();
}
I am not sure whether I am doing it correct. Can anyone suggest some ideas?