Skip to content

Commit 46789b6

Browse files
Caché 2016.*+ system methods support for ##class constructions add
1 parent 478a178 commit 46789b6

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

export/WebTerminal/Autocomplete.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,17 @@ system classes generates one time and forever.
8181
if (first = "") set first = ","
8282
8383
set cdefs = ##class(%Dictionary.ClassDefinition).%OpenId(className)
84+
set ccdefs = ##class(%Dictionary.CompiledClass).%OpenId(className)
8485
8586
set countMethods = cdefs.Methods.Count()
8687
set countParameters = cdefs.Parameters.Count()
8788
set countProperties = cdefs.Properties.Count()
88-
set total = countMethods + countParameters + countProperties
89+
try { // SystemMethods does not exists for Caché versions before 2016.*
90+
set countSysMethods = ccdefs.SystemMethods.Count()
91+
} catch (e) {
92+
set countSysMethods = 0
93+
}
94+
set total = countMethods + countParameters + countProperties + countSysMethods
8995
set current = 0
9096
9197
for i=1:1:countMethods {
@@ -106,6 +112,12 @@ system classes generates one time and forever.
106112
if (current'=total) set ac = ac _ ","
107113
}
108114
115+
for i=1:1:countSysMethods {
116+
set current = current + 1
117+
set ac = ac _ """$" _ ccdefs.SystemMethods.GetAt(i).Name _ """:0"
118+
if (current'=total) set ac = ac _ ","
119+
}
120+
109121
set ac = ac _ "}"
110122
111123
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"title": "Cache WEB Terminal",
44
"description": "Web-based terminal emulator for Caché administering.",
55
"author": "ZitRo",
6-
"version": "3.2.7",
7-
"releaseNumber": 23,
6+
"version": "3.3.0",
7+
"releaseNumber": 24,
88
"repository": {
99
"type": "git",
1010
"url": "https://github.com/intersystems-ru/webterminal.git"

webSource/js/TerminalAutocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ TerminalAutocomplete.prototype.TYPES = {
6060
split: "."
6161
},
6262
subclass: {
63-
regExp: /##class\((%?[a-zA-Z]*[a-zA-Z0-9\.]*)\)\.(%?[a-zA-Z]*[a-zA-Z0-9]*)$/,
63+
regExp: /##class\((%?[a-zA-Z]*[a-zA-Z0-9\.]*)\)\.((?:%|\$)?[a-zA-Z]*[a-zA-Z0-9]*)$/,
6464
priority: 2
6565
},
6666
globals: {

0 commit comments

Comments
 (0)