Skip to content

Commit b69c672

Browse files
project rename, settings for standard UML notation
1 parent abd0d70 commit b69c672

File tree

11 files changed

+128
-113
lines changed

11 files changed

+128
-113
lines changed

cache/projectTemplate.xml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2015.2 (Build 540)" ts="2015-04-28 19:50:48">
3-
<Class name="UMLExplorer.ClassView">
3+
<Class name="ClassExplorer.ClassView">
44
<Description>
5-
Cache UML Explorer vX.X.X/*build.replace:pkg.version*/
5+
Cache Class Explorer vX.X.X/*build.replace:pkg.version*/
66
Class contains methods that return structured classes/packages data.</Description>
77
<TimeChanged>63843,83200.096917</TimeChanged>
88
<TimeCreated>63653,67019.989197</TimeCreated>
@@ -365,19 +365,19 @@ Returns structured package data</Description>
365365
</Class>
366366

367367

368-
<Project name="UMLExplorer" LastModified="2015-05-24 18:14:48.579613">
368+
<Project name="ClassExplorer" LastModified="2015-05-24 18:14:48.579613">
369369
<Items>
370-
<ProjectItem name="UMLExplorer.ClassView" type="CLS"></ProjectItem>
371-
<ProjectItem name="UMLExplorer.Router" type="CLS"></ProjectItem>
372-
<ProjectItem name="UMLExplorer.StaticContent" type="CLS"></ProjectItem>
373-
<ProjectItem name="UMLExplorer.WebAppInstaller" type="CLS"></ProjectItem>
370+
<ProjectItem name="ClassExplorer.ClassView" type="CLS"></ProjectItem>
371+
<ProjectItem name="ClassExplorer.Router" type="CLS"></ProjectItem>
372+
<ProjectItem name="ClassExplorer.StaticContent" type="CLS"></ProjectItem>
373+
<ProjectItem name="ClassExplorer.WebAppInstaller" type="CLS"></ProjectItem>
374374
</Items>
375375
</Project>
376376

377377

378-
<Class name="UMLExplorer.Router">
378+
<Class name="ClassExplorer.Router">
379379
<Description>
380-
REST interface for UMLExplorer</Description>
380+
REST interface for ClassExplorer</Description>
381381
<Super>%CSP.REST</Super>
382382
<TimeChanged>63697,73073.878177</TimeChanged>
383383
<TimeCreated>63648,30450.187229</TimeCreated>
@@ -387,8 +387,8 @@ REST interface for UMLExplorer</Description>
387387
<Routes>
388388
<Route Url="/" Method="GET" Call="Index"/>
389389
<Route Url="/index" Method="GET" Call="Index"/>
390-
<Route Url="/css/CacheUMLExplorer.css" Method="GET" Call="GetCss"/>
391-
<Route Url="/js/CacheUMLExplorer.js" Method="GET" Call="GetJs"/>
390+
<Route Url="/css/CacheClassExplorer.css" Method="GET" Call="GetCss"/>
391+
<Route Url="/js/CacheClassExplorer.js" Method="GET" Call="GetJs"/>
392392
<Route Url="/Test" Method="GET" Call="Test"/>
393393
<Route Url="/GetClassTree" Method="GET" Call="GetClassTree"/>
394394
<Route Url="/GetClassView" Method="GET" Call="GetClassView"/>
@@ -405,7 +405,7 @@ Method returns whole class tree visible in the current namespace.</Description>
405405
<ClassMethod>1</ClassMethod>
406406
<ReturnType>%Status</ReturnType>
407407
<Implementation><![CDATA[
408-
do ##class(UMLExplorer.ClassView).getClassTree(%request.Get("namespace")).%ToJSON(, "o")
408+
do ##class(ClassExplorer.ClassView).getClassTree(%request.Get("namespace")).%ToJSON(, "o")
409409
return $$$OK
410410
]]></Implementation>
411411
</Method>
@@ -442,7 +442,7 @@ Return the list of all namespaces</Description>
442442
<ClassMethod>1</ClassMethod>
443443
<ReturnType>%Status</ReturnType>
444444
<Implementation><![CDATA[
445-
do ##class(UMLExplorer.ClassView).getAllNamespacesList().%ToJSON(, "o")
445+
do ##class(ClassExplorer.ClassView).getAllNamespacesList().%ToJSON(, "o")
446446
return $$$OK
447447
]]></Implementation>
448448
</Method>
@@ -500,7 +500,7 @@ Method returns user application HTML.</Description>
500500
</Class>
501501

502502

503-
<Class name="UMLExplorer.StaticContent">
503+
<Class name="ClassExplorer.StaticContent">
504504
<Description>
505505
Cache UML Explorer vX.X.X/*build.replace:pkg.version*/ static content generator.
506506
Class contains methods that return JS/CSS/HTML data for single page application.</Description>
@@ -514,7 +514,7 @@ Write the contents of xData tag</Description>
514514
<FormalSpec>Const:%String</FormalSpec>
515515
<ReturnType>%Status</ReturnType>
516516
<Implementation><![CDATA[
517-
Set xdata = ##class(%Dictionary.CompiledXData).%OpenId("UMLExplorer.StaticContent||"_Const).Data
517+
Set xdata = ##class(%Dictionary.CompiledXData).%OpenId("ClassExplorer.StaticContent||"_Const).Data
518518
set status=##class(%XML.TextReader).ParseStream(xdata, .textreader)
519519
while textreader.Read() { if (textreader.NodeType="chars") { w textreader.Value } }
520520
return $$$OK
@@ -547,7 +547,7 @@ Write the contents of xData tag</Description>
547547
</Class>
548548

549549

550-
<Class name="UMLExplorer.WebAppInstaller">
550+
<Class name="ClassExplorer.WebAppInstaller">
551551
<Super>%Projection.AbstractProjection</Super>
552552
<TimeChanged>63696,65168.289869</TimeChanged>
553553
<TimeCreated>63696,64041.85537</TimeCreated>
@@ -574,14 +574,14 @@ This method is invoked when a class is compiled.</Description>
574574
set cspProperties("NameSpace") = ns
575575
set cspProperties("Description") = "A WEB application for Cache UML Explorer."
576576
set cspProperties("IsNameSpaceDefault") = 1
577-
set cspProperties("DispatchClass") = "UMLExplorer.Router"
578-
if ('##class(Security.Applications).Exists("/UMLExplorer")) {
579-
w !, "Creating WEB application ""/UMLExplorer""..."
580-
set tSC = ##class(Security.Applications).Create("/UMLExplorer", .cspProperties)
577+
set cspProperties("DispatchClass") = "ClassExplorer.Router"
578+
if ('##class(Security.Applications).Exists("/ClassExplorer")) {
579+
w !, "Creating WEB application ""/ClassExplorer""..."
580+
set tSC = ##class(Security.Applications).Create("/ClassExplorer", .cspProperties)
581581
if $$$ISERR(tSC) throw ##class(%Installer.Exception).CreateFromStatus(tSC)
582-
w !, "WEB application ""/UMLExplorer"" created."
582+
w !, "WEB application ""/ClassExplorer"" created."
583583
} else {
584-
w !, "WEB application ""/UMLExplorer"" already exists, so it is ready to use."
584+
w !, "WEB application ""/ClassExplorer"" already exists, so it is ready to use."
585585
}
586586
zn:ns'="%SYS" ns
587587
quit $$$OK
@@ -597,10 +597,10 @@ This method is invoked when a class is 'uncompiled'.</Description>
597597
<Implementation><![CDATA[
598598
set ns = $NAMESPACE
599599
zn:ns'="%SYS" "%SYS"
600-
if (##class(Security.Applications).Exists("/UMLExplorer")) {
601-
w !, "Deleting WEB application ""/UMLExplorer""..."
602-
do ##class(Security.Applications).Delete("/UMLExplorer")
603-
w !, "WEB application ""/UMLExplorer"" was successfully removed."
600+
if (##class(Security.Applications).Exists("/ClassExplorer")) {
601+
w !, "Deleting WEB application ""/ClassExplorer""..."
602+
do ##class(Security.Applications).Delete("/ClassExplorer")
603+
w !, "WEB application ""/ClassExplorer"" was successfully removed."
604604
}
605605
zn:ns'="%SYS" ns
606606
QUIT $$$OK

gulpfile.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var banner = [
2323
" ** @author <%= pkg.author %>",
2424
" ** @version <%= pkg.version %>",
2525
" ** @license <%= pkg.license %>",
26-
" ** @see https://github.com/ZitRos/CacheUMLExplorer",
26+
" ** @see https://github.com/ZitRos/CacheClassExplorer",
2727
" **/",
2828
""
2929
].join("\n");
@@ -58,17 +58,17 @@ gulp.task("gatherLibs", ["clean"], function () {
5858
"web/jsLib/joint.layout.DirectedGraph.min.js"
5959
]))
6060
.pipe(stripComments({ safe: true }))
61-
.pipe(concat("CacheUMLExplorer.js"))
61+
.pipe(concat("CacheClassExplorer.js"))
6262
.pipe(replace(/ /g, "\\x0B"))
6363
.pipe(replace(/\x1b/g, "\\x1B"))
6464
.pipe(gulp.dest("build/web/js/"));
6565
});
6666

6767
gulp.task("gatherScripts", ["clean", "gatherLibs"], function () {
6868
return gulp.src("web/js/*.js")
69-
.pipe(concat("CacheUMLExplorer.js"))
69+
.pipe(concat("CacheClassExplorer.js"))
7070
.pipe(specialReplace())
71-
.pipe(wrap("CacheUMLExplorer = (function(){<%= contents %> return CacheUMLExplorer;}());"))
71+
.pipe(wrap("CacheClassExplorer = (function(){<%= contents %> return CacheClassExplorer;}());"))
7272
.pipe(uglify({
7373
output: {
7474
ascii_only: true,
@@ -78,15 +78,15 @@ gulp.task("gatherScripts", ["clean", "gatherLibs"], function () {
7878
preserveComments: "some"
7979
}))
8080
.pipe(header(banner, { pkg: pkg }))
81-
.pipe(addsrc.prepend("build/web/js/CacheUMLExplorer.js"))
82-
.pipe(concat("CacheUMLExplorer.js"))
81+
.pipe(addsrc.prepend("build/web/js/CacheClassExplorer.js"))
82+
.pipe(concat("CacheClassExplorer.js"))
8383
.pipe(replace(/\x1b/g, "\\x1B"))
8484
.pipe(gulp.dest("build/web/js/"));
8585
});
8686

8787
gulp.task("gatherCSS", ["clean"], function () {
8888
return gulp.src("web/css/*.css")
89-
.pipe(concat("CacheUMLExplorer.css"))
89+
.pipe(concat("CacheClassExplorer.css"))
9090
.pipe(postcss([ autoprefixer({ browsers: ["last 3 version"] }) ]))
9191
.pipe(minifyCSS({ keepSpecialComments: 0 }))
9292
.pipe(gulp.dest("build/web/css/"));
@@ -95,8 +95,8 @@ gulp.task("gatherCSS", ["clean"], function () {
9595
gulp.task("addHTMLFile", ["clean"], function () {
9696
return gulp.src("web/index.html")
9797
.pipe(htmlReplace({
98-
"css": "css/CacheUMLExplorer.css",
99-
"js": "js/CacheUMLExplorer.js"
98+
"css": "css/CacheClassExplorer.css",
99+
"js": "js/CacheClassExplorer.js"
100100
}))
101101
.pipe(gulp.dest("build/web/"));
102102
});
@@ -118,23 +118,23 @@ gulp.task("exportCacheXML", [
118118
.pipe(specialReplace())
119119
.pipe(replace(
120120
/\{\{replace:css}}/,
121-
function () { return fs.readFileSync("build/web/css/CacheUMLExplorer.css", "utf-8"); }
121+
function () { return fs.readFileSync("build/web/css/CacheClassExplorer.css", "utf-8"); }
122122
))
123123
.pipe(replace(
124124
/\{\{replace:js}}/,
125-
function () { return fs.readFileSync("build/web/js/CacheUMLExplorer.js", "utf-8"); }
125+
function () { return fs.readFileSync("build/web/js/CacheClassExplorer.js", "utf-8"); }
126126
))
127127
.pipe(replace(
128128
/\{\{replace:html}}/,
129129
function () { return fs.readFileSync("build/web/index.html", "utf-8"); }
130130
))
131-
.pipe(rename(function (path) { path.basename = "CacheUMLExplorer-v" + pkg["version"]; }))
131+
.pipe(rename(function (path) { path.basename = "CacheClassExplorer-v" + pkg["version"]; }))
132132
.pipe(gulp.dest("build/Cache"));
133133
});
134134

135135
gulp.task("zipRelease", ["exportCacheXML"], function () {
136136
return gulp.src(["build/**/*", "!build/web/**/*"])
137-
.pipe(zip("CacheUMLExplorer-v" + pkg["version"] + ".zip", {
137+
.pipe(zip("CacheClassExplorer-v" + pkg["version"] + ".zip", {
138138
comment: "Cache UML explorer v" + pkg["version"] + " by Nikita Savchenko\n\n" +
139139
"+ Cache folder holds XML file to import to InterSystems Cache.\n\n" +
140140
"For further information about installation and information, check README.md file."

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "CacheUMLExplorer",
3-
"version": "1.7.5",
2+
"name": "CacheClassExplorer",
3+
"version": "1.8.1",
44
"description": "An UML Class explorer for InterSystems Caché",
55
"directories": {
66
"test": "test"

web/index.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head lang="en">
44
<meta charset="UTF-8">
5-
<title>Cache UML explorer</title>
5+
<title>Cache Class Explorer</title>
66
<!-- build:css -->
77
<link rel="stylesheet" href="css/interface.css"/>
88
<link rel="stylesheet" href="css/treeView.css"/>
@@ -22,15 +22,15 @@
2222
<script type="text/javascript" src="jsLib/ImageExporter.js"></script>
2323
<script type="text/javascript" src="js/ClassView.js"></script>
2424
<script type="text/javascript" src="js/Lib.js"></script>
25-
<script type="text/javascript" src="js/CacheUMLExplorer.js"></script>
25+
<script type="text/javascript" src="js/CacheClassExplorer.js"></script>
2626
<script type="text/javascript" src="js/ClassTree.js"></script>
2727
<script type="text/javascript" src="js/Source.js"></script>
2828
<script type="text/javascript" src="js/UI.js"></script>
2929
<script type="text/javascript" src="js/HoverMessage.js"></script>
3030
<!-- endbuild -->
3131
<link id="favicon" rel="shortcut icon" href="#"/>
3232
</head>
33-
<body onload="cue = new CacheUMLExplorer(document.getElementById('treeView'), document.getElementById('svgContainer'))">
33+
<body onload="cue = new CacheClassExplorer(document.getElementById('treeView'), document.getElementById('svgContainer'))">
3434
<div class="ui-body" id="ui-body">
3535
<div class="ui-sideBlock">
3636
<div class="ui-sideSearchBlock" id="searchBlock">
@@ -104,7 +104,12 @@ <h1>
104104
<tr>
105105
<td><input id="setting.showClassIcons" type="checkbox"/></td>
106106
<td><label for="setting.showClassIcons">Show Icons Over Class Name</label></td>
107-
<td>Visualize class keywords</td>
107+
<td>Visualize class keywords (turn off for standard UML notation)</td>
108+
</tr>
109+
<tr>
110+
<td><input id="setting.showPropertyIcons" type="checkbox"/></td>
111+
<td><label for="setting.showPropertyIcons">Show Class Properties Icons</label></td>
112+
<td>Visualize property keywords (turn off for standard UML notation)</td>
108113
</tr>
109114
<tr>
110115
<td><input id="setting.showParameters" type="checkbox"/></td>

web/js/CacheUMLExplorer.js renamed to web/js/CacheClassExplorer.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* UML class diagram visualization tool for InterSystems products.
2+
* Class diagram visualization tool for InterSystems products.
33
* @author ZitRo
44
* @see http://zitros.tk
55
* @param {HTMLElement} treeViewContainer
66
* @param {HTMLElement} classViewContainer
77
* @constructor
88
*/
9-
var CacheUMLExplorer = function (treeViewContainer, classViewContainer) {
9+
var CacheClassExplorer = function (treeViewContainer, classViewContainer) {
1010

1111
var id = function (e) { return document.getElementById(e); };
1212

@@ -41,6 +41,7 @@ var CacheUMLExplorer = function (treeViewContainer, classViewContainer) {
4141
settings: {
4242
showDataTypesOnDiagram: id("setting.showDataTypesOnDiagram"),
4343
showClassIcons: id("setting.showClassIcons"),
44+
showPropertyIcons: id("setting.showPropertyIcons"),
4445
showParameters: id("setting.showParameters"),
4546
showProperties: id("setting.showProperties"),
4647
showMethods: id("setting.showMethods"),
@@ -57,6 +58,7 @@ var CacheUMLExplorer = function (treeViewContainer, classViewContainer) {
5758
this.settings = {
5859
showDataTypesOnDiagram: settingsValue("showDataTypesOnDiagram"),
5960
showClassIcons: settingsValue("showClassIcons", true),
61+
showPropertyIcons: settingsValue("showPropertyIcons", true),
6062
showParameters: settingsValue("showParameters", true),
6163
showProperties: settingsValue("showProperties", true),
6264
showMethods: settingsValue("showMethods", true),
@@ -74,12 +76,16 @@ var CacheUMLExplorer = function (treeViewContainer, classViewContainer) {
7476

7577
};
7678

77-
CacheUMLExplorer.prototype.initSettings = function () {
79+
CacheClassExplorer.prototype.initSettings = function () {
7880

7981
var self = this,
8082
textChanged = "Please, re-render diagram to make changes apply.";
8183

8284
for (var st in this.elements.settings) {
85+
if (!this.elements.settings[st]) {
86+
console.warn(st, "is Bred Sivoi Cobyly.");
87+
continue;
88+
}
8389
this.elements.settings[st].checked = this.settings[st];
8490
this.elements.settings[st].addEventListener("change", (function (st) {
8591
return function (e) {
@@ -98,7 +104,7 @@ CacheUMLExplorer.prototype.initSettings = function () {
98104
* Render namespaces.
99105
* @param nsData
100106
*/
101-
CacheUMLExplorer.prototype.updateNamespaces = function (nsData) {
107+
CacheClassExplorer.prototype.updateNamespaces = function (nsData) {
102108

103109
var ns, e;
104110

@@ -118,7 +124,7 @@ CacheUMLExplorer.prototype.updateNamespaces = function (nsData) {
118124
/**
119125
* @param {string} namespace
120126
*/
121-
CacheUMLExplorer.prototype.setNamespace = function (namespace) {
127+
CacheClassExplorer.prototype.setNamespace = function (namespace) {
122128

123129
var self = this;
124130

@@ -132,7 +138,7 @@ CacheUMLExplorer.prototype.setNamespace = function (namespace) {
132138

133139
};
134140

135-
CacheUMLExplorer.prototype.updateURL = function () {
141+
CacheClassExplorer.prototype.updateURL = function () {
136142

137143
var obj = {
138144
name: this.classTree.SELECTED_NAME,
@@ -145,7 +151,7 @@ CacheUMLExplorer.prototype.updateURL = function () {
145151

146152
};
147153

148-
CacheUMLExplorer.prototype.restoreFromURL = function () {
154+
CacheClassExplorer.prototype.restoreFromURL = function () {
149155

150156
var hash = (location.hash || "").substr(1),
151157
obj;
@@ -165,7 +171,7 @@ CacheUMLExplorer.prototype.restoreFromURL = function () {
165171

166172
};
167173

168-
CacheUMLExplorer.prototype.init = function () {
174+
CacheClassExplorer.prototype.init = function () {
169175

170176
var self = this,
171177
restored;
@@ -184,7 +190,7 @@ CacheUMLExplorer.prototype.init = function () {
184190

185191
this.elements.infoButton.addEventListener("click", function () {
186192
self.UI.displayMessage(
187-
"Cach&eacute; UML explorer v"
193+
"Cach&eacute; Class explorer v"
188194
+ "[NOT-BUILT]"/*build.replace:"pkg.version"*/
189195
+ "<br/>for InterSystems Cach&eacute;"
190196
+ "<br/>By Nikita Savchenko"

0 commit comments

Comments
 (0)