Skip to content

Commit ca8cce5

Browse files
committed
Added new command specification to package.json and defined new configuration settings.
1 parent 6ea4c85 commit ca8cce5

File tree

2 files changed

+84
-21
lines changed

2 files changed

+84
-21
lines changed

package.json

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"displayName": "AngularTools",
55
"description": "AngularTools is a collection of tools for exploring an Angular project, help you with documenting, reverse engineering a project or help when refactoring.",
66
"icon": "images/logo.png",
7-
"version": "1.4.4",
7+
"version": "1.5.0",
88
"license": "MIT",
99
"repository": "https://github.com/CoderAllan/vscode-angulartools",
1010
"author": {
@@ -31,12 +31,12 @@
3131
"onCommand:angulartools.modulesToMarkdown",
3232
"onCommand:angulartools.packageJsonToMarkdown",
3333
"onCommand:angulartools.showComponentHierarchy",
34+
"onCommand:angulartools.showModuleHierarchy",
3435
"onCommand:angulartools.componentHierarchyMarkdown"
3536
],
3637
"main": "./out/extension.js",
3738
"contributes": {
38-
"commands": [
39-
{
39+
"commands": [{
4040
"command": "angulartools.listAllImports",
4141
"title": "AngularTools: List all imports"
4242
},
@@ -60,6 +60,10 @@
6060
"command": "angulartools.showComponentHierarchy",
6161
"title": "AngularTools: Show a graph representing the component hierarchy."
6262
},
63+
{
64+
"command": "angulartools.showModuleHierarchy",
65+
"title": "AngularTools: Show a graph representing the module hierarchy."
66+
},
6367
{
6468
"command": "angulartools.componentHierarchyMarkdown",
6569
"title": "AngularTools: Generate a directed graph in Mermaid Markdown format."
@@ -139,20 +143,7 @@
139143
"angularTools.showComponentHierarchy.nodeShape": {
140144
"type": "string",
141145
"default": "box",
142-
"enum": [
143-
"ellipse",
144-
"circle",
145-
"database",
146-
"box",
147-
"text",
148-
"diamond",
149-
"dot",
150-
"star",
151-
"triangle",
152-
"triangleDown",
153-
"hexagon",
154-
"square "
155-
],
146+
"enum": ["ellipse", "circle", "database", "box", "text", "diamond", "dot", "star", "triangle", "triangleDown", "hexagon", "square"],
156147
"description": "The shape of the nodes in the component hierarchy graph. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape."
157148
},
158149
"angularTools.showComponentHierarchy.graphSelectionGuidelineColor": {
@@ -180,6 +171,65 @@
180171
"default": "ComponentHierarchy.png",
181172
"description": "The default name used when saving the component hierarchy to a Png file."
182173
},
174+
"angularTools.showModuleHierarchy.moduleHierarchyFilename": {
175+
"type": "string",
176+
"default": "ModuleHierarchy.png",
177+
"description": "The default name used when saving the module hierarchy to a Png file."
178+
},
179+
"angularTools.showModuleHierarchy.componentNodeBackgroundColor": {
180+
"type": "string",
181+
"default": "#0288d1",
182+
"description": "The default color of the nodes representing components."
183+
},
184+
"angularTools.showModuleHierarchy.componentNodeShape": {
185+
"type": "string",
186+
"default": "ellipse",
187+
"enum": ["ellipse", "circle", "database", "box", "text", "diamond", "dot", "star", "triangle", "triangleDown", "hexagon", "square"],
188+
"description": "The default shape of the nodes representing components. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape."
189+
},
190+
"angularTools.showModuleHierarchy.moduleNodeBackgroundColor": {
191+
"type": "string",
192+
"default": "#e53935",
193+
"description": "The default color of the nodes representing modules."
194+
},
195+
"angularTools.showModuleHierarchy.moduleNodeShape": {
196+
"type": "string",
197+
"default": "box",
198+
"enum": ["ellipse", "circle", "database", "box", "text", "diamond", "dot", "star", "triangle", "triangleDown", "hexagon", "square"],
199+
"description": "The default shape of the nodes representing modules. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape."
200+
},
201+
"angularTools.showModuleHierarchy.pipeNodeBackgroundColor": {
202+
"type": "string",
203+
"default": "#00897b",
204+
"description": "The default color of the pipes representing modules."
205+
},
206+
"angularTools.showModuleHierarchy.pipeNodeShape": {
207+
"type": "string",
208+
"default": "box",
209+
"enum": ["ellipse", "circle", "database", "box", "text", "diamond", "dot", "star", "triangle", "triangleDown", "hexagon", "square"],
210+
"description": "The default shape of the nodes representing pipes. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape."
211+
},
212+
"angularTools.showModuleHierarchy.directiveNodeBackgroundColor": {
213+
"type": "string",
214+
"default": "#ffc107",
215+
"description": "The default color of the directives representing modules."
216+
},
217+
"angularTools.showModuleHierarchy.directiveNodeShape": {
218+
"type": "string",
219+
"default": "box",
220+
"enum": ["ellipse", "circle", "database", "box", "text", "diamond", "dot", "star", "triangle", "triangleDown", "hexagon", "square"],
221+
"description": "The default shape of the nodes representing directives. Notice that 'ellipse','circle','database','box' and 'text' have the label inside the shape, the rest have the label outside the shape."
222+
},
223+
"angularTools.showModuleHierarchy.importEdgeColor": {
224+
"type": "string",
225+
"default": "#43a047",
226+
"description": "The default color of the edges representing imports."
227+
},
228+
"angularTools.showModuleHierarchy.exportEdgeColor": {
229+
"type": "string",
230+
"default": "#0288d1",
231+
"description": "The default color of the edges representing exports."
232+
},
183233
"angularTools.componentHierarchyMarkdownFilename": {
184234
"type": "string",
185235
"default": "ComponentHierarchy.md",
@@ -230,4 +280,4 @@
230280
"xmldom": "^0.4.0",
231281
"xmlserializer": "^0.6.1"
232282
}
233-
}
283+
}

src/config.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,28 @@ export class Config {
3535
public get projectDirectoryStructureMarkdownFilename(): string { return this.getSetting<string>('projectDirectoryStructureMarkdownFilename', 'ReadMe-ProjectDirectoryStructure.md'); }
3636

3737
// ShowComponentHierarchy
38-
public get visRootNodeBackgroundColor(): string { return this.getSetting<string>('showComponentHierarchy.rootNodeBackgroundColor', '#00FF00'); }
38+
public get visRootNodeBackgroundColor(): string { return this.getSetting<string>('showComponentHierarchy.rootNodeBackgroundColor', '#3abc3f'); }
3939
public get visNodeShape(): string { return this.getSetting<string>('showComponentHierarchy.nodeShape', 'box'); }
4040
public get visEdgeArrowToType(): string { return this.getSetting<string>('showComponentHierarchy.edgeArrowToType', 'triangle'); }
41-
public get graphSelectionGuidelineColor(): string { return this.getSetting<string>('showComponentHierarchy.graphSelectionGuidelineColor', 'blue'); }
41+
public get graphSelectionGuidelineColor(): string { return this.getSetting<string>('showComponentHierarchy.graphSelectionGuidelineColor', '#0288d1'); }
4242
public get graphSelectionGuidelineWidth(): number { return this.getSetting<number>('showComponentHierarchy.graphSelectionGuidelineWidth', 1); }
43-
public get graphSelectionColor(): string { return this.getSetting<string>('showComponentHierarchy.graphSelectionColor', 'red'); }
43+
public get graphSelectionColor(): string { return this.getSetting<string>('showComponentHierarchy.graphSelectionColor', '#e53935'); }
4444
public get graphSelectionWidth(): number { return this.getSetting<number>('showComponentHierarchy.graphSelectionWidth', 2); }
4545
public get componentHierarchyFilename(): string { return this.getSetting<string>('showComponentHierarchy.componentHierarchyFilename', 'ComponentHierarchy.png'); }
4646

47+
// ShowModuleHierarchy
48+
public get moduleHierarchyFilename(): string { return this.getSetting<string>('showModuleHierarchy.moduleHierarchyFilename', 'ModuleHierarchy.png'); }
49+
public get componentNodeBackgroundColor(): string { return this.getSetting<string>('showModuleHierarchy.componentNodeBackgroundColor', '#0288d1');}
50+
public get componentNodeShape(): string { return this.getSetting<string>('showModuleHierarchy.componentNodeShape', 'box'); }
51+
public get moduleNodeBackgroundColor(): string { return this.getSetting<string>('showModuleHierarchy.moduleNodeBackgroundColor', '#e53935');}
52+
public get moduleNodeShape(): string { return this.getSetting<string>('showModuleHierarchy.moduleNodeShape', 'box'); }
53+
public get pipeNodeBackgroundColor(): string { return this.getSetting<string>('showModuleHierarchy.pipeNodeBackgroundColor', '#00897b');}
54+
public get pipeNodeShape(): string { return this.getSetting<string>('showModuleHierarchy.pipeNodeShape', 'box'); }
55+
public get directiveNodeBackgroundColor(): string { return this.getSetting<string>('showModuleHierarchy.directiveNodeBackgroundColor', '#ffc107');}
56+
public get directiveNodeShape(): string { return this.getSetting<string>('showModuleHierarchy.directiveNodeShape', 'box'); }
57+
public get importEdgeColor(): string { return this.getSetting<string>('showModuleHierarchy.importEdgeColor', '#43a047'); }
58+
public get exportEdgeColor(): string { return this.getSetting<string>('showModuleHierarchy.exportEdgeColor', '#0288d1'); }
59+
4760
// ComponentHierarchyMarkdown
4861
public get componentHierarchyMarkdownFilename(): string { return this.getSetting<string>('componentHierarchyMarkdownFilename', 'ComponentHierarchy.md'); }
4962

0 commit comments

Comments
 (0)