Skip to content

Commit

Permalink
Add support for 2019.* ISC products, fixes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Jun 16, 2019
1 parent 63f31a6 commit c00791b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/build
/package-lock.json
2 changes: 1 addition & 1 deletion import.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@echo off

:: CHANGE THIS PATH TO YOUR CACHÉ INSTALLATION PATH ON WINDOWS (folder that contains bin, CSP, mgr and other folders)
set CACHE_DIR=C:\Program Files\InterSystems\Ensemble
set CACHE_DIR=C:\Program Files\Ensemble-2017
:: NAMESPACE TO IMPORT PACKAGE TO
set NAMESPACE=USER
:: Other variables
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CacheClassExplorer",
"version": "1.21.0",
"version": "1.21.1",
"description": "Class Explorer for InterSystems Caché",
"directories": {
"test": "test"
Expand Down
46 changes: 37 additions & 9 deletions src/cls/ClassExplorer/ClassView.cls
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
set props = ##class(%Dictionary.ClassDefinition).%OpenId("%Dictionary.ClassDefinition")
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:((pname '= "parent")
&& ('props.Properties.GetAt(j).Private)
&& ('$IsObject($PROPERTY(classDefinition, pname)))) $PROPERTY(oClass, pname) = $PROPERTY(classDefinition, pname)
try {
set:((pname '= "parent")
&& ('props.Properties.GetAt(j).Private)
&& ('$IsObject($PROPERTY(classDefinition, pname)))) $PROPERTY(oClass, pname) = $PROPERTY(classDefinition, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
if (oClass.TimeChanged) { set oClass.TimeChanged = $zdatetime(oClass.TimeChanged) }
if (oClass.TimeCreated) { set oClass.TimeCreated = $zdatetime(oClass.TimeCreated) }
Expand All @@ -117,7 +121,11 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
do oProperties.%DispatchSetProperty(p.Name, oProp)
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(p, pname)
try {
set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(p, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
if (..classExists(package _ "." _ p.Type)) {
set oProp.Type = package _ "." _ p.Type
Expand All @@ -140,7 +148,11 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
do oMethods.%DispatchSetProperty(met.Name, oMeth)
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:((pname '= "parent") && (pname '= "Implementation")) $PROPERTY(oMeth, pname) = $PROPERTY(met, pname)
try {
set:((pname '= "parent") && (pname '= "Implementation")) $PROPERTY(oMeth, pname) = $PROPERTY(met, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
}

Expand All @@ -153,7 +165,11 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
set p = classDefinition.Parameters.GetAt(i)
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:(pname '= "parent") $PROPERTY(oPar, pname) = $PROPERTY(p, pname)
try {
set:(pname '= "parent") $PROPERTY(oPar, pname) = $PROPERTY(p, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
do oParameters.%DispatchSetProperty(p.Name, oPar)
}
Expand All @@ -166,7 +182,11 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
set q = classDefinition.Queries.GetAt(i)
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(q, pname)
try {
set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(q, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
do oQueries.%DispatchSetProperty(q.Name, oProp)
}
Expand All @@ -179,7 +199,11 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
set xd = classDefinition.XDatas.GetAt(i)
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:((pname '= "parent") && (pname '= "Object")) $PROPERTY(oProp, pname) = $PROPERTY(xd, pname)
try {
set:((pname '= "parent") && (pname '= "Object")) $PROPERTY(oProp, pname) = $PROPERTY(xd, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
do oXDatas.%DispatchSetProperty(xd.Name, oProp)
}
Expand All @@ -192,7 +216,11 @@ ClassMethod fillClassData(oData As %ZEN.proxyObject, className As %String, level
set ind = classDefinition.Indices.GetAt(i)
for j=1:1:props.Properties.Count() {
set pname = props.Properties.GetAt(j).Name
set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(ind, pname)
try {
set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(ind, pname)
} catch (e) {
// Skip private properties that InterSystems may add in any future versions
}
}
do oIndices.%DispatchSetProperty(ind.Name, oProp)
}
Expand Down

0 comments on commit c00791b

Please sign in to comment.