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 1+ ---
2+ ' quickmock ' : minor
3+ ---
4+
5+ Added create new wireframe button on VSCode status bar.
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+ export const STATUS_BAR_PRIORITY = 100 ;
2+ export const ITEM_TEXT = '$(lightbulb) Quickmock' ;
3+ export const ITEM_TOOLTIP = 'Create new Quickmock wireframe' ;
4+ export const ITEM_COLOR_THEME_TOKEN = 'statusBar.foreground' ;
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+ import {
4+ ITEM_COLOR_THEME_TOKEN ,
5+ ITEM_TEXT ,
6+ ITEM_TOOLTIP ,
7+ STATUS_BAR_PRIORITY ,
8+ } from './new-wireframe.consts' ;
9+
10+ export const registerNewWireframeStatusBarItem = (
11+ context : vscode . ExtensionContext
12+ ) : void => {
13+ const item = vscode . window . createStatusBarItem (
14+ vscode . StatusBarAlignment . Left ,
15+ STATUS_BAR_PRIORITY
16+ ) ;
17+ item . text = ITEM_TEXT ;
18+ item . tooltip = ITEM_TOOLTIP ;
19+ item . color = new vscode . ThemeColor ( ITEM_COLOR_THEME_TOKEN ) ;
20+ item . command = QUICKMOCK_NEW_WIREFRAME_COMMAND_ID ;
21+ item . show ( ) ;
22+
23+ context . subscriptions . push ( item ) ;
24+ } ;
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