locked
Get the order of opened files in Visual Studio RRS feed

  • Question

  • Hello, I would like to know if there is any way of getting the order of opened documents (source files, xml files, etc...) with visual studio DTE objects.

    For instance, I have 3 opened files in tabs, the leftmost tab has file A.cs, the middle tab has file B.cs and the rightmost tab has file C.cs, the order of these files should be A,B,C

    Also, I would like to know if there is any way to assign the order of a file when opening it through DTE, or maybe open the file and then give the correct order to position it between other files.

    Thanks a lot.

    Jorge Rowies

    Saturday, April 10, 2010 3:59 PM

Answers

  • Hello, Jorge

    I have replied in this thread. http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/84d8d76e-b6b6-453a-be4d-86faf21373a6/, both the automation(actually the DTE object) and vs sdk doesn’t provide such an interface or options to do this.

    Please see this newsgroup thread, and note the answer from Jialiang Ge,

    http://www.eggheadcafe.com/software/aspnet/32465825/inide-document-taborder.aspx.

    He has already answered this.

    And if you are using vs2010, you could use IVsUIShell4.GetWindowEnum Method to get the MRU document, but for tab order, I still don’t find a way to get this.

    Thanks

    Chao

    • Marked as answer by Chao Kuo Wednesday, April 14, 2010 11:31 AM
    Tuesday, April 13, 2010 5:22 AM
  • Hello Chao, about my previous post... (http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/84d8d76e-b6b6-453a-be4d-86faf21373a6/) what I needed to accomplish then was to get the position of documents when they are in Horizontal or Vertical Tab Groups. Now that I gave up on trying to do that :) what I was trying to do is to get the order of opened files.
    Unfortunatelly, for what I read in the newsgroup thread that you pointed me out, this can't be done either.

    Anyway, thanks a lot for your time!
    Regards,
    Jorge
    • Marked as answer by jorgelakers Tuesday, April 13, 2010 2:06 PM
    Tuesday, April 13, 2010 2:06 PM

All replies

  • Hello, Jorge

    I have replied in this thread. http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/84d8d76e-b6b6-453a-be4d-86faf21373a6/, both the automation(actually the DTE object) and vs sdk doesn’t provide such an interface or options to do this.

    Please see this newsgroup thread, and note the answer from Jialiang Ge,

    http://www.eggheadcafe.com/software/aspnet/32465825/inide-document-taborder.aspx.

    He has already answered this.

    And if you are using vs2010, you could use IVsUIShell4.GetWindowEnum Method to get the MRU document, but for tab order, I still don’t find a way to get this.

    Thanks

    Chao

    • Marked as answer by Chao Kuo Wednesday, April 14, 2010 11:31 AM
    Tuesday, April 13, 2010 5:22 AM
  • Hello Chao, about my previous post... (http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/84d8d76e-b6b6-453a-be4d-86faf21373a6/) what I needed to accomplish then was to get the position of documents when they are in Horizontal or Vertical Tab Groups. Now that I gave up on trying to do that :) what I was trying to do is to get the order of opened files.
    Unfortunatelly, for what I read in the newsgroup thread that you pointed me out, this can't be done either.

    Anyway, thanks a lot for your time!
    Regards,
    Jorge
    • Marked as answer by jorgelakers Tuesday, April 13, 2010 2:06 PM
    Tuesday, April 13, 2010 2:06 PM