I'm looking for some very basic tutorials and or lessons that explain how to do some very simple text manipulation in the active document. I have spent two days trying to create a very simple Tool Window that simply selects everything (ctrl+a) when you click a button... I would sincerely appreciate any help! Even if it's "you're on the right track"...
I have opened this StackOverflow thread:
http://stackoverflow.com/questions/23453376/cant-access-the-properties-and-methods-of-dte-object
In where I can't do this simple function (except in c#) from the function that executes when the button is clicked:
Dim objSel As TextSelection = DTE.ActiveDocument.Selection
objSel.GotoLine(1, True) objSel.SelectAll()
I downloaded the source to CodeMaid (a VS extension) and started learning some techniques there but I then stumbled across this video:
http://msdn.microsoft.com/lt-lt/vstudio/bb892750
Which is where I'm at now. There seems to be a lot of overlap so I feel I'm getting close, but I've only been programming C# for a year, and only for simple WebForms/MVC websites so there are a TON of concepts and lingo that just flies directly over my head (I have no formal training to boot - self taught)
It seems I can't just expose the DTE.ActiveDocument object from my button code, I have to call a service/package (heh I know that's not right I'm just confusing things) to initiate the class? If there was a super simple tutorial (the above one I found is Visual Studio 2005 yuk!) or some basic walkthroughs I would LOVE to see them. I feel like this would be THE first way to teach someone just starting out with VS extensions (tutorial #2 after a Hello World tutorial) and I can't find any documentation.