try {
preparedFile = showFileAdaper.prepareFileToView(presentationFile);
EventDispatchService dispatchService = EventDispatchService.getInstance();
if (preparedFile.isImageFile()) {
Image image = (Image) preparedFile.getContent();
dispatchService.fireEvent(new ShowImageEvent(image));
} else if (preparedFile.isTextFile()) {
String text = (String) preparedFile.getContent();
dispatchService.fireEvent(new ShowTextEvent(text));
}
} catch (ShowFileContentAdapterException e) {