I'm programming in eclipse, running on a two monitor setup. On one of the monitors I've only got the Project Explorer and Editor as a custom Perspective, and on the other one I got the other tools such as the console, debug, tasks, variables, breakpoints e.t.c.
When I click a task in the task view, for example, this will open the resource in which the //TODO comment is located. The only problem is that the resource is opened in the second monitor. How can I configure eclipse to always open resource files in the already existing editor, even if it's in another window?
It sounds like you opened a second window (aka, Workbench) using Window > New Window. In that case, you actually have 2 separate workbenches and hence two separate editor areas. The views in one window only know about the views and editor area associated with that window.
To accomplish something close to what you seem to be looking for, I think the best (only?) option is to detach the views you want to be separated from your editor (eg, Console, Tasks, etc) and place them on the secondary monitor. It's not nearly as easy to manage as two separate windows each with a different Perspective, but it's the only way I know of to keep a single editor area.