Skip to content

Commit 70bb820

Browse files
committed
Mod VSCode extension
1 parent 7f9ab16 commit 70bb820

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

tools/csharp-to-plantuml/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ All notable changes to the "csharp-to-plantuml" extension will be documented in
33

44
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
55

6-
## [Unreleased]
6+
## [1.3.0]
7+
### Added
8+
- Add attribute-based configuration.
9+
710
## [1.2.5]
811
### Changed
912
- Update to .NET6.0

tools/csharp-to-plantuml/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2020 pierre3
3+
Copyright (c) 2015-2022 pierre3
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

tools/csharp-to-plantuml/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,30 @@ Create class diagrams of PlantUML from C# source code.
77

88
## Extension Settings
99

10-
- __csharp2plantuml.inputPath__
10+
- __csharp2plantuml.inputPath__
1111
Specify a input folder (relative to workspace folder)
12-
- __csharp2plantuml.outputPath__
12+
- __csharp2plantuml.outputPath__
1313
Specify a output folder (relative to workspace folder)
14-
- __csharp2plantuml.public__
14+
- __csharp2plantuml.public__
1515
Only public accessibility members are output.
16-
- __csharp2plantuml.ignoreAccessibility__
16+
- __csharp2plantuml.ignoreAccessibility__
1717
Specify accessibiliies of members to ignore, with a comma separated list. (ex. 'private,protected,protected internal')
18-
- __csharp2plantuml.excludePath__
18+
- __csharp2plantuml.excludePath__
1919
Specify exclude file or directory paths (relative to the \"InputPath\"), with a comma separated list. (ex. 'obj,Properties\\AssemblyInfo.cs')
20-
- __csharp2plantuml.createAssociation__
20+
- __csharp2plantuml.createAssociation__
2121
Create object associations from references of fields and properites.
22-
- __csharp2plantuml.allInOne__
22+
- __csharp2plantuml.allInOne__
2323
Copy the output of all diagrams to file include.puml (this allows a PlanUMLServer to render it).
24+
- __csharp2plantuml.attributeRequired__
25+
When this switch is enabled, only types with "PlantUmlDiagramAttribute" in the type declaration will be output.
2426

2527
## Known Issues
2628

2729

2830
## Release Notes
31+
## 1.3.0
32+
- Add attribute-based configuration
33+
2934
## 1.2.5
3035
- Update to .NET6.0
3136
- Supports a record declaration

tools/csharp-to-plantuml/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "csharp-to-plantuml",
33
"displayName": "CSharp to PlantUML",
44
"description": "Generator to create class-diagram of PlantUML from C# source code.",
5-
"version": "1.2.5",
5+
"version": "1.3.0",
66
"preview": false,
77
"publisher": "pierre3",
88
"license": "MIT",
@@ -71,6 +71,12 @@
7171
"scope": "resource",
7272
"default": false,
7373
"description": "Copy the output of all diagrams to file include.puml (this allows a PlanUMLServer to render it)."
74+
},
75+
"csharp2plantuml.attributeRequired": {
76+
"type": "boolean",
77+
"scope": "resource",
78+
"default": false,
79+
"description": "When this switch is enabled, only types with \"PlantUmlDiagramAttribute\" in the type declaration will be output."
7480
}
7581
}
7682
}

tools/csharp-to-plantuml/src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export function activate(context: vscode.ExtensionContext) {
3636
const excludePath = conf.get('csharp2plantuml.excludePath') as string;
3737
const createAssociation = conf.get('csharp2plantuml.createAssociation') as boolean;
3838
const allInOne = conf.get('csharp2plantuml.allInOne') as boolean;
39+
const attributeRequired = conf.get('csharp2plantuml.attributeRequired') as boolean;
3940
const input = pathJoin(wsroot, inputPath);
4041

4142
var command = `dotnet "${tool}" "${input}"`;
@@ -57,6 +58,9 @@ export function activate(context: vscode.ExtensionContext) {
5758
if (allInOne) {
5859
command += " -allInOne";
5960
}
61+
if(attributeRequired) {
62+
command += " -attributeRequired";
63+
}
6064

6165
outputchannel.appendLine("[exec] " + command);
6266
exec(command, (error, stdout, stderror) => {

0 commit comments

Comments
 (0)