From 14724961bfbdbff9f4ce24cb9a191864b6aa4157 Mon Sep 17 00:00:00 2001 From: ZitRo Date: Mon, 27 Apr 2015 20:41:43 +0300 Subject: [PATCH 1/2] COS code update & build fixes --- cache/projectTemplate.xml | 77 ++++++++++++++++++++++++++++++--------- gulpfile.js | 3 ++ 2 files changed, 63 insertions(+), 17 deletions(-) diff --git a/cache/projectTemplate.xml b/cache/projectTemplate.xml index 632c8fa..b94322b 100644 --- a/cache/projectTemplate.xml +++ b/cache/projectTemplate.xml @@ -4,10 +4,12 @@ Class contains methods that return structured class data. -63668,773.59952 +63668,60898.691763 63653,67019.989197 + +Returns structured class tree with all classes available in current namespace 1 %ZEN.proxyObject + +return structured data about class 1 -classDefinition:%Dictionary.ClassDefinition +oData:%ZEN.proxyObject,classDefinition:%Dictionary.ClassDefinition %ZEN.proxyObject 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() @@ -70,9 +76,11 @@ Class contains methods that return structured class data. 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() @@ -80,8 +88,9 @@ Class contains methods that return structured class data. 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 @@ -99,6 +108,7 @@ Class contains methods that return structured class data. "%DataType": "%Library.DataType", "%Status": "%Library.Status", "%CacheString": "%Library.CacheString", + "%Persistent": "%Library.Persistent", :typeName) ]]> @@ -119,7 +129,7 @@ Class contains methods that return structured class data. 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) } } @@ -128,6 +138,39 @@ Class contains methods that return structured class data. ]]> + +1 +oData:%ZEN.proxyObject,className:%String,type:%String +%Status + + + + +1 +oData:%ZEN.proxyObject,cdef:%Dictionary.ClassDefinition +%Status + + + 1 baseClassDefinition:%Dictionary.ClassDefinition @@ -136,9 +179,8 @@ Class contains methods that return structured class data. 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 ]]> @@ -152,6 +194,7 @@ Class contains methods that return structured class data. 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() @@ -161,7 +204,7 @@ Class contains methods that return structured class data. 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) } } @@ -172,7 +215,7 @@ Class contains methods that return structured class data. - + diff --git a/gulpfile.js b/gulpfile.js index 017ae84..667ce6e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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/")); }); @@ -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/")); }); From cc42a9791bea841149c0470c27f71cfaf6b6c6ca Mon Sep 17 00:00:00 2001 From: ZitRo Date: Mon, 27 Apr 2015 20:54:49 +0300 Subject: [PATCH 2/2] html build fix --- cache/projectTemplate.xml | 27 +-------------------------- gulpfile.js | 4 ++++ 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/cache/projectTemplate.xml b/cache/projectTemplate.xml index b94322b..70eef77 100644 --- a/cache/projectTemplate.xml +++ b/cache/projectTemplate.xml @@ -329,32 +329,7 @@ Method returns user application. %Status - - - - Cache UML explorer - - - - -
-
-
- -
-
-
-
- -
-
- -
-
-
- - + {{replace:html}} > return $$$OK ]]>
diff --git a/gulpfile.js b/gulpfile.js index 667ce6e..cbe65a1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -116,6 +116,10 @@ gulp.task("exportCacheXML", [ /\{\{replace:js}}/, function () { return fs.readFileSync("build/web/js/CacheUMLExplorer.js", "utf-8"); } )) + .pipe(replace( + /\{\{replace:html}}/, + function () { return fs.readFileSync("build/web/index.html", "utf-8"); } + )) .pipe(rename(function (path) { path.basename = "CacheUMLExplorer-v" + pkg["version"]; })) .pipe(gulp.dest("build/Cache")); });