mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 15:34:49 +01:00
New features: creating buffers
This commit is contained in:
parent
9e2d372e5e
commit
ed859f0630
2 changed files with 13 additions and 3 deletions
|
@ -23,6 +23,10 @@
|
||||||
"command": "codempvscode.join",
|
"command": "codempvscode.join",
|
||||||
"title": "Join a codemp workspace"
|
"title": "Join a codemp workspace"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "codempvscode.createBuffer",
|
||||||
|
"title": "create a codemp buffer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "codempvscode.helloWorld",
|
"command": "codempvscode.helloWorld",
|
||||||
"title": "Hello World (debug)"
|
"title": "Hello World (debug)"
|
||||||
|
|
|
@ -27,8 +27,10 @@ export function activate(context: vscode.ExtensionContext) {
|
||||||
});
|
});
|
||||||
let connectCommand = vscode.commands.registerCommand('codempvscode.connect', connect);
|
let connectCommand = vscode.commands.registerCommand('codempvscode.connect', connect);
|
||||||
let joinCommand = vscode.commands.registerCommand('codempvscode.join', join);
|
let joinCommand = vscode.commands.registerCommand('codempvscode.join', join);
|
||||||
|
let createBufferCommand = vscode.commands.registerCommand('codempvscode.createBuffer', createBuffer);
|
||||||
context.subscriptions.push(connectCommand);
|
context.subscriptions.push(connectCommand);
|
||||||
context.subscriptions.push(joinCommand);
|
context.subscriptions.push(joinCommand);
|
||||||
|
context.subscriptions.push(createBufferCommand);
|
||||||
context.subscriptions.push(disposable);
|
context.subscriptions.push(disposable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -114,9 +116,13 @@ async function join() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function createBuffer(){
|
||||||
|
let buffer : string = (await vscode.window.showInputBox({prompt: "path of the buffer to create"}))!;
|
||||||
|
console.log("new buffer created ", buffer, "\n");
|
||||||
|
codemp.create(buffer);
|
||||||
|
console.log("new createdBuffer ", createBuffer, "\n");
|
||||||
|
//TODO push all the current opened file onto the buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue