Skip to content

Commit 1472496

Browse files
COS code update & build fixes
1 parent 91d2c15 commit 1472496

File tree

2 files changed

+63
-17
lines changed

2 files changed

+63
-17
lines changed

cache/projectTemplate.xml

Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
<Class name="UMLExplorer.ClassView">
55
<Description>
66
Class contains methods that return structured class data.</Description>
7-
<TimeChanged>63668,773.59952</TimeChanged>
7+
<TimeChanged>63668,60898.691763</TimeChanged>
88
<TimeCreated>63653,67019.989197</TimeCreated>
99

1010
<Method name="getClassTree">
11+
<Description>
12+
Returns structured class tree with all classes available in current namespace</Description>
1113
<ClassMethod>1</ClassMethod>
1214
<ReturnType>%ZEN.proxyObject</ReturnType>
1315
<Implementation><![CDATA[
@@ -47,8 +49,10 @@ Class contains methods that return structured class data.</Description>
4749
</Method>
4850

4951
<Method name="getClassData">
52+
<Description>
53+
return structured data about class</Description>
5054
<ClassMethod>1</ClassMethod>
51-
<FormalSpec>classDefinition:%Dictionary.ClassDefinition</FormalSpec>
55+
<FormalSpec>oData:%ZEN.proxyObject,classDefinition:%Dictionary.ClassDefinition</FormalSpec>
5256
<ReturnType>%ZEN.proxyObject</ReturnType>
5357
<Implementation><![CDATA[
5458
set oClass = ##class(%ZEN.proxyObject).%New()
@@ -59,29 +63,34 @@ Class contains methods that return structured class data.</Description>
5963
set count = classDefinition.Properties.Count()
6064
for i = 1:1:count {
6165
set oProp = ##class(%ZEN.proxyObject).%New()
62-
do oProperties.%DispatchSetProperty(classDefinition.Properties.GetAt(i).Name, oProp)
63-
do oProp.%DispatchSetProperty("private", classDefinition.Properties.GetAt(i).Private)
64-
do oProp.%DispatchSetProperty("readOnly", classDefinition.Properties.GetAt(i).ReadOnly)
65-
do oProp.%DispatchSetProperty("type", classDefinition.Properties.GetAt(i).Type)
66+
set p = classDefinition.Properties.GetAt(i)
67+
do oProperties.%DispatchSetProperty(p.Name, oProp)
68+
do oProp.%DispatchSetProperty("private", p.Private)
69+
do oProp.%DispatchSetProperty("readOnly", p.ReadOnly)
70+
do oProp.%DispatchSetProperty("type", p.Type)
71+
do ..collectAggregation(oData, classDefinition.Name, p.Type)
6672
}
6773
6874
set oMethods = ##class(%ZEN.proxyObject).%New()
6975
set oClass.methods = oMethods
7076
set count = classDefinition.Methods.Count()
7177
for i = 1:1:count {
7278
set oMeth = ##class(%ZEN.proxyObject).%New()
73-
do oMethods.%DispatchSetProperty(classDefinition.Methods.GetAt(i).Name, oMeth)
74-
do oMeth.%DispatchSetProperty("private", classDefinition.Methods.GetAt(i).Private)
75-
do oMeth.%DispatchSetProperty("returns", classDefinition.Methods.GetAt(i).ReturnType)
79+
set met = classDefinition.Methods.GetAt(i)
80+
do oMethods.%DispatchSetProperty(met.Name, oMeth)
81+
do oMeth.%DispatchSetProperty("private", met.Private)
82+
do oMeth.%DispatchSetProperty("returns", met.ReturnType)
83+
do oMeth.%DispatchSetProperty("classMethod", met.ClassMethod)
7684
}
7785
7886
set oParameters = ##class(%ZEN.proxyObject).%New()
7987
set oClass.parameters = oParameters
8088
set count = classDefinition.Parameters.Count()
8189
for i = 1:1:count {
8290
set oPar = ##class(%ZEN.proxyObject).%New()
83-
do oParameters.%DispatchSetProperty(classDefinition.Parameters.GetAt(i).Name, oPar)
84-
do oPar.%DispatchSetProperty("type", classDefinition.Parameters.GetAt(i).Type)
91+
set p = classDefinition.Parameters.GetAt(i)
92+
do oParameters.%DispatchSetProperty(p.Name, oPar)
93+
do oPar.%DispatchSetProperty("type", p.Type)
8594
}
8695
8796
quit oClass
@@ -99,6 +108,7 @@ Class contains methods that return structured class data.</Description>
99108
"%DataType": "%Library.DataType",
100109
"%Status": "%Library.Status",
101110
"%CacheString": "%Library.CacheString",
111+
"%Persistent": "%Library.Persistent",
102112
:typeName)
103113
]]></Implementation>
104114
</Method>
@@ -119,7 +129,7 @@ Class contains methods that return structured class data.</Description>
119129
if (oData.classes.%DispatchGetProperty(className) = "") {
120130
set cdef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
121131
if (cdef '= "") {
122-
do oData.classes.%DispatchSetProperty(className, ..getClassData(cdef))
132+
do oData.classes.%DispatchSetProperty(className, ..getClassData(oData, cdef))
123133
do ..collectInheritance(oData, cdef)
124134
}
125135
}
@@ -128,6 +138,39 @@ Class contains methods that return structured class data.</Description>
128138
]]></Implementation>
129139
</Method>
130140

141+
<Method name="collectAggregation">
142+
<ClassMethod>1</ClassMethod>
143+
<FormalSpec>oData:%ZEN.proxyObject,className:%String,type:%String</FormalSpec>
144+
<ReturnType>%Status</ReturnType>
145+
<Implementation><![CDATA[
146+
set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(type)
147+
if (classDef '= "") {
148+
set oAgg = oData.aggregation.%DispatchGetProperty(className)
149+
if (oAgg = "") {
150+
set oAgg = ##class(%ZEN.proxyObject).%New()
151+
do oData.aggregation.%DispatchSetProperty(className, oAgg)
152+
}
153+
} else { quit $$$OK }
154+
155+
do oAgg.%DispatchSetProperty(type, "1..1")
156+
do ..collectClass(oData, classDef)
157+
158+
quit $$$OK
159+
]]></Implementation>
160+
</Method>
161+
162+
<Method name="collectClass">
163+
<ClassMethod>1</ClassMethod>
164+
<FormalSpec>oData:%ZEN.proxyObject,cdef:%Dictionary.ClassDefinition</FormalSpec>
165+
<ReturnType>%Status</ReturnType>
166+
<Implementation><![CDATA[
167+
if (oData.classes.%DispatchGetProperty(cdef.Name) '= "") { quit $$$OK }
168+
do oData.classes.%DispatchSetProperty(cdef.Name, "IDLE")
169+
do oData.classes.%DispatchSetProperty(cdef.Name, ..getClassData(oData, cdef))
170+
do ..collectInheritance(oData, cdef)
171+
]]></Implementation>
172+
</Method>
173+
131174
<Method name="getClassView">
132175
<ClassMethod>1</ClassMethod>
133176
<FormalSpec>baseClassDefinition:%Dictionary.ClassDefinition</FormalSpec>
@@ -136,9 +179,8 @@ Class contains methods that return structured class data.</Description>
136179
set oData = ##class(%ZEN.proxyObject).%New()
137180
set oData.classes = ##class(%ZEN.proxyObject).%New()
138181
set oData.inheritance = ##class(%ZEN.proxyObject).%New()
139-
do oData.classes.%DispatchSetProperty(baseClassDefinition.Name, ..getClassData(baseClassDefinition))
140-
141-
do ..collectInheritance(oData, baseClassDefinition)
182+
set oData.aggregation = ##class(%ZEN.proxyObject).%New()
183+
do ..collectClass(oData, baseClassDefinition)
142184
143185
quit oData
144186
]]></Implementation>
@@ -152,6 +194,7 @@ Class contains methods that return structured class data.</Description>
152194
set oData = ##class(%ZEN.proxyObject).%New()
153195
set oData.classes = ##class(%ZEN.proxyObject).%New()
154196
set oData.inheritance = ##class(%ZEN.proxyObject).%New()
197+
set oData.aggregation = ##class(%ZEN.proxyObject).%New()
155198
156199
set classes = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:Summary")
157200
do classes.Execute()
@@ -161,7 +204,7 @@ Class contains methods that return structured class data.</Description>
161204
set packageName = $LISTTOSTRING($LIST($LISTFROMSTRING(className, "."), 1, listLen), ".")
162205
if (packageName = rootPackageName) {
163206
set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
164-
do oData.classes.%DispatchSetProperty(classDef.Name, ..getClassData(classDef))
207+
do oData.classes.%DispatchSetProperty(classDef.Name, ..getClassData(oData, classDef))
165208
do ..collectInheritance(oData, classDef)
166209
}
167210
}
@@ -172,7 +215,7 @@ Class contains methods that return structured class data.</Description>
172215
</Class>
173216

174217

175-
<Project name="UMLExplorer" LastModified="2015-04-25 15:46:50.605954">
218+
<Project name="UMLExplorer" LastModified="2015-04-26 00:42:57.542208">
176219
<Items>
177220
<ProjectItem name="UMLExplorer.ClassView" type="CLS"/>
178221
<ProjectItem name="UMLExplorer.Router" type="CLS"/>

gulpfile.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ gulp.task("gatherLibs", ["clean"], function () {
5151
]))
5252
.pipe(stripComments({ safe: true }))
5353
.pipe(concat("CacheUMLExplorer.js"))
54+
.pipe(replace(/ /g, "\\x0B"))
55+
.pipe(replace(/\x1b/g, "\\x1B"))
5456
.pipe(gulp.dest("build/web/js/"));
5557
});
5658

@@ -70,6 +72,7 @@ gulp.task("gatherScripts", ["clean", "gatherLibs"], function () {
7072
.pipe(header(banner, { pkg: pkg }))
7173
.pipe(addsrc.prepend("build/web/js/CacheUMLExplorer.js"))
7274
.pipe(concat("CacheUMLExplorer.js"))
75+
.pipe(replace(/\x1b/g, "\\x1B"))
7376
.pipe(gulp.dest("build/web/js/"));
7477
});
7578

0 commit comments

Comments
 (0)