forked from jim-stoll/Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CppPreferences.js
129 lines (119 loc) · 4.39 KB
/
CppPreferences.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*
* Copyright (c) 2013-2014 Minkyu Lee. All rights reserved.
*
* NOTICE: All information contained herein is, and remains the
* property of Minkyu Lee. The intellectual and technical concepts
* contained herein are proprietary to Minkyu Lee and may be covered
* by Republic of Korea and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Minkyu Lee ([email protected]).
*
*/
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, regexp: true */
/*global define, $, _, window, appshell, app */
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 = "Cpp";
var CppPreferences = {
"Cpp.gen": {
text: "C++ Code Generation",
type: "Section"
},
"Cpp.gen.useTab": {
text: "Use Tab",
description: "Use Tab for indentation instead of spaces.",
type: "Check",
default: false
},
"Cpp.gen.indentSpaces": {
text: "Indent Spaces",
description: "Number of spaces for indentation.",
type: "Number",
default: 4
},
"Cpp.gen.includeHeader": {
text: "Include default header",
description: "Include default header.",
type: "Check",
default: true
},
"Cpp.gen.useVector": {
text: "Use vector instead of *",
description: "Use vector<> instead of pointer.",
type: "Check",
default: true
},
"Cpp.gen.genCpp": {
text: "Generate *.cpp file",
description: "Generate cpp file",
type: "Check",
default: true
},
"Cpp.rev": {
text: "C++ Reverse Engineering",
type: "Section"
},
"Cpp.rev.association": {
text: "Use Association",
description: "Reverse C++ Fields as UML Associations.",
type: "Check",
default: true
},
"Cpp.rev.publicOnly": {
text: "Public Only",
description: "Reverse public members only.",
type: "Check",
default: false
},
"Cpp.rev.typeHierarchy": {
text: "Type Hierarchy Diagram",
description: "Create a type hierarchy diagram for all classes and interfaces",
type: "Check",
default: true
},
"Cpp.rev.packageOverview": {
text: "Package Overview Diagram",
description: "Create overview diagram for each package",
type: "Check",
default: true
},
"Cpp.rev.packageStructure": {
text: "Package Structure Diagram",
description: "Create a package structure diagram for all packages",
type: "Check",
default: true
}
};
function getId() {
return preferenceId;
}
function getGenOptions() {
return {
useTab : PreferenceManager.get("Cpp.gen.useTab"),
indentSpaces : PreferenceManager.get("Cpp.gen.indentSpaces"),
useVector : PreferenceManager.get("Cpp.gen.useVector"),
includeHeader : PreferenceManager.get("Cpp.gen.includeHeader"),
genCpp : PreferenceManager.get("Cpp.gen.genCpp")
};
}
function getRevOptions() {
return {
association : PreferenceManager.get("Cpp.rev.association"),
publicOnly : PreferenceManager.get("Cpp.rev.publicOnly"),
typeHierarchy : PreferenceManager.get("Cpp.rev.typeHierarchy"),
packageOverview : PreferenceManager.get("Cpp.rev.packageOverview"),
packageStructure : PreferenceManager.get("Cpp.rev.packageStructure")
};
}
AppInit.htmlReady(function () {
PreferenceManager.register(preferenceId, "C++", CppPreferences);
});
exports.getId = getId;
exports.getGenOptions = getGenOptions;
exports.getRevOptions = getRevOptions;
});