In answer to your last question about how to trigger an action in the Output window then that can be done. When you double click a line in the Output window the IDE looks to see if the line is of the form: <filename>(line). If it finds such a format then it will open the given filename and jump to the given line. AFAIK this is the extent, outside a VS extension, that you can trigger an action from the window. I don't believe it matters whether the file is actually part of the project or not, it simply opens the file (if it isn't open) and jumps to the line given.
This is how code generators work. For example C++/C# support a line pragma that, when used in code, causes the compiler to use the given line/# in the pragma instead of the actual line a warning/error would have used. Code generators like T4 generate C# code with the line pragmas in them that point back to the T4 template lines. If a compiler error occurs in the generated code then rather than pointing to the generated code it points back to the T4 template. Double clicking that line in the output window causes the dev to jump to the template where the problem is and not the generated code that actually contains the error line.