* "C:/a.txt". We want workspace paths wherever possible.
*/
if (input instanceof IFileEditorInput) {
// Contains a file in the workspace
IFile file = ((IFileEditorInput) input).getFile();
return new TaskFileEvent(new Interval(start, end), file.getFullPath(), task);
} else if (input instanceof IURIEditorInput) {
// A file outside of workspace
URI uri = ((IURIEditorInput) input).getURI();
IPath path = new Path(uri.getPath());
return new TaskFileEvent(new Interval(start, end), path, task);
}
}
return null;
}