Skip to content

Commit

Permalink
Mod VSCode extension
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre3 committed Nov 3, 2022
1 parent 7f9ab16 commit 70bb820
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
5 changes: 4 additions & 1 deletion tools/csharp-to-plantuml/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ All notable changes to the "csharp-to-plantuml" extension will be documented in

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

## [Unreleased]
## [1.3.0]
### Added
- Add attribute-based configuration.

## [1.2.5]
### Changed
- Update to .NET6.0
Expand Down
2 changes: 1 addition & 1 deletion tools/csharp-to-plantuml/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2020 pierre3
Copyright (c) 2015-2022 pierre3

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 12 additions & 7 deletions tools/csharp-to-plantuml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@ Create class diagrams of PlantUML from C# source code.

## Extension Settings

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

## Known Issues


## Release Notes
## 1.3.0
- Add attribute-based configuration

## 1.2.5
- Update to .NET6.0
- Supports a record declaration
Expand Down
8 changes: 7 additions & 1 deletion tools/csharp-to-plantuml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "csharp-to-plantuml",
"displayName": "CSharp to PlantUML",
"description": "Generator to create class-diagram of PlantUML from C# source code.",
"version": "1.2.5",
"version": "1.3.0",
"preview": false,
"publisher": "pierre3",
"license": "MIT",
Expand Down Expand Up @@ -71,6 +71,12 @@
"scope": "resource",
"default": false,
"description": "Copy the output of all diagrams to file include.puml (this allows a PlanUMLServer to render it)."
},
"csharp2plantuml.attributeRequired": {
"type": "boolean",
"scope": "resource",
"default": false,
"description": "When this switch is enabled, only types with \"PlantUmlDiagramAttribute\" in the type declaration will be output."
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions tools/csharp-to-plantuml/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export function activate(context: vscode.ExtensionContext) {
const excludePath = conf.get('csharp2plantuml.excludePath') as string;
const createAssociation = conf.get('csharp2plantuml.createAssociation') as boolean;
const allInOne = conf.get('csharp2plantuml.allInOne') as boolean;
const attributeRequired = conf.get('csharp2plantuml.attributeRequired') as boolean;
const input = pathJoin(wsroot, inputPath);

var command = `dotnet "${tool}" "${input}"`;
Expand All @@ -57,6 +58,9 @@ export function activate(context: vscode.ExtensionContext) {
if (allInOne) {
command += " -allInOne";
}
if(attributeRequired) {
command += " -attributeRequired";
}

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

0 comments on commit 70bb820

Please sign in to comment.