Open GoogleCodeExporter opened 9 years ago
This is a known limitation of the current API. We only try to open files in the
first instance of Visual Studio that we find.
We can improve this to search all current Visual Studio instances for a
solution that
contains a good match for the file. The tricky part here is that we only know
the
name of the file to open, we don't know which solution it belongs to.
Consequently,
Gallio tries to find a project in Visual Studio that contains the file and
opens it
there if it can.
This code is in the Navigator project under GallioNavigatorEngine.cs.
Here's what really should be done:
1. We should introduce a new kind of service for describing IDEs. The service
would
provide functions for opening files, launching in debug mode, and maybe doing
other
useful things.
2. Then we can implement a VisualStudioIDE component with the logic currently in
Gallio.Navigator/GallioNaviatorEngine.cs and make it smarter.
3. An IDE manager service could take care of trying to automatically find
registered
IDEs and doing the right thing based on the current content. For example, if
we're
running inside Visual Studio (say, in the ReSharper extension) then we should
really
prefer opening links in that instance if there's some way to figure out which
one it
really is. If VisualStudio isn't there, or maybe if the user configures Gallio
in a
particular way, then we should perhaps use Notepad or something else.
3. The current IDebugger service should probably be tied into IDEs in some way
but it
might make sense to keep it at least partially independent. There are some
unsolved
problems here such as how to be smart about starting a debugger for Ruby
projects, etc.
Caveats:
This generalization will make Gallio.Navigator.exe slower since it will have to
load
plugins. That shouldn't be too much of a problem because they get cached, but
there
is already a tricky little bit of work going on in the navigator extension to
achieve
process elevation when UAC gets in the way of stuff. It's not clear to me what
might
happen if Navigator actually needed to initialize the full Gallio runtime.
Original comment by jeff.br...@gmail.com
on 5 Mar 2010 at 8:36
Original comment by Yann.Tre...@gmail.com
on 17 Jul 2010 at 8:10
Original comment by Yann.Tre...@gmail.com
on 14 Jun 2011 at 5:53
Original issue reported on code.google.com by
bender.oh@googlemail.com
on 5 Mar 2010 at 6:46