}
} else if (element instanceof IStorageEditorInput) {
// a file is in Repository Exploring Perspective (or others?)
IStorageEditorInput input = (IStorageEditorInput) element;
document = createHdlDocument(null, null);
InputStream stream = input.getStorage().getContents();
setDocumentContent(document, stream, getEncoding(element));
} else if (element instanceof IPathEditorInput) {
// Maybe this is not executed on Eclipse 3.3 or later
// Eclipse 3.2 executed for a file outside of workspace
IPathEditorInput input = (IPathEditorInput) element;
document = createHdlDocument(null, null);
FileInputStream contentStream = null;
try {
contentStream = new FileInputStream(input.getPath().toFile());
setDocumentContent(document, contentStream,
getEncoding(element));
} catch (FileNotFoundException e) {
e.printStackTrace();
document = null;