Skip to content

Commit c145d32

Browse files
committed
added comnad to show and focus on code organzier viewContainer #31
1 parent cf62633 commit c145d32

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@
140140
"command": "codeOrganizer.activate",
141141
"title": "Activate",
142142
"category": "Code Organizer"
143+
},
144+
{
145+
"command": "codeOrganizer.showView",
146+
"title": "Show Code Organizer",
147+
"category": "Code Organizer"
143148
}
144149
]
145150
},

src/extension.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ export function activate(context: vscode.ExtensionContext) {
7676
)
7777
);
7878

79+
// Register "Show Code Organizer" command
80+
context.subscriptions.push(
81+
vscode.commands.registerCommand('codeOrganizer.showView', async () => {
82+
// Use the auto-generated .focus command for our view
83+
await vscode.commands.executeCommand('codeOrganizerOutlineActivity.focus');
84+
})
85+
);
86+
7987
// Helper function to find current section from cursor position
8088
function getCurrentSection(
8189
cursorPos: vscode.Position,

0 commit comments

Comments
 (0)