IWorkbenchPage page = window.getActivePage();
IPath path = new Path(filename);
// If the file exists in the workspace, open it
- IFile file = getWorkspace().getRoot().getFileForLocation(path);
+ IFile file = getWorkspace().getRoot().getFile(path);
IEditorPart editor;
ITextEditor textEditor;
if (file != null && file.exists()) {