Skip to content

Commit 606b477

Browse files
XML code highlight, readme update
1 parent 7a95033 commit 606b477

File tree

7 files changed

+41
-4
lines changed

7 files changed

+41
-4
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
A Web-based user interface for InterSystems Caché which allows to create and manage classes
44
literally without touching any code.
55

6+
Features
7+
--------
8+
9+
+ Simple, intuitive and powerful visual class editing and exploring tool for both desktop and mobile devices;
10+
+ Supports all basic class editing functionality:
11+
+ Adding/deleting classes, editing class keywords, comments, etc;
12+
+ Adding/deleting/altering class members: parameters, properties, methods, queries, xDatas, indices;
13+
+ **Convenient code editing** for methods and xDatas;
14+
+ Editing all class members keywords with inputs, drop-downs and suggestions;
15+
+ XData code highlight (COS highlight is coming!);
16+
+ **Embedded web terminal** if [Caché web terminal](http://intersystems-ru.github.io/webterminal/) is installed in the system;
17+
+ Smart class members grouping, folding and convenient interface, adaptive design;
18+
+ More features are coming!
19+
620
Preview
721
-------
822

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cache-visual-editor",
33
"printableName": "Cache Visual Editor",
44
"packageName": "VisualEditor",
5-
"version": "0.9.4",
5+
"version": "0.9.5",
66
"description": "Visual class editor for InterSystems Caché",
77
"main": "index.js",
88
"keywords": [

source/cache/REST/StaticLibJS.cls

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Class VisualEditor.REST.StaticLibJS extends VisualEditor.REST.Content [ Generate
55
XData UrlMap
66
{
77
<Routes>
8-
<Route Url="/ace.js" Method="GET" Call="AceJS"/>
8+
<Route Url="/ace/ace.js" Method="GET" Call="AceJS"/>
9+
<Route Url="/ace/mode-xml.js" Method="GET" Call="AceXML"/>
910
</Routes>
1011
}
1112

@@ -15,10 +16,22 @@ ClassMethod AceJS() As %Status
1516
return ..PrintXData("acejs")
1617
}
1718

19+
/// Outputs ace.js code
20+
ClassMethod AceXML() As %Status
21+
{
22+
return ..PrintXData("acexml")
23+
}
24+
1825
/// This block handles HTML markup.
1926
XData acejs [ MimeType = text/javascript ]
2027
{
21-
<d><![CDATA[<!-- @include ../client/js/lib/ace.js -->]]></d>
28+
<d><![CDATA[<!-- @include ../client/js/lib/ace/ace.js -->]]></d>
29+
}
30+
31+
/// This block handles HTML markup.
32+
XData acexml [ MimeType = text/javascript ]
33+
{
34+
<d><![CDATA[<!-- @include ../client/js/lib/ace/mode-xml.js -->]]></d>
2235
}
2336

2437
}

source/client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link rel="icon" type="image/png" href="favicon.png"/>
1212
<link rel="stylesheet" href="css/index.css"/>
1313
<script type="text/javascript" src="js/index.js" async defer></script>
14-
<script type="text/javascript" src="js/lib/ace.js" async defer></script>
14+
<script type="text/javascript" src="js/lib/ace/ace.js" async defer></script>
1515
</head>
1616
<body>
1717
<div class="pages">

source/client/js/classEditor/class/code.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export function getCodeCaptionView ({ memberManifest, codePropertyName, data, sa
3030
keywordManifest = (memberManifest[codePropertyName] || {}),
3131
returnTypeProp = keywordManifest["returnTypeProperty"] || ``,
3232
formalSpecProperty = keywordManifest["formalSpecProperty"] || ``,
33+
codeMode = keywordManifest[`codeMode`] || "",
3334
ROUTINE_SUPPORT = hasRoutineCode(code),
3435
useRoutinesToggle = toggle(ROUTINE_SUPPORT),
3536
useRoutinesBlock = block(`div`, `property-block`),
@@ -102,6 +103,14 @@ export function getCodeCaptionView ({ memberManifest, codePropertyName, data, sa
102103
editor.setOptions({
103104
maxLines: Infinity
104105
});
106+
if (
107+
codeMode
108+
|| data[`MimeType`] === `` // default is `text/xml`
109+
|| data[`MimeType`] === `text/xml`
110+
|| data[`MimeType`] === `text/html`
111+
) {
112+
editor.getSession().setMode("ace/mode/xml");
113+
}
105114

106115
editor.on(`change`, ({ start, end }) => {
107116
if (start.row !== end.row)

source/client/js/lib/ace/mode-xml.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)