Results 1 to 4 of 4

Thread: VS Addin how review the source code

  1. #1

    Thread Starter
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Question VS Addin how review the source code

    I am currently trying to create a Visual Studio Addin, that I want to go through all the classes in a project and look at the code.
    The things I'm trying to do is identify whether Option explicit/strict is turned on, whether there is XML commenting on the subs/functions etc.

    I've managed to get my Addin to load and I'm able to identify all the classes within the project but I don't seem to be able to figure out how to get the addin to look at the code or things like that.

    I was wondering if anyone has done anything like this before and has an idea about how I may be able to achieve this?

    Thanks for any help in advance

    Satal

  2. #2

    Thread Starter
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Re: VS Addin how review the source code

    I hate to bump, but I still would like to know if there is any way of achieving this or will I have to manually go through the files?
    If providing more information would be useful then please let me know and I'll do what I can.

    Satal

  3. #3
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: VS Addin how review the source code

    I have written an add-in so I can be of some help to you.

    Code:
        Public VB As DTE2
    
            Dim PI As ProjectItem
            Dim EP As EditPoint
            Dim TD As TextDocument
            Dim obj As Object
            Dim Win As EnvDTE.Window
    
    
                PI = VB.Solution.FindProjectItem("Form1.vb")
                Win = PI.Open(vsViewKindTextView)
                Win.Visible = True
                PI.Document.Activate()
    
                obj = VB.ActiveDocument.Object("TextDocument")
                TD = CType(obj, TextDocument)
                EP = TD.CreateEditPoint
                With EP
    
                    .FindPattern("<summary>")
                    .LineDown(2)
                    .Insert("'Comment goes here")
    
                End With
    I took some code and tried to cobble something together. I haven't tested it, but was trying to give you an idea of where to start. I will help anyway I can, but there is not much out there on this subject.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  4. #4

    Thread Starter
    Fanatic Member Satal Keto's Avatar
    Join Date
    Dec 2005
    Location
    Me.Location
    Posts
    518

    Re: VS Addin how review the source code

    Awesome thank you

    Yeah there isn't much on the subject out there and unfortunately the people who know this stuff in depth are the ones making money from it so are unlikely to share their knowledge

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width