File tree Expand file tree Collapse file tree
packages/vscode-extension/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { registerCommands } from '#commands';
22import { onAppUrlChange , syncAppUrlFile } from '#core' ;
33import { QuickMockEditorProvider } from '#editor' ;
44import { setupMcp } from '#mcp' ;
5+ import { registerStatusBarItems } from '#status-bar' ;
56import * as vscode from 'vscode' ;
67
78export const activate = ( context : vscode . ExtensionContext ) => {
@@ -10,6 +11,7 @@ export const activate = (context: vscode.ExtensionContext) => {
1011 context . subscriptions . push ( QuickMockEditorProvider . register ( context ) ) ;
1112 setupMcp ( context ) ;
1213 registerCommands ( context ) ;
14+ registerStatusBarItems ( context ) ;
1315} ;
1416
1517export const deactivate = ( ) => { } ;
Original file line number Diff line number Diff line change 1+ export * from './new-wireframe' ;
2+ export * from './register' ;
Original file line number Diff line number Diff line change 1+ export * from './new-wireframe.status-bar' ;
Original file line number Diff line number Diff line change 1+ import { QUICKMOCK_NEW_WIREFRAME_COMMAND_ID } from '#commands' ;
2+ import * as vscode from 'vscode' ;
3+
4+ const STATUS_BAR_PRIORITY = 100 ;
5+
6+ export const registerNewWireframeStatusBarItem = (
7+ context : vscode . ExtensionContext
8+ ) : void => {
9+ const item = vscode . window . createStatusBarItem (
10+ vscode . StatusBarAlignment . Left ,
11+ STATUS_BAR_PRIORITY
12+ ) ;
13+ item . text = '$(lightbulb) Quickmock' ;
14+ item . tooltip = 'Create new Quickmock wireframe' ;
15+ item . color = '#309a8a' ;
16+ item . command = QUICKMOCK_NEW_WIREFRAME_COMMAND_ID ;
17+ item . show ( ) ;
18+
19+ context . subscriptions . push ( item ) ;
20+ } ;
Original file line number Diff line number Diff line change 1+ import * as vscode from 'vscode' ;
2+ import { registerNewWireframeStatusBarItem } from './new-wireframe' ;
3+
4+ /**
5+ * Registers all VS Code status bar items exposed by the extension.
6+ * @param context The VS Code extension context.
7+ */
8+ export const registerStatusBarItems = (
9+ context : vscode . ExtensionContext
10+ ) : void => {
11+ registerNewWireframeStatusBarItem ( context ) ;
12+ } ;
You can’t perform that action at this time.
0 commit comments