File tree Expand file tree Collapse file tree 7 files changed +25
-28
lines changed
Expand file tree Collapse file tree 7 files changed +25
-28
lines changed Original file line number Diff line number Diff line change 5454 "contributes" : {
5555 "commands" : [
5656 {
57- "command" : " yapi-code .generateCodeByWebview" ,
57+ "command" : " lowcode .generateCodeByWebview" ,
5858 "title" : " 可视化生成代码"
5959 },
6060 {
61- "command" : " yapi-code .generateCode" ,
61+ "command" : " lowcode .generateCode" ,
6262 "title" : " 生成代码"
6363 },
6464 {
6565 "command" : " lowcode.openDownloadMaterials" ,
6666 "title" : " 下载物料"
6767 },
6868 {
69- "command" : " yapi-code .addSnippet" ,
69+ "command" : " lowcode .addSnippet" ,
7070 "title" : " 添加代码片段"
7171 },
7272 {
112112 ],
113113 "lowcode/editor/context" : [
114114 {
115- "command" : " yapi-code .generateCodeByWebview" ,
115+ "command" : " lowcode .generateCodeByWebview" ,
116116 "group" : " lowcode@1"
117117 },
118118 {
119- "command" : " yapi-code .generateCode" ,
119+ "command" : " lowcode .generateCode" ,
120120 "group" : " lowcode@2"
121121 },
122122 {
123123 "command" : " lowcode.openDownloadMaterials" ,
124124 "group" : " lowcode@3"
125125 },
126126 {
127- "command" : " yapi-code .addSnippet" ,
127+ "command" : " lowcode .addSnippet" ,
128128 "group" : " lowcode@4"
129129 },
130130 {
142142 "group" : " lowcode@1"
143143 },
144144 {
145- "command" : " yapi-code .generateCodeByWebview" ,
145+ "command" : " lowcode .generateCodeByWebview" ,
146146 "group" : " lowcode@2"
147147 },
148148 {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { showWebView } from '../webview';
44
55export const createOrShowWebview = ( context : vscode . ExtensionContext ) => {
66 context . subscriptions . push (
7- vscode . commands . registerTextEditorCommand ( 'yapi-code .addSnippet' , ( ) => {
7+ vscode . commands . registerTextEditorCommand ( 'lowcode .addSnippet' , ( ) => {
88 const content = getSelectedText ( ) || getClipboardText ( ) ;
99 showWebView ( {
1010 key : 'main' ,
Original file line number Diff line number Diff line change @@ -4,21 +4,18 @@ import { showWebView } from '../webview';
44
55export const createOrShowWebview = ( context : vscode . ExtensionContext ) => {
66 context . subscriptions . push (
7- vscode . commands . registerCommand (
8- 'yapi-code.generateCodeByWebview' ,
9- ( args ) => {
10- const path = formatPath ( args ?. path ) ;
11- showWebView ( {
12- key : 'main' ,
13- viewColumn : vscode . ViewColumn . Two ,
14- task : path
15- ? {
16- task : 'updateSelectedFolder' ,
17- data : { selectedFolder : path } ,
18- }
19- : undefined ,
20- } ) ;
21- } ,
22- ) ,
7+ vscode . commands . registerCommand ( 'lowcode.generateCodeByWebview' , ( args ) => {
8+ const path = formatPath ( args ?. path ) ;
9+ showWebView ( {
10+ key : 'main' ,
11+ viewColumn : vscode . ViewColumn . Two ,
12+ task : path
13+ ? {
14+ task : 'updateSelectedFolder' ,
15+ data : { selectedFolder : path } ,
16+ }
17+ : undefined ,
18+ } ) ;
19+ } ) ,
2320 ) ;
2421} ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const { window } = vscode;
1010export const generateCode = ( context : vscode . ExtensionContext ) => {
1111 context . subscriptions . push (
1212 vscode . commands . registerTextEditorCommand (
13- 'yapi-code .generateCode' ,
13+ 'lowcode .generateCode' ,
1414 async ( ) => {
1515 const rawClipboardText = getClipboardText ( ) ;
1616 let clipboardText = rawClipboardText . trim ( ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { showWebView } from '../webview';
88export const openSnippet = ( context : vscode . ExtensionContext ) => {
99 context . subscriptions . push (
1010 vscode . commands . registerTextEditorCommand (
11- 'yapi-code .openSnippetByWebview' ,
11+ 'lowcode .openSnippetByWebview' ,
1212 ( textEditor : TextEditor , edit : TextEditorEdit , ...args : any [ ] ) => {
1313 const name = args [ 0 ] ;
1414 const template = args [ 1 ] ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const registerCompletion = (context: vscode.ExtensionContext) => {
3434 // 无法直接通过 ejs 编译,说明模板中需要额外的数据,触发命令打开 webview
3535 completionItem . insertText = '' ;
3636 completionItem . command = {
37- command : 'yapi-code .openSnippetByWebview' ,
37+ command : 'lowcode .openSnippetByWebview' ,
3838 title : '' ,
3939 arguments : [ s . name , s . template ] ,
4040 } ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export function activate(context: vscode.ExtensionContext) {
4242 vscode . StatusBarAlignment . Left ,
4343 - 1 ,
4444 ) ;
45- statusBarItem . command = 'yapi-code .generateCodeByWebview' ;
45+ statusBarItem . command = 'lowcode .generateCodeByWebview' ;
4646 statusBarItem . text = '$(octoface) Low Code' ;
4747 statusBarItem . tooltip = '可视化生成代码' ;
4848 statusBarItem . show ( ) ;
You can’t perform that action at this time.
0 commit comments