forked from sdiemert/StarUMLJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJavaScriptConfigure.js
74 lines (64 loc) · 2.5 KB
/
JavaScriptConfigure.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
define(function (require, exports, module) {
"use strict";
var AppInit = app.getModule("utils/AppInit"),
Core = app.getModule("core/Core"),
PreferenceManager = app.getModule("core/PreferenceManager");
var preferenceId = "javascript";
var javaScriptConfigure = {
"javascript.gen" : {
text: "JavaScript Code Generation",
type: "Section"
},
/*
"javascript.gen.doc": {
text: "JavaScript Documentation",
description: "Generate JavaScript documentation from comments.",
type: "Check",
default: true
},
*/
"javascript.gen.copyright": {
text : "Copyright Text",
description: "Copyright Text to use on all files",
type : "String",
default : "\n/*\n*(C) Copyright MyCompany, Inc. \n*All rights reserved\n*/\n"
},
"javascript.gen.classType" : {
text : "Class Generation Pattern",
description: "Pattern to use for class generation.",
type : "Dropdown",
options : [{value: "prototype", text: "prototype"},
{value: "functional", text: "functional"},
{value: "mongoose", text: "mongoose"},
{value: "ember", text: "ember"}],
default : {value: "prototye", text: "prototype"}
},
"javascript.gen.indentSpaces": {
text : "Indent Spaces",
description: "Number of spaces for indentation.",
type : "Number",
default : 4
},
"javascript.gen.generateUnitTests": {
text : "Generate Unit Tests",
description: "Generate unit tests using Mocha unit test framework",
type : "Check",
default : false
}
};
function getId() {
return preferenceId;
}
function getGenOptions() {
return {
indentSpaces: PreferenceManager.get("javascript.gen.indentSpaces"),
classType : PreferenceManager.get("javascript.gen.classType"),
copyright : PreferenceManager.get("javascript.gen.copyright")
};
}
AppInit.htmlReady(function () {
PreferenceManager.register(preferenceId, "JavaScript", javaScriptConfigure);
});
exports.getId = getId;
exports.getGenOptions = getGenOptions;
});