Hi,
I am developing an intellisense extension to c++ like language. In my source files, I have some sections marked like #mysection1, #mysection2 etc.. (Similar to regions in C#)
When I press ctrl+. in the editor, I need to determine what is the section that the trigger point is in. I read the trigger point as follows,
var triggerPoint = (SnapshotPoint)session.GetTriggerPoint(snapshot);
Here I know I can just get the whole string as "m_textBuffer.CurrentSnapshot.GetText()" and do some string comparison. But I would like to implement it in a more robust way. To my mind, the best approach would be to define #mysection1, #mysection2 etc.. as regions and check what is the region of my trigger point.
But I am new to Visual Studio development and couldn't find any helpful code example to perform similar functionality.
Can you please advise?
Thanks,
Sandun