Skip to content

Commit

Permalink
Prepare 2.6.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed Aug 29, 2024
1 parent cc125cb commit e23a4a7
Show file tree
Hide file tree
Showing 16 changed files with 893 additions and 579 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [2.5.2] - 2024-XX-XX
## [2.6.0] - 2024-08-29
- Fix issue [#329](https://github.com/intersystems/language-server/issues/329): Support Unix platforms that don't have the `en_US.UTF-8` locale
- Fix issue [#336](https://github.com/intersystems/language-server/issues/336): Add intellisense for variables set to the returned value of a method, or a property, with a declared type
- Fix issue [#337](https://github.com/intersystems/language-server/issues/337): Improve Hover headers
Expand Down
18 changes: 9 additions & 9 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "language-server-client",
"author": "InterSystems Corporation",
"version": "2.5.2-SNAPSHOT",
"version": "2.6.0-SNAPSHOT",
"private": true,
"engines": {
"vscode": "^1.82.0"
},
"dependencies": {
"axios": "^1.6.8",
"axios": "^1.7.5",
"vscode-cache": "^0.3.0",
"vscode-languageclient": "^9.0.1"
},
Expand Down
29 changes: 15 additions & 14 deletions client/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ export async function overrideClassMembers() {

// Get the open document and check that it's an ObjectScript class
const openDoc = window.activeTextEditor.document;
if (openDoc.languageId !== "objectscript-class") {
if (openDoc.languageId != "objectscript-class") {
// Can only override members in a class
return;
}

// Check that this class has a superclass
var seenextends = false;
let seenextends = false;
for (let linenum = 0; linenum < openDoc.lineCount; linenum++) {
const linetxt = openDoc.lineAt(linenum).text;
if (linetxt.slice(0,5).toLowerCase() === "class") {
// This is the class definition line
const linewords = linetxt.replace(/\s{2,}/g," ").split(" ");
if (linewords.length > 2 && linewords[2].toLowerCase() === "extends") {
if (linewords.length > 2 && linewords[2].toLowerCase() == "extends") {
seenextends = true;
}
break;
Expand All @@ -50,8 +50,8 @@ export async function overrideClassMembers() {

// Check that we can insert new class members at the cursor position
const selection = window.activeTextEditor.selection;
var cursorvalid = false;
var docposvalid = false;
let cursorvalid = false;
let docposvalid = false;
if (openDoc.lineAt(selection.active.line).isEmptyOrWhitespace && selection.isEmpty) {
cursorvalid = true;
}
Expand All @@ -76,14 +76,14 @@ export async function overrideClassMembers() {
return;
}

var plural = selectedType+"s";
if (selectedType === "Query") {
let plural = selectedType + "s";
if (selectedType == "Query") {
plural = "Queries";
}
else if (selectedType === "XData") {
else if (selectedType == "XData") {
plural = "XData blocks";
}
else if (selectedType === "Property") {
else if (selectedType == "Property") {
plural = "Properties";
}

Expand All @@ -92,18 +92,18 @@ export async function overrideClassMembers() {
uri: openDoc.uri.toString(),
memberType: selectedType
});
if (overridableMembers.length === 0) {
if (!overridableMembers?.length) {
// There are no members of this type to override, so tell the user and exit
window.showInformationMessage("There are no inherited "+plural+" that are overridable.","Dismiss");
window.showInformationMessage(`There are no inherited ${plural} that are overridable.`,"Dismiss");
return;
}

// Ask the user to select which members they want to override
const selectedMembers = await window.showQuickPick(overridableMembers,{
placeHolder: "Select the "+plural+" to override",
placeHolder: `Select the ${plural} to override`,
canPickMany: true
});
if (!selectedMembers || selectedMembers.length === 0) {
if (!selectedMembers?.length) {
// No members were selected, so exit
return;
}
Expand All @@ -112,7 +112,8 @@ export async function overrideClassMembers() {
const lspWorkspaceEdit: WorkspaceEdit = await client.sendRequest("intersystems/refactor/addOverridableMembers",{
uri: openDoc.uri.toString(),
members: selectedMembers,
cursor: selection.active
cursor: selection.active,
memberType: selectedType
});

// Apply the workspace edit
Expand Down
Loading

0 comments on commit e23a4a7

Please sign in to comment.