Skip to content

Commit

Permalink
COS code update & build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Apr 27, 2015
1 parent 91d2c15 commit 1472496
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 17 deletions.
77 changes: 60 additions & 17 deletions cache/projectTemplate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
<Class name="UMLExplorer.ClassView">
<Description>
Class contains methods that return structured class data.</Description>
<TimeChanged>63668,773.59952</TimeChanged>
<TimeChanged>63668,60898.691763</TimeChanged>
<TimeCreated>63653,67019.989197</TimeCreated>

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

<Method name="getClassData">
<Description>
return structured data about class</Description>
<ClassMethod>1</ClassMethod>
<FormalSpec>classDefinition:%Dictionary.ClassDefinition</FormalSpec>
<FormalSpec>oData:%ZEN.proxyObject,classDefinition:%Dictionary.ClassDefinition</FormalSpec>
<ReturnType>%ZEN.proxyObject</ReturnType>
<Implementation><![CDATA[
set oClass = ##class(%ZEN.proxyObject).%New()
Expand All @@ -59,29 +63,34 @@ Class contains methods that return structured class data.</Description>
set count = classDefinition.Properties.Count()
for i = 1:1:count {
set oProp = ##class(%ZEN.proxyObject).%New()
do oProperties.%DispatchSetProperty(classDefinition.Properties.GetAt(i).Name, oProp)
do oProp.%DispatchSetProperty("private", classDefinition.Properties.GetAt(i).Private)
do oProp.%DispatchSetProperty("readOnly", classDefinition.Properties.GetAt(i).ReadOnly)
do oProp.%DispatchSetProperty("type", classDefinition.Properties.GetAt(i).Type)
set p = classDefinition.Properties.GetAt(i)
do oProperties.%DispatchSetProperty(p.Name, oProp)
do oProp.%DispatchSetProperty("private", p.Private)
do oProp.%DispatchSetProperty("readOnly", p.ReadOnly)
do oProp.%DispatchSetProperty("type", p.Type)
do ..collectAggregation(oData, classDefinition.Name, p.Type)
}
set oMethods = ##class(%ZEN.proxyObject).%New()
set oClass.methods = oMethods
set count = classDefinition.Methods.Count()
for i = 1:1:count {
set oMeth = ##class(%ZEN.proxyObject).%New()
do oMethods.%DispatchSetProperty(classDefinition.Methods.GetAt(i).Name, oMeth)
do oMeth.%DispatchSetProperty("private", classDefinition.Methods.GetAt(i).Private)
do oMeth.%DispatchSetProperty("returns", classDefinition.Methods.GetAt(i).ReturnType)
set met = classDefinition.Methods.GetAt(i)
do oMethods.%DispatchSetProperty(met.Name, oMeth)
do oMeth.%DispatchSetProperty("private", met.Private)
do oMeth.%DispatchSetProperty("returns", met.ReturnType)
do oMeth.%DispatchSetProperty("classMethod", met.ClassMethod)
}
set oParameters = ##class(%ZEN.proxyObject).%New()
set oClass.parameters = oParameters
set count = classDefinition.Parameters.Count()
for i = 1:1:count {
set oPar = ##class(%ZEN.proxyObject).%New()
do oParameters.%DispatchSetProperty(classDefinition.Parameters.GetAt(i).Name, oPar)
do oPar.%DispatchSetProperty("type", classDefinition.Parameters.GetAt(i).Type)
set p = classDefinition.Parameters.GetAt(i)
do oParameters.%DispatchSetProperty(p.Name, oPar)
do oPar.%DispatchSetProperty("type", p.Type)
}
quit oClass
Expand All @@ -99,6 +108,7 @@ Class contains methods that return structured class data.</Description>
"%DataType": "%Library.DataType",
"%Status": "%Library.Status",
"%CacheString": "%Library.CacheString",
"%Persistent": "%Library.Persistent",
:typeName)
]]></Implementation>
</Method>
Expand All @@ -119,7 +129,7 @@ Class contains methods that return structured class data.</Description>
if (oData.classes.%DispatchGetProperty(className) = "") {
set cdef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
if (cdef '= "") {
do oData.classes.%DispatchSetProperty(className, ..getClassData(cdef))
do oData.classes.%DispatchSetProperty(className, ..getClassData(oData, cdef))
do ..collectInheritance(oData, cdef)
}
}
Expand All @@ -128,6 +138,39 @@ Class contains methods that return structured class data.</Description>
]]></Implementation>
</Method>

<Method name="collectAggregation">
<ClassMethod>1</ClassMethod>
<FormalSpec>oData:%ZEN.proxyObject,className:%String,type:%String</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(type)
if (classDef '= "") {
set oAgg = oData.aggregation.%DispatchGetProperty(className)
if (oAgg = "") {
set oAgg = ##class(%ZEN.proxyObject).%New()
do oData.aggregation.%DispatchSetProperty(className, oAgg)
}
} else { quit $$$OK }
do oAgg.%DispatchSetProperty(type, "1..1")
do ..collectClass(oData, classDef)
quit $$$OK
]]></Implementation>
</Method>

<Method name="collectClass">
<ClassMethod>1</ClassMethod>
<FormalSpec>oData:%ZEN.proxyObject,cdef:%Dictionary.ClassDefinition</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
if (oData.classes.%DispatchGetProperty(cdef.Name) '= "") { quit $$$OK }
do oData.classes.%DispatchSetProperty(cdef.Name, "IDLE")
do oData.classes.%DispatchSetProperty(cdef.Name, ..getClassData(oData, cdef))
do ..collectInheritance(oData, cdef)
]]></Implementation>
</Method>

<Method name="getClassView">
<ClassMethod>1</ClassMethod>
<FormalSpec>baseClassDefinition:%Dictionary.ClassDefinition</FormalSpec>
Expand All @@ -136,9 +179,8 @@ Class contains methods that return structured class data.</Description>
set oData = ##class(%ZEN.proxyObject).%New()
set oData.classes = ##class(%ZEN.proxyObject).%New()
set oData.inheritance = ##class(%ZEN.proxyObject).%New()
do oData.classes.%DispatchSetProperty(baseClassDefinition.Name, ..getClassData(baseClassDefinition))
do ..collectInheritance(oData, baseClassDefinition)
set oData.aggregation = ##class(%ZEN.proxyObject).%New()
do ..collectClass(oData, baseClassDefinition)
quit oData
]]></Implementation>
Expand All @@ -152,6 +194,7 @@ Class contains methods that return structured class data.</Description>
set oData = ##class(%ZEN.proxyObject).%New()
set oData.classes = ##class(%ZEN.proxyObject).%New()
set oData.inheritance = ##class(%ZEN.proxyObject).%New()
set oData.aggregation = ##class(%ZEN.proxyObject).%New()
set classes = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:Summary")
do classes.Execute()
Expand All @@ -161,7 +204,7 @@ Class contains methods that return structured class data.</Description>
set packageName = $LISTTOSTRING($LIST($LISTFROMSTRING(className, "."), 1, listLen), ".")
if (packageName = rootPackageName) {
set classDef = ##class(%Dictionary.ClassDefinition).%OpenId(className)
do oData.classes.%DispatchSetProperty(classDef.Name, ..getClassData(classDef))
do oData.classes.%DispatchSetProperty(classDef.Name, ..getClassData(oData, classDef))
do ..collectInheritance(oData, classDef)
}
}
Expand All @@ -172,7 +215,7 @@ Class contains methods that return structured class data.</Description>
</Class>


<Project name="UMLExplorer" LastModified="2015-04-25 15:46:50.605954">
<Project name="UMLExplorer" LastModified="2015-04-26 00:42:57.542208">
<Items>
<ProjectItem name="UMLExplorer.ClassView" type="CLS"/>
<ProjectItem name="UMLExplorer.Router" type="CLS"/>
Expand Down
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ gulp.task("gatherLibs", ["clean"], function () {
]))
.pipe(stripComments({ safe: true }))
.pipe(concat("CacheUMLExplorer.js"))
.pipe(replace(/ /g, "\\x0B"))
.pipe(replace(/\x1b/g, "\\x1B"))
.pipe(gulp.dest("build/web/js/"));
});

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

Expand Down

0 comments on commit 1472496

Please sign in to comment.