Skip to content

Commit 6a40e54

Browse files
committed
v.0.0.15
1 parent 04cd442 commit 6a40e54

File tree

8 files changed

+1383
-112
lines changed

8 files changed

+1383
-112
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
---
44

5+
## [v0.0.15](https://github.com/phil1436/ownobjectscriptextension/tree/0.0.15) (2023-6-14)
6+
7+
- Color Theme `InterSystems Real Dark` added
8+
- Command `Create New Class` renamed to `Create New Wizard`
9+
- Command `Create New Wizard` extended
10+
11+
---
12+
513
## [v0.0.14](https://github.com/phil1436/ownobjectscriptextension/tree/0.0.14) (2023-5-9)
614

715
- Configuartion `Create > Service: Add Target Config Names` added

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
---
2626

2727
- [Features](#features)
28-
- [Create New Class](#create-new-class-_beta_)
28+
- [Create New Wizard _BETA_](#create-new-wizard-_beta_)
2929
- [Add ObjectScript Modifier](#add-objectscript-modifier)
3030
- [Add Method Description Template](#add-method-description-template)
3131
- [Make Select Statement](#make-select-statement)
32-
- [Translate Embedded Python](#translate-embedded-python-_beta_)
32+
- [Translate Embedded Python _BETA_](#translate-embedded-python-_beta_)
3333
- [Requirements](#requirements)
3434
- [Installation](#installation)
3535
- [Workspace](#workspace)
@@ -43,14 +43,15 @@
4343
- [Sql](#sql)
4444
- [Comment](#comment)
4545
- [Create](#create)
46+
- [Color Theme](#color-theme)
4647
- [Bugs](#bugs)
4748
- [Release Notes](#release-notes)
4849

4950
---
5051

5152
## Features
5253

53-
### `Create New Class` _BETA_
54+
### `Create New Wizard` _BETA_
5455

5556
Creates a new ObjectScript Class, Message, Business Service or Business Operation similar to the InterSystems Studio Wizard. Just execute the command and follow the instructions.
5657

@@ -124,7 +125,7 @@ This extension will create a directory named _ownobjectscriptextension-workspace
124125

125126
### Own ObjectScript Create
126127

127-
- `Create New Class`: Creates a new ObjectScript class. See [here](#create-new-class-beta) for more information.
128+
- `Create New Wizard`: Creates a new ObjectScript class. See [here](#create-new-wizard-beta) for more information.
128129

129130
### Own ObjectScript Modifier
130131

@@ -173,6 +174,14 @@ Go to `File > Preferences > Settings` and than navigate to `Extensions > OwnObje
173174

174175
---
175176

177+
## Color Theme
178+
179+
The extension will add a new color theme called _InterSystems Real Dark_. You can change it via `File > Preferences > Theme > Color Theme`.
180+
181+
![InterSystemsRealDarkExample](resources/InterSystemsRealDarkExample.png)
182+
183+
---
184+
176185
## Bugs
177186

178187
- _no known bugs_
@@ -181,13 +190,15 @@ Go to `File > Preferences > Settings` and than navigate to `Extensions > OwnObje
181190

182191
## [Release Notes](https://github.com/phil1436/ownobjectscriptextension/blob/master/CHANGELOG.md)
183192

184-
### [v0.0.14](https://github.com/phil1436/ownobjectscriptextension/tree/0.0.14)
193+
### [v0.0.15](https://github.com/phil1436/ownobjectscriptextension/tree/0.0.15)
185194

186-
- Configuartion `Create > Service: Add Target Config Names` added
195+
- Color Theme `InterSystems Real Dark` added
196+
- Command `Create New Class` renamed to `Create New Wizard`
197+
- Command `Create New Wizard` extended
187198

188199
---
189200

190-
by Philipp B.
201+
by [Philipp B.](https://github.com/phil1436)
191202

192203
powered by [InterSystems](https://www.intersystems.com/).
193204

extension.js

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ try {
5656
*/
5757
function activate(context) {
5858
//Add ObjectScript Modifier
59-
let disposable = vscode.commands.registerCommand(
59+
vscode.commands.registerCommand(
6060
'ownobjectscriptextension.addObjectScriptModifier',
6161
function () {
6262
if (!preConditions()) return;
@@ -737,43 +737,32 @@ function activate(context) {
737737
await vscode.window.showTextDocument(doc, { preview: false });
738738
}
739739
);
740-
741-
/* const provider2 = vscode.languages.registerCompletionItemProvider(
742-
'plaintext',
740+
/* const completionProvider = vscode.languages.registerCompletionItemProvider(
741+
'javascript',
743742
{
744-
provideCompletionItems(
745-
document = vscode.window.activeTextEditor.document,
746-
position = vscode.window.activeTextEditor.selection.active
747-
) {
748-
// get all text until the `position` and check if it reads `console.`
749-
// and if so then complete if `log`, `warn`, and `error`
750-
const linePrefix = document
751-
.lineAt(position)
752-
.text.substr(0, position.character);
753-
if (!linePrefix.endsWith('console.')) {
743+
provideCompletionItems(document, position) {
744+
// Check if the current word is 'hello'
745+
const wordRange = document.getWordRangeAtPosition(position);
746+
const currentWord = wordRange
747+
? document.getText(wordRange)
748+
: '';
749+
console.log(currentWord);
750+
if (currentWord !== 'hello') {
754751
return undefined;
755752
}
756753
757-
return [
758-
new vscode.CompletionItem(
759-
'log',
760-
vscode.CompletionItemKind.Method
761-
),
762-
new vscode.CompletionItem(
763-
'warn',
764-
vscode.CompletionItemKind.Method
765-
),
766-
new vscode.CompletionItem(
767-
'error',
768-
vscode.CompletionItemKind.Method
769-
),
770-
];
754+
// Return a completion item for 'hello'
755+
const completionItem = new vscode.CompletionItem(
756+
'hello',
757+
vscode.CompletionItemKind.Keyword
758+
);
759+
completionItem.insertText = 'Hello, world!';
760+
return [completionItem];
771761
},
772762
},
773-
'.' // triggered whenever a '.' is being typed
774-
); */
775-
776-
context.subscriptions.push(disposable);
763+
'h' // Specify the trigger character for the completion provider
764+
);
765+
context.subscriptions.push(completionProvider); */
777766
}
778767

779768
// This method is called when your extension is deactivated

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Philipp B.",
66
"publisher": "Philipp B.",
77
"license": "MIT",
8-
"version": "0.0.14",
8+
"version": "0.0.15",
99
"repository": {
1010
"type": "github",
1111
"url": "https://github.com/phil1436/ownobjectscriptextension"
@@ -85,7 +85,7 @@
8585
},
8686
{
8787
"command": "ownobjectscriptextension.createNewClass",
88-
"title": "Create New Class",
88+
"title": "Create New Wizard",
8989
"category": "Own ObjectScript Create"
9090
}
9191
],
@@ -124,7 +124,14 @@
124124
"markdownDescription": "Sets the line count between added comments for `Own ObjectScript Comment: Add Inline Comments`"
125125
}
126126
}
127-
}
127+
},
128+
"themes": [
129+
{
130+
"label": "InterSystems Real Dark",
131+
"uiTheme": "vs-dark",
132+
"path": "./themes/intersystems-real-dark.json"
133+
}
134+
]
128135
},
129136
"scripts": {
130137
"lint": "eslint .",
451 KB
Loading

0 commit comments

Comments
 (0)