collapse specific outlining section
-
Hi, does anybody know if it is possible to collapse a specific section? I declared with following lines, some comments of our source code:
#pragma region history /* comments ... */ #pragma endregion
I found a solution, which collapses all code sections to it's definitions, which is nested in the Visual Studio Macros:Private blnLoading As Boolean Private Sub DocumentEvents_DocumentOpened(ByVal Document As EnvDTE.Document) Handles DocumentEvents.DocumentOpened blnLoading = True End Sub Private Sub WindowEvents_WindowActivated(ByVal GotFocus As EnvDTE.Window, ByVal LostFocus As EnvDTE.Window) Handles WindowEvents.WindowActivated If blnLoading Then DTE.ExecuteCommand("Edit.CollapsetoDefinitions") blnLoading = False End If End Sub
But it collapse just all sections? Have anybody a solution for collapsing my specific section? -
Hi, does anybody know if it is possible to collapse a specific section? I declared with following lines, some comments of our source code:
#pragma region history /* comments ... */ #pragma endregion
I found a solution, which collapses all code sections to it's definitions, which is nested in the Visual Studio Macros:Private blnLoading As Boolean Private Sub DocumentEvents_DocumentOpened(ByVal Document As EnvDTE.Document) Handles DocumentEvents.DocumentOpened blnLoading = True End Sub Private Sub WindowEvents_WindowActivated(ByVal GotFocus As EnvDTE.Window, ByVal LostFocus As EnvDTE.Window) Handles WindowEvents.WindowActivated If blnLoading Then DTE.ExecuteCommand("Edit.CollapsetoDefinitions") blnLoading = False End If End Sub
But it collapse just all sections? Have anybody a solution for collapsing my specific section?try this: #region 'Some text comment explaining the enclosed code, i.e., Helper methods ...put code to collapse here... #endregion
Michael ᅠᅠᅠᅠᅠᅠᅠᅠᅠ\|/ ᅠᅠᅠᅠᅠᅠᅠ^O^O^ ——o00o—0—o00o—— If we knew what it was we were doing, it would not be called research, would it? --Albert Einstein