Understanding the TreeModel[
^]
You could check your node whether it is a file and then extract the file type ending. With that you can retrieve the file icon by searching for the program that supports this file from the OS:
final int iSplit = strFileName.lastIndexOf('.') + 1;
if (0 < iSplit) {
final String strExtension = strFileName.substring(iSplit);
if (null != strExtension) {
final Program oProgram = Program.findProgram("." + strExtension);
if (null != oProgram) {
return new Image(Display.getCurrent(), oProgram.getImageData());
}
}
}