The Tasks view provides two approaches for opening the file associated with a task:
Select the task, and from the context menu choose Go To File
Double click on the task
In both cases the file's editor is opened and the line with which the selected task is associated is highlighted.