diff --git a/samples/test.st b/samples/test.st index 7937ee8..1d0c927 100644 --- a/samples/test.st +++ b/samples/test.st @@ -3,10 +3,12 @@ hello := true. "true" hello ifFalse: [ ] ifTrue: [ ]. +'To halt' record. self halt. 1 + 1. +self inform: 'hello world'. Object. -Transcript crShow. +Transcript crShow: 'Hello'. true ifTrue: [ ] ifFalse: [ ]. @@ -15,5 +17,4 @@ server := PLSServer. "PLSServer" myClass := MyClass new myVar2: (MyClass new myVar2: (MyClass new)); yourself. - "a MyClass" self halt \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index abe82d2..632a13d 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -80,16 +80,16 @@ function commandPharoExtensionVersion() { function commandPharoPrintIt() { let editor = vscode.window.activeTextEditor; let selection = editor.selection; - client.sendRequest('command:printIt', {"line": editor.document.getText(selection), "textDocumentURI": editor.document.uri}).then( (result: string) => { + client.sendRequest('command:printIt', { "line": editor.document.getText(selection), "textDocumentURI": editor.document.uri }).then((result: string) => { editor.edit(editBuilder => { - editBuilder.replace( new vscode.Selection(selection.end, selection.end), ' "' + result + '" '); + editBuilder.replace(new vscode.Selection(selection.end, selection.end), ' "' + result + '" '); }) }).catch((error) => window.showErrorMessage(error)); } function commandPharoShowIt() { let editor = vscode.window.activeTextEditor; - client.sendRequest('command:printIt', {"line": editor.document.getText(editor.selection)}).then( (result: string) => { + client.sendRequest('command:printIt', { "line": editor.document.getText(editor.selection), "textDocumentURI": editor.document.uri }).then((result: string) => { window.showInformationMessage(result); }).catch((error) => window.showErrorMessage(error)); }