Jump To Code from a DotNet Add-in


Is it possible to jump to a code in a source document I'm looking for functionality
similar to the jump-to-code feauture of Visual Studio .Net when there are compile errors for example in the Output Window and double-clicking on the error places a small visual indicator beside the offending line of text. Bookmarks are not an option. Using a TextSelection Object works but it's not exactly what I'm looking for.

Thnx in advance,

KJ


Answer this question

Jump To Code from a DotNet Add-in

  • jarka

    You mean something like this
    http://www.usysware.com/dpack/codebrowser.htm

  • David_VA

    I'd also like to know how this works for a tool I'm building. Thanks.
  • foto_robin

    You didn't mentioned whether it's for VS 2003 or 2005, general extensibility or VSIP I assume VS'03 with general extensibility. What you need is to create a marker of some sort. As you've mentioned earlier, bookmark based markers are out because user could have a bookmark on that line already.

    If I recall it DTE interfaces correctly, you can add a custom task, which would get tied to a marker, but not with a custom image. Things might've changed in VS'05 world but I haven't checked that area specifically.

    If you want it for VS'03 then your only option is VSIP I'm afraid. With VSIP you could add task items and custom markers, but that's not a trivial exercise. There is also a sizable luring curve.

    I've implemented a feature with task list and custom markers before and here's how the end result looks like:

    http://www.usysware.com/dpack/bookmarks.htm

    Not sure if this reply helps much but hopefully it answers some of the "what's possible" types of questions.

  • LMP0407

    No. I just want the functionality inside of Visual Studio when you have a compilation error in the "Task List", you double click on it, and the document containing the source is opened (if it is not opened already), with a Visual indicator (that looks like a flash) placed to the left of the offending line of code. I know how to open the doc and I'm familiar with TextSelection, EditPoint, and TextPoint Objects. What I'm looking for is a mechanism to place a Visual indicator by a line of code without selecting the text in the line using the TextSelection object. Bookmarks don't work because the user may already have bookmarks in the document.

    Thnx in advance,

    KJ


  • Jump To Code from a DotNet Add-in