diff --git a/README.md b/README.md
index 3687b7be..e8d7238b 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,8 @@ It's populating itself as you work with git. It does not get in the way and only
RepoM will not compete with your favourite git clients, so keep them. It's not about working within a repository: It's a new way to use all of your repositories to make your daily work easier.
+If you recognise this introduction you might be right. RepoM is a fork of the popular [RepoZ](#credits).
+
## The Hub
The hub provides a quick overview of your repositories including their current branch, a short status information, and optionally some provided tags. Additionally, it offers some shortcuts like revealing a repository in the Windows Explorer, opening a command line tool in a given repository, checking out git branches and lots of other predefined or customizable actions.
@@ -40,41 +42,41 @@ The main functionality of RepoM are the quick actions to execute per repository.
To read more about the context menu, click here.
-These actions are defined in the `RepositoryActions.yaml` located in your `%APPDATA%\RepoM\` folder. More information can be found [here](docs/RepositoryActions.md).
+These actions are defined in the `RepositoryActionsV2.yaml` located in your `%APPDATA%\RepoM\` folder. More information can be found in the docs folder.
## Tagging
It is possible to dynamically assign tags to repositories such that you can filter, order, and search repositories using these tags.
-How to define and use tags is described in the [Tags](docs_new/Tags.md) documentation.
+How to define and use tags is described in the [Tags](docs/Tags.md) documentation.
## Search
It is possible to filter or search for repositories using the search box at the top of RepoM.
-See the [Search](docs_new/search.md) for more information.
+See the [Search](docs/search.md) for more information.
## Ordering and Filtering
-The order of the repositories shown in RepoM is customizable. The default is alphabetical on the repository name. Read more about ordering [here](docs/Ordering.md).
+The order of the repositories shown in RepoM is customizable. The default is alphabetical on the repository name. Read more about ordering [here](docs_old/Ordering.md).
-The repositories shown in RepoM are filtered using the search box in RepoM. But the default set can also be configured using different presets. [This page](docs/Filtering.md) describes how to create custom filter presets.
+The repositories shown in RepoM are filtered using the search box in RepoM. But the default set can also be configured using different presets. [This page](docs_old/Filtering.md) describes how to create custom filter presets.
## Global configuration
-When RepoM starts for the first time, a configuration file wil be created. Most of the properties can be adjusted using the UI but, at this moment, one property must be altered manually. Read more over [here](docs/Settings.md).
+When RepoM starts for the first time, a configuration file wil be created. Most of the properties can be adjusted using the UI but, at this moment, one property must be altered manually. Read more over [here](docs_old/Settings.md).
## Plugins
RepoM uses plugins to extend functionality. At this moment, when a plugin is available in the installed directory, it will be found and can be enabled or disabled. This is done in the hamburger menu of RepoM. Enabling or disabling requires a restart of RepoM.
- [Plugins](docs/Plugins.md)
- - [AzureDevOps](docs/RepoM.Plugin.AzureDevOps.md)
- - [Clipboard](docs/RepoM.Plugin.Clipboard.md)
- - [Heidi](docs/RepoM.Plugin.Heidi.md)
- - [LuceneQueryParser](docs/RepoM.Plugin.LuceneQueryParser.md)
- - [SonarCloud](docs/RepoM.Plugin.SonarCloud.md)
- - [Statistics](docs/RepoM.Plugin.Statistics.md)
- - [WebBrowser](docs/RepoM.Plugin.WebBrowser.md)
- - [WindowsExplorerGitInfo](docs/RepoM.Plugin.WindowsExplorerGitInfo.md)
+ - [AzureDevOps](docs/plugin_repom.plugin.azuredevops.generated.md)
+ - [Clipboard](docs/plugin_repom.plugin.clipboard.generated.md)
+ - [Heidi](docs/plugin_repom.plugin.heidi.generated.md)
+ - [LuceneQueryParser](docs/plugin_repom.plugin.lucenequeryparser.generated.md)
+ - [SonarCloud](docs/plugin_repom.plugin.sonarcloud.generated.md)
+ - [Statistics](docs/plugin_repom.plugin.statistics.generated.md)
+ - [WebBrowser](docs/plugin_repom.plugin.webbrowser.generated.md)
+ - [WindowsExplorerGitInfo](docs/plugin_repom.plugin.windowsexplorergitinfo.generated.md)
## Credits
diff --git a/README.source.md b/README.source.md
index 3687b7be..e8d7238b 100644
--- a/README.source.md
+++ b/README.source.md
@@ -14,6 +14,8 @@ It's populating itself as you work with git. It does not get in the way and only
RepoM will not compete with your favourite git clients, so keep them. It's not about working within a repository: It's a new way to use all of your repositories to make your daily work easier.
+If you recognise this introduction you might be right. RepoM is a fork of the popular [RepoZ](#credits).
+
## The Hub
The hub provides a quick overview of your repositories including their current branch, a short status information, and optionally some provided tags. Additionally, it offers some shortcuts like revealing a repository in the Windows Explorer, opening a command line tool in a given repository, checking out git branches and lots of other predefined or customizable actions.
@@ -40,41 +42,41 @@ The main functionality of RepoM are the quick actions to execute per repository.
To read more about the context menu, click here.
-These actions are defined in the `RepositoryActions.yaml` located in your `%APPDATA%\RepoM\` folder. More information can be found [here](docs/RepositoryActions.md).
+These actions are defined in the `RepositoryActionsV2.yaml` located in your `%APPDATA%\RepoM\` folder. More information can be found in the docs folder.
## Tagging
It is possible to dynamically assign tags to repositories such that you can filter, order, and search repositories using these tags.
-How to define and use tags is described in the [Tags](docs_new/Tags.md) documentation.
+How to define and use tags is described in the [Tags](docs/Tags.md) documentation.
## Search
It is possible to filter or search for repositories using the search box at the top of RepoM.
-See the [Search](docs_new/search.md) for more information.
+See the [Search](docs/search.md) for more information.
## Ordering and Filtering
-The order of the repositories shown in RepoM is customizable. The default is alphabetical on the repository name. Read more about ordering [here](docs/Ordering.md).
+The order of the repositories shown in RepoM is customizable. The default is alphabetical on the repository name. Read more about ordering [here](docs_old/Ordering.md).
-The repositories shown in RepoM are filtered using the search box in RepoM. But the default set can also be configured using different presets. [This page](docs/Filtering.md) describes how to create custom filter presets.
+The repositories shown in RepoM are filtered using the search box in RepoM. But the default set can also be configured using different presets. [This page](docs_old/Filtering.md) describes how to create custom filter presets.
## Global configuration
-When RepoM starts for the first time, a configuration file wil be created. Most of the properties can be adjusted using the UI but, at this moment, one property must be altered manually. Read more over [here](docs/Settings.md).
+When RepoM starts for the first time, a configuration file wil be created. Most of the properties can be adjusted using the UI but, at this moment, one property must be altered manually. Read more over [here](docs_old/Settings.md).
## Plugins
RepoM uses plugins to extend functionality. At this moment, when a plugin is available in the installed directory, it will be found and can be enabled or disabled. This is done in the hamburger menu of RepoM. Enabling or disabling requires a restart of RepoM.
- [Plugins](docs/Plugins.md)
- - [AzureDevOps](docs/RepoM.Plugin.AzureDevOps.md)
- - [Clipboard](docs/RepoM.Plugin.Clipboard.md)
- - [Heidi](docs/RepoM.Plugin.Heidi.md)
- - [LuceneQueryParser](docs/RepoM.Plugin.LuceneQueryParser.md)
- - [SonarCloud](docs/RepoM.Plugin.SonarCloud.md)
- - [Statistics](docs/RepoM.Plugin.Statistics.md)
- - [WebBrowser](docs/RepoM.Plugin.WebBrowser.md)
- - [WindowsExplorerGitInfo](docs/RepoM.Plugin.WindowsExplorerGitInfo.md)
+ - [AzureDevOps](docs/plugin_repom.plugin.azuredevops.generated.md)
+ - [Clipboard](docs/plugin_repom.plugin.clipboard.generated.md)
+ - [Heidi](docs/plugin_repom.plugin.heidi.generated.md)
+ - [LuceneQueryParser](docs/plugin_repom.plugin.lucenequeryparser.generated.md)
+ - [SonarCloud](docs/plugin_repom.plugin.sonarcloud.generated.md)
+ - [Statistics](docs/plugin_repom.plugin.statistics.generated.md)
+ - [WebBrowser](docs/plugin_repom.plugin.webbrowser.generated.md)
+ - [WindowsExplorerGitInfo](docs/plugin_repom.plugin.windowsexplorergitinfo.generated.md)
## Credits
diff --git a/docs_new/Context.md b/docs/Context.md
similarity index 100%
rename from docs_new/Context.md
rename to docs/Context.md
diff --git a/docs/RepoM.Plugin.AzureDevOps.md b/docs/RepoM.Plugin.AzureDevOps.md
deleted file mode 100644
index f5b66ca2..00000000
--- a/docs/RepoM.Plugin.AzureDevOps.md
+++ /dev/null
@@ -1,123 +0,0 @@
-# AzureDevOps
-
-The AzureDevops module enables integration with one azure devops environment. The integration currently focusses on Pull Requests.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "PersonalAccessToken": null,
- "BaseUrl": null
- }
-}
-```
-
-Properties:
-
-- `PersonalAccessToken`: Personal access token (PAT) to access Azure Devops. The PAT should be granted access to `todo` rights.
-To create a PAT, goto `https://dev.azure.com/[my-organisation]/_usersSettings/tokens`.
-- `BaseUrl`: The base url of azure devops for your organisation (ie. `https://dev.azure.com/[my-organisation]/`).
-
-## azure-devops-create-prs@1
-
-Action menu item to create a pull request in Azure Devops.
-
-Action specific properties:
-
-- `project-id`: The azure devops project id. (required, evaluated, string)
-- `title`: Menu item title. When not provided, a title will be generated.
-This property will be used instead of the Name property. (optional, string)
-- `pr-title`: Pull Request title. When not provided, the title will be defined based on the branch name.
-Title will be the last part of the branchname split on `/`, so `feature/123-testBranch` will result in title `123-testBranch` (optional, string)
-- `to-branch`: Name of the branch the pull request should be merged into. For instance `develop`, or `main`. (required, string)
-- `reviewer-ids`: List of reviewer ids. The id should be a valid Azure DevOps user id (ie. GUID). (optional, list`1)
-- `draft-pr`: Boolean specifying if th PR should be marked as draft. (required, boolean, default: `false`)
-- `include-work-items`: Boolean specifying if workitems should be included in the PR. The workitems will be found by using the commit messages. (required, boolean, default: `true`)
-- `open-in-browser`: Boolean specifying if the Pull request should be opened in the browser after creation. (required, boolean, default: `false`)
-- `auto-complete`: Auto complete options. Please take a look at the same for more information (required, repositoryactionazuredevopscreatepullrequestsautocompleteoptionsv1)
-
-Example:
-
-
-
-```yaml
-repository-actions:
- actions:
- # Create PR
- - type: azure-devops-create-prs@1
- project-id: ''
- to-branch: develop
- reviewer-ids:
- - "GUID"
-
- # Create PR with auto-complete enabled
- - type: azure-devops-create-prs@1
- project-id: ''
- to-branch: develop
- reviewer-ids:
- - "GUID"
- auto-complete:
- enabled: true
- merge-strategy: "Squash"
-
- # Create PR with all settings
- - type: azure-devops-create-prs@1
- project-id: ''
- title: 'Create PR'
- # When no pr-title provided it will be generated based on convention.
- # Title will be the last part of the branchname split on '/'.
- # For example: feature/testBranch will result in a PR title of 'testBranch'.
- pr-title: 'PR title'
- to-branch: develop
- reviewer-ids:
- - "GUID"
- draft-pr: true
- include-work-items: true
- open-in-browser: false
- auto-complete:
- enabled: true
- merge-strategy: "NoFastForward" # You can choose from: "NoFastForward", "Squash", "Rebase" and "RebaseMerge"
- deleteSource-branch: true
- transition-work-items: true
-```
-snippet source | anchor
-
-
-## azure-devops-get-prs@1
-
-This action results in zero or more items in the contextmenu. For each open pullrequest for the given repository, it will show an action to go to the specific PullRequest in your favorite webbrowser.
-
-Action specific properties:
-
-- `project-id`: The azure devops project id. (required, evaluated, string)
-- `repository-id`: The repository Id. If not provided, the repository id is located using the remote url. (optional, evaluated, string)
-- `show-when-empty`: When no pull requests are available, this property is used to determine if no or a message item is showed. (optional, evaluated, string, default: `true`)
-
-Example:
-
-
-
-```yaml
-repository-actions:
- actions:
- - type: azure-devops-get-prs@1
- active: true
- variables: []
- show-when-empty: true
- repository-id: ''
- project-id: ''
-
- - type: azure-devops-get-prs@1
- repository-id: ''
-```
-snippet source | anchor
-
-
diff --git a/docs/RepoM.Plugin.Clipboard.md b/docs/RepoM.Plugin.Clipboard.md
deleted file mode 100644
index b5aa54d6..00000000
--- a/docs/RepoM.Plugin.Clipboard.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Clipboard
-
-This module provides a repository actions to copy specific (evaluated) text to the clipboard using the action provider type `clipboard-copy`.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This module has no configuration.
-
-## clipboard-copy@1
-
-This action makes it possible to copy text to the clipboard.
-
-Action specific properties:
-
-- `text`: The text to copy to the clipboard. (required, evaluated, string)
-
-Example:
-
-
-
-```yaml
-repository-actions:
- actions:
- - type: clipboard-copy@1
- active: true
- variables: []
- name: Copy to clipboard
- text: ''
-
- - type: clipboard-copy@1
- name: Copy to clipboard
- text: ''
-```
-snippet source | anchor
-
-
diff --git a/docs/RepoM.Plugin.Heidi.md b/docs/RepoM.Plugin.Heidi.md
deleted file mode 100644
index fc212f7d..00000000
--- a/docs/RepoM.Plugin.Heidi.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Heidi
-
-This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file.
-This module monitors this file and provides an action menu and a variable provider to access this information.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "ConfigPath": null,
- "ConfigFilename": null,
- "ExecutableFilename": null
- }
-}
-```
-
-Properties:
-
-- `ConfigPath`: The full directory where the portable configuration file is stored.
-- `ConfigFilename`: The portable-configurration filename (without path). Most likely `portable_settings.txt`
-- `ExecutableFilename`: The full executable of Heidi.
-
-In order to let RepoM know what database configuration should be linked to what git repository the following should be added in the comment section when editing a database configuration in the Heidi's session manager.
-
-- `repo`: Selector of the git repository (required, string)
-- `name`: Name of the title in the RepoM menu (required, string)
-- `order`: Order of appearance in RepoM. This is only applicable when multiple databases are linked to the same repository (optional, integer, default `0`)
-
-Example:
-
-```text
-#repo:RepoM
-#name:"RepoM Test database"
-#order:31
-```
-
-
-
-
-## heidi-databases@1
-
-
-Action to list heidi databases and show action menus for them.
-
-Action specific properties:
-
-- `key`: Repository key.
-If not provided, the repository `Remote.Origin.Name` is used as selector. (optional, string)
-- `executable`: The absolute path of the Heidi executable. If not provided, the default value from the plugin settings is used. (optional, evaluated, string)
-
-Example:
-
-
-
-```yaml
-repository-actions:
- actions:
- - type: heidi-databases@1
- active: true
- variables: []
- name: Databases
- executable: ''
-
- - type: heidi-databases@1
- name: Databases
- executable: ''
-
- - type: heidi-databases@1
- name: Databases
-```
-snippet source | anchor
-
-
diff --git a/docs/RepoM.Plugin.SonarCloud.md b/docs/RepoM.Plugin.SonarCloud.md
deleted file mode 100644
index c3d49718..00000000
--- a/docs/RepoM.Plugin.SonarCloud.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# SonarCloud
-
-This module integrates with SonarCloud. Currently, the only functionality is to star a given repository in SonarCloud using the repository action.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "PersonalAccessToken": null,
- "BaseUrl": "https://sonarcloud.io"
- }
-}
-```
-
-Properties:
-
-- `PersonalAccessToken`: Personal Access Token to access SonarCloud.
-- `BaseUrl`: SonarCloud url. Most likely `https//sonarcloud.io`.
-
-## sonarcloud-set-favorite@1
-
-Action to mark a repository as favorite within SonarCloud.
-
-Action specific properties:
-
-- `project`: The SonarCloud project key. (required, evaluated, string)
-
-Example:
-
-
-
-```yaml
-repository-actions:
- actions:
- - type: sonarcloud-set-favorite@1
- active: true
- variables: []
- name: Star repository on SonarCloud
- project: ''
-
- - type: sonarcloud-set-favorite@1
- name: Star repository on SonarCloud
- project: ''
-```
-snippet source | anchor
-
-
diff --git a/docs/RepoM.Plugin.Statistics.md b/docs/RepoM.Plugin.Statistics.md
deleted file mode 100644
index 963d50fb..00000000
--- a/docs/RepoM.Plugin.Statistics.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Statistics
-
-This module add functionality to keep track of actions performed on repositories. This can be used in orderings (and mabye later on in filtering) of repositories.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "PersistenceBuffer": "00:05:00",
- "RetentionDays": 30
- }
-}
-```
-
-Properties:
-
-- `PersistenceBuffer`: Timespan for buffered events before making them persistant (i.e. `00:05:00` for five minutes). Must be greater then or equal to `00:00:10` (10 seconds).
-- `RetentionDays`: Number of days to keep statical information before deleting them.
diff --git a/docs/RepoM.Plugin.WebBrowser.md b/docs/RepoM.Plugin.WebBrowser.md
deleted file mode 100644
index ebd3c870..00000000
--- a/docs/RepoM.Plugin.WebBrowser.md
+++ /dev/null
@@ -1,85 +0,0 @@
-# WebBrowser
-
-The WebBrowser module provides a repository action to open an URL in a given webbrowser.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "Browsers": null,
- "Profiles": null
- }
-}
-```
-
-For example:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "Browsers": {
- "Edge": "C:\\PathTo\\msedge.exe",
- "FireFox": "C:\\PathTo\\Mozilla\\firefox.exe"
- },
- "Profiles": {
- "Work": {
- "BrowserName": "Edge",
- "CommandLineArguments": "\"--profile-directory=Profile 4\" {url}"
- },
- "Incognito": {
- "BrowserName": "Edge",
- "CommandLineArguments": "-inprivate"
- },
- "Incognito2": {
- "BrowserName": "FireFox",
- "CommandLineArguments": "-inprivate {url}"
- }
- }
- }
-}
-```
-
-Properties:
-
-- `Browsers`: Dictionary of known browsers and their path to use for opening urls.
-- `Profiles`: Profiles to use.
-
-## browser@1
-
-Action opening a webbrowser with the provided url.
-
-Action specific properties:
-
-- `url`: The url to browse to. (required, evaluated, string)
-- `profile`: profile name used to select browser and browser profile (optional, evaluated, string)
-
-Example:
-
-
-
-```yaml
-repository-actions:
- actions:
- - type: browser@1
- active: true
- variables: []
- name: My Github
- url: https://github.com/coenm
-
- - type: browser@1
- name: My Github
- url: https://github.com/coenm
- profile: edge
-```
-snippet source | anchor
-
-
diff --git a/docs/RepoM.Plugin.WindowsExplorerGitInfo.md b/docs/RepoM.Plugin.WindowsExplorerGitInfo.md
deleted file mode 100644
index f46d93d3..00000000
--- a/docs/RepoM.Plugin.WindowsExplorerGitInfo.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Enhanced Windows Explorer Titles
-
-As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
-
-
-
-Note that for Windows 11 users, the title will not be updated but in the taskbar the additional git information is still visible.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-## Configuration
-
-This module has no configuration.
diff --git a/docs/RepositoryActions.md b/docs/RepositoryActions.md
deleted file mode 100644
index 5d4dad16..00000000
--- a/docs/RepositoryActions.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Repository Actions
-
-Repository actions are described in a `yaml` file. Currently version 1 has the following sections.
-
-
-
-```yaml
-# file content version.
-version: 1
-
-# 'repository-specific-env-files' is an array and specifies loading specific environment files
-# loaded environment variables can be used in actions.
-repository-specific-env-files: []
-
-# 'variables' is an array.
-# variables can be refrerenced in actions.
-variables: []
-
-# Tags can be assigned to repositories based on predicates.
-repository-tags:
- variables: []
- tags: []
-
-# Repository actions which correspondent with the context menu of RepoM.
-repository-actions:
- variables: []
- actions: []
-```
-snippet source | anchor
-
-
-## Repository Specific Env Files
-
-In this section you can load custom environment (`.env`) files. These environment variables can be used within actions.
-This configuration will be evaluated and loaded every time the context menu of a repository opens. Using the `when` keyword, it is possible to only load environment files for specific repositories.
-
-
-
-```yaml
-# array of objects.
-repository-specific-env-files:
-
- # 'filename' is the filename to load environment variables from (required, string, evaluated).
-- filename: ''
-
- # 'when' is a predicate when to load the file (optional, string/boolean, evaluated).
- when: ''
-
-- filename: ''
- when: ''
-- filename: ''
- when: ''
-```
-snippet source | anchor
-
-
-## Variables
-
-Defined variables can be referenced within actions using the variable prefix `var.`. Other variable providers are available within RepoM and are explained over here.
-It is possible to define variables at multiple levels (ie scopes). This is the top level of defining variables.
-
-
-```
-** Could not find snippet 'RepositoryActionsV1RepositoryVariablesYaml' **
-```
-
-
-## Repository Tags
-
-This section can be used to assign tags to repositories. These tags can be used to filter, order or search repositories.
-
-
-
-```yaml
-# array of objects.
-repository-tags:
- # variable section for tags and has the same structure as the global variable section (optional, default empty)
- variables:
-
- tags:
-
- # 'tag' is the name of the tag (required, string, no-spaces).
- - tag: ''
-
- # 'when' is a predicate when to assign the tag to a repository (optional, string/boolean, evaluated, default true).
- when: ''
-
- - tag: ''
- when: ''
- - tag: ''
- when: ''
-```
-snippet source | anchor
-
-
-## Repository Actions
-
-This section describes the whole context menu of the repository. Within the `repository-actions` it is possible to define variables at multiple levels. The `actions` subsection contains all the actions.
-Actions can be enabled or disabled based on all kind of conditions. RepoM comes with a number of actions but it is also possible to load plugins containg specific actions.
-
-
-
-```yaml
-repository-actions:
-
- # variable section for all actions (optional, default empty)
- variables: []
-
- # array of actions
- actions:
-
- # action type, each type has its own set of properties (required, string, non-evaluated).
- - type: ''
-
- # predicate whether or not to display this action (optional, boolean/string, evaluted, default true)
- active: ''
-
- # variable section for specific action (optional, default empty)
- variables: []
-```
-snippet source | anchor
-
-
-A list of currently supported actions can be found [here](ActionList.md).
diff --git a/docs_new/Tags.md b/docs/Tags.md
similarity index 100%
rename from docs_new/Tags.md
rename to docs/Tags.md
diff --git a/docs/mdsource/Plugins.source.md b/docs/mdsource/Plugins.source.md
deleted file mode 100644
index 80dde618..00000000
--- a/docs/mdsource/Plugins.source.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Plugins
-
-To use a module (plugin), make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'.
-
-
-
-You have to restart RepoM when enabling or disabling a plugin.
-
-## Plugin configuration
-
-Some plugins require specific configuration to run correctly.
-Plugins are responsible for creating specific plugin configuration files which can be edited manually. These configuration files are placed in the placed in the `%APPDATA%/RepoM/Module/` directory and each plugin has its own file.
-
-When changing a file, a reboot of RepoM is most likely required.
-
-## Plugin installation
-
-Currently, all plugins sources are within the RepoM repository and there is no documented solution for writing and maintaining your own (private) plugins. This might chnage in the future.
diff --git a/docs/mdsource/RepoM.Plugin.AzureDevOps.source.md.old b/docs/mdsource/RepoM.Plugin.AzureDevOps.source.md.old
deleted file mode 100644
index 08e5665e..00000000
--- a/docs/mdsource/RepoM.Plugin.AzureDevOps.source.md.old
+++ /dev/null
@@ -1,9 +0,0 @@
-# AzureDevOps
-
-The AzureDevops module enables integration with one azure devops environment. The integration currently focusses on Pull Requests.
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage#desc.verified.md
-
-include: _plugins.azuredevops.action
diff --git a/docs/mdsource/RepoM.Plugin.Clipboard.source.md.old b/docs/mdsource/RepoM.Plugin.Clipboard.source.md.old
deleted file mode 100644
index 9f2c627d..00000000
--- a/docs/mdsource/RepoM.Plugin.Clipboard.source.md.old
+++ /dev/null
@@ -1,9 +0,0 @@
-# Clipboard
-
-This module provides a repository actions to copy specific (evaluated) text to the clipboard using the action provider type `clipboard-copy`.
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage#desc.verified.md
-
-include: _plugins.clipboard.action
diff --git a/docs/mdsource/RepoM.Plugin.SonarCloud.source.md.old b/docs/mdsource/RepoM.Plugin.SonarCloud.source.md.old
deleted file mode 100644
index af300d69..00000000
--- a/docs/mdsource/RepoM.Plugin.SonarCloud.source.md.old
+++ /dev/null
@@ -1,9 +0,0 @@
-# SonarCloud
-
-This module integrates with SonarCloud. Currently, the only functionality is to star a given repository in SonarCloud using the repository action.
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage#desc.verified.md
-
-include: _plugins.sonarcloud.action
diff --git a/docs/mdsource/RepoM.Plugin.Statistics.source.md b/docs/mdsource/RepoM.Plugin.Statistics.source.md
deleted file mode 100644
index d60b470b..00000000
--- a/docs/mdsource/RepoM.Plugin.Statistics.source.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Statistics
-
-This module add functionality to keep track of actions performed on repositories. This can be used in orderings (and mabye later on in filtering) of repositories.
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage#desc.verified.md
diff --git a/docs/mdsource/RepoM.Plugin.WebBrowser.source.md.old b/docs/mdsource/RepoM.Plugin.WebBrowser.source.md.old
deleted file mode 100644
index 94d655ac..00000000
--- a/docs/mdsource/RepoM.Plugin.WebBrowser.source.md.old
+++ /dev/null
@@ -1,9 +0,0 @@
-# WebBrowser
-
-The WebBrowser module provides a repository action to open an URL in a given webbrowser.
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage#desc.verified.md
-
-include: _plugins.webbrowser.action
diff --git a/docs/mdsource/RepositoryActions.source.md.old b/docs/mdsource/RepositoryActions.source.md.old
deleted file mode 100644
index b4c288f0..00000000
--- a/docs/mdsource/RepositoryActions.source.md.old
+++ /dev/null
@@ -1,34 +0,0 @@
-# Repository Actions
-
-Repository actions are described in a `yaml` file. Currently version 1 has the following sections.
-
-snippet: RepositoryActionsV1Yaml
-
-## Repository Specific Env Files
-
-In this section you can load custom environment (`.env`) files. These environment variables can be used within actions.
-This configuration will be evaluated and loaded every time the context menu of a repository opens. Using the `when` keyword, it is possible to only load environment files for specific repositories.
-
-snippet: RepositoryActionsV1RepositorySpecificEnvFilesYaml
-
-## Variables
-
-Defined variables can be referenced within actions using the variable prefix `var.`. Other variable providers are available within RepoM and are explained over here.
-It is possible to define variables at multiple levels (ie scopes). This is the top level of defining variables.
-
-snippet: RepositoryActionsV1RepositoryVariablesYaml
-
-## Repository Tags
-
-This section can be used to assign tags to repositories. These tags can be used to filter, order or search repositories.
-
-snippet: RepositoryActionsV1RepositoryTagsYaml
-
-## Repository Actions
-
-This section describes the whole context menu of the repository. Within the `repository-actions` it is possible to define variables at multiple levels. The `actions` subsection contains all the actions.
-Actions can be enabled or disabled based on all kind of conditions. RepoM comes with a number of actions but it is also possible to load plugins containg specific actions.
-
-snippet: RepositoryActions01Base
-
-A list of currently supported actions can be found [here](ActionList.md).
diff --git a/docs/mdsource/_plugins.azuredevops.action.include.md b/docs/mdsource/_plugins.azuredevops.action.include.md
deleted file mode 100644
index e5b237ce..00000000
--- a/docs/mdsource/_plugins.azuredevops.action.include.md
+++ /dev/null
@@ -1,15 +0,0 @@
-## azure-devops-create-prs@1
-
-include: DocsRepositoryActionsTests.DocsRepositoryActionsSettings_RepositoryActionAzureDevOpsCreatePullRequestsV1.verified.md
-
-Example:
-
-snippet: RepositoryActionsAzureDevopsCreatePrs01
-
-## azure-devops-get-prs@1
-
-include: DocsRepositoryActionsTests.DocsRepositoryActionsSettings_RepositoryActionAzureDevOpsGetPullRequestsV1.verified.md
-
-Example:
-
-snippet: RepositoryActionsAzureDevopsGetPrs01
diff --git a/docs/mdsource/_plugins.clipboard.action.include.md b/docs/mdsource/_plugins.clipboard.action.include.md
deleted file mode 100644
index 4d887da0..00000000
--- a/docs/mdsource/_plugins.clipboard.action.include.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## clipboard-copy@1
-
-include: DocsRepositoryActionsTests.DocsRepositoryActionsSettings_RepositoryActionClipboardCopyV1.verified.md
-
-Example:
-
-snippet: RepositoryActionsClipboardCopy01
diff --git a/docs/mdsource/_plugins.heidi.action.include.md b/docs/mdsource/_plugins.heidi.action.include.md
deleted file mode 100644
index 7b4cde96..00000000
--- a/docs/mdsource/_plugins.heidi.action.include.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## heidi-databases@1
-
-
-include: DocsRepositoryActionsTests.DocsRepositoryActionsSettings_RepositoryActionHeidiDatabasesV1.verified.md
-
-Example:
-
-snippet: RepositoryActionsHeidiDatabases01
diff --git a/docs/mdsource/_plugins.sonarcloud.action.include.md b/docs/mdsource/_plugins.sonarcloud.action.include.md
deleted file mode 100644
index 931f0511..00000000
--- a/docs/mdsource/_plugins.sonarcloud.action.include.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## sonarcloud-set-favorite@1
-
-include: DocsRepositoryActionsTests.DocsRepositoryActionsSettings_RepositoryActionSonarCloudSetFavoriteV1.verified.md
-
-Example:
-
-snippet: RepositoryActionsSonarCloudSetFavorite01
diff --git a/docs/mdsource/_plugins.webbrowser.action.include.md b/docs/mdsource/_plugins.webbrowser.action.include.md
deleted file mode 100644
index 1fa7e570..00000000
--- a/docs/mdsource/_plugins.webbrowser.action.include.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## browser@1
-
-include: DocsRepositoryActionsTests.DocsRepositoryActionsSettings_RepositoryActionBrowserV1.verified.md
-
-Example:
-
-snippet: RepositoryActionsBrowser01
\ No newline at end of file
diff --git a/docs_new/mdsource/plugin_repom.plugin.azuredevops.generated.source.md b/docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md
similarity index 71%
rename from docs_new/mdsource/plugin_repom.plugin.azuredevops.generated.source.md
rename to docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md
index 7e3578ef..4c6e9235 100644
--- a/docs_new/mdsource/plugin_repom.plugin.azuredevops.generated.source.md
+++ b/docs/mdsource/plugin_repom.plugin.azuredevops.generated.source.md
@@ -2,12 +2,29 @@
The AzureDevops module enables integration with one azure devops environment. The integration currently focuses on Pull Requests.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.AzureDevOps
-- PluginName: AzureDevOps
-- PluginDescription: Integration with Azure Devops providing fetching and creating pull requests.
-- PluginMarkdownDescription: The AzureDevops module enables integration with one azure devops environment. The integration currently focuses on Pull Requests.
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "PersonalAccessToken": null,
+ "BaseUrl": null
+ }
+}
+```
+
+### Properties
+
+- `PersonalAccessToken`: Personal access token (PAT) to access Azure Devops. The PAT should be granted access to read and write pull requests.
+To create a PAT, goto `https://dev.azure.com/[my-organisation]/_usersSettings/tokens`.
+- `BaseUrl`: The base url of azure devops for your organisation (i.e. `https://dev.azure.com/[my-organisation]/`).
This module contains the following methods, variables and/or constants:
diff --git a/docs_new/mdsource/plugin_repom.plugin.clipboard.generated.source.md b/docs/mdsource/plugin_repom.plugin.clipboard.generated.source.md
similarity index 68%
rename from docs_new/mdsource/plugin_repom.plugin.clipboard.generated.source.md
rename to docs/mdsource/plugin_repom.plugin.clipboard.generated.source.md
index a1b5a67c..f6011305 100644
--- a/docs_new/mdsource/plugin_repom.plugin.clipboard.generated.source.md
+++ b/docs/mdsource/plugin_repom.plugin.clipboard.generated.source.md
@@ -2,12 +2,11 @@
This module provides a repository actions to copy specific (evaluated) text to the clipboard using the action provider type `clipboard-copy`.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.Clipboard
-- PluginName: Clipboard
-- PluginDescription: Provides a 'copy to clipboard' action.
-- PluginMarkdownDescription: This module provides a repository actions to copy specific (evaluated) text to the clipboard using the action provider type `clipboard-copy`.
+## Configuration
+
+This plugin has no configuration.
This module contains the following methods, variables and/or constants:
diff --git a/docs/mdsource/RepoM.Plugin.Heidi.source.md.old b/docs/mdsource/plugin_repom.plugin.heidi.30.md
similarity index 56%
rename from docs/mdsource/RepoM.Plugin.Heidi.source.md.old
rename to docs/mdsource/plugin_repom.plugin.heidi.30.md
index 547cb94e..cdc3e878 100644
--- a/docs/mdsource/RepoM.Plugin.Heidi.source.md.old
+++ b/docs/mdsource/plugin_repom.plugin.heidi.30.md
@@ -1,11 +1,3 @@
-# Heidi
-
-This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file.
-This module monitors this file and provides an action menu and a variable provider to access this information.
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage#desc.verified.md
In order to let RepoM know what database configuration should be linked to what git repository the following should be added in the comment section when editing a database configuration in the Heidi's session manager.
@@ -22,6 +14,4 @@ Example:
```

-
-
-include: _plugins.heidi.action
+
\ No newline at end of file
diff --git a/docs/mdsource/plugin_repom.plugin.heidi.generated.source.md b/docs/mdsource/plugin_repom.plugin.heidi.generated.source.md
new file mode 100644
index 00000000..8de43793
--- /dev/null
+++ b/docs/mdsource/plugin_repom.plugin.heidi.generated.source.md
@@ -0,0 +1,58 @@
+# HeidiSQL
+
+This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file. This module monitors this file and makes it possible to use this configuration in the action menu.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "ConfigPath": null,
+ "ConfigFilename": null,
+ "ExecutableFilename": null
+ }
+}
+```
+
+Example configuration:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "ConfigPath": "C:\\StandAloneProgramFiles\\HeidiSQL_12.3_64_Portable",
+ "ConfigFilename": "portable_settings.txt",
+ "ExecutableFilename": "C:\\StandAloneProgramFiles\\HeidiSQL_12.3_64_Portable\\heidisql.exe"
+ }
+}
+```
+
+### Properties
+
+- `ConfigPath`: The full directory where the portable configuration file is stored.
+- `ConfigFilename`: The portable-configurration filename (without path). Most likely `portable_settings.txt`
+- `ExecutableFilename`: The full executable of Heidi.
+
+In order to let RepoM know what database configuration should be linked to what git repository the following should be added in the comment section when editing a database configuration in the Heidi's session manager.
+
+- `repo`: Selector of the git repository (required, string)
+- `name`: Name of the title in the RepoM menu (required, string)
+- `order`: Order of appearance in RepoM. This is only applicable when multiple databases are linked to the same repository (optional, integer, default `0`)
+
+Example:
+
+```text
+#repo:RepoM
+#name:"RepoM Test database"
+#order:31
+```
+
+
+
diff --git a/docs/mdsource/RepoM.Plugin.LuceneQueryParser.source.md b/docs/mdsource/plugin_repom.plugin.lucenequeryparser.99.md
similarity index 95%
rename from docs/mdsource/RepoM.Plugin.LuceneQueryParser.source.md
rename to docs/mdsource/plugin_repom.plugin.lucenequeryparser.99.md
index 9eba82e6..9e20344e 100644
--- a/docs/mdsource/RepoM.Plugin.LuceneQueryParser.source.md
+++ b/docs/mdsource/plugin_repom.plugin.lucenequeryparser.99.md
@@ -1,9 +1,3 @@
-# Lucene Query Parser
-
-include: _plugin_enable
-
-include: DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage#desc.verified.md
-
To search for repositories, you can use a repom-dialect of Lucene query syntax.
> ## Terms
diff --git a/docs/RepoM.Plugin.LuceneQueryParser.md b/docs/mdsource/plugin_repom.plugin.lucenequeryparser.generated.source.md
similarity index 89%
rename from docs/RepoM.Plugin.LuceneQueryParser.md
rename to docs/mdsource/plugin_repom.plugin.lucenequeryparser.generated.source.md
index 56713f43..7ec31c38 100644
--- a/docs/RepoM.Plugin.LuceneQueryParser.md
+++ b/docs/mdsource/plugin_repom.plugin.lucenequeryparser.generated.source.md
@@ -1,10 +1,12 @@
-# Lucene Query Parser
+# LuceneQueryParser
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+Contains a custom query parser based on Lucene syntax for repository filtering.
-## Configuration
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-This module has no configuration.
+## Configuration
+
+This plugin has no configuration.
To search for repositories, you can use a repom-dialect of Lucene query syntax.
diff --git a/docs_new/mdsource/plugin_repom.plugin.sonarcloud.generated.source.md b/docs/mdsource/plugin_repom.plugin.sonarcloud.generated.source.md
similarity index 56%
rename from docs_new/mdsource/plugin_repom.plugin.sonarcloud.generated.source.md
rename to docs/mdsource/plugin_repom.plugin.sonarcloud.generated.source.md
index 70c3136d..a2162374 100644
--- a/docs_new/mdsource/plugin_repom.plugin.sonarcloud.generated.source.md
+++ b/docs/mdsource/plugin_repom.plugin.sonarcloud.generated.source.md
@@ -2,12 +2,28 @@
This module integrates with SonarCloud. Currently, the only functionality is to star a given repository in SonarCloud using the repository action.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.SonarCloud
-- PluginName: SonarCloud
-- PluginDescription: Providing a repository action to mark a repository as favorite in SonarCloud
-- PluginMarkdownDescription: This module integrates with SonarCloud. Currently, the only functionality is to star a given repository in SonarCloud using the repository action.
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "PersonalAccessToken": null,
+ "BaseUrl": "https://sonarcloud.io"
+ }
+}
+```
+
+### Properties
+
+- `PersonalAccessToken`: Personal Access Token to access SonarCloud.
+- `BaseUrl`: SonarCloud url. Most likely `https//sonarcloud.io`.
This module contains the following methods, variables and/or constants:
diff --git a/docs/mdsource/plugin_repom.plugin.statistics.generated.source.md b/docs/mdsource/plugin_repom.plugin.statistics.generated.source.md
new file mode 100644
index 00000000..d01db527
--- /dev/null
+++ b/docs/mdsource/plugin_repom.plugin.statistics.generated.source.md
@@ -0,0 +1,27 @@
+# Statistics
+
+Provides functionality to keep track how may times an action is performed on a given repository. These numbers can be accessed using variable providers. The plugin also contains functionality to use these statistics in orderings.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "PersistenceBuffer": "00:05:00",
+ "RetentionDays": 30
+ }
+}
+```
+
+### Properties
+
+- `PersistenceBuffer`: Timespan for buffered events before making them persistant (i.e. `00:05:00` for five minutes). Must be greater then or equal to `00:00:10` (10 seconds).
+- `RetentionDays`: Number of days to keep statical information before deleting them.
+
diff --git a/docs/mdsource/plugin_repom.plugin.webbrowser.generated.source.md b/docs/mdsource/plugin_repom.plugin.webbrowser.generated.source.md
new file mode 100644
index 00000000..56fd1c9c
--- /dev/null
+++ b/docs/mdsource/plugin_repom.plugin.webbrowser.generated.source.md
@@ -0,0 +1,73 @@
+# WebBrowser
+
+Provides functionality to start a web browser from an action with profile information.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "Browsers": null,
+ "Profiles": null
+ }
+}
+```
+
+Example configuration:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "Browsers": {
+ "Edge": "C:\\PathTo\\msedge.exe",
+ "FireFox": "C:\\PathTo\\Mozilla\\firefox.exe"
+ },
+ "Profiles": {
+ "Work": {
+ "BrowserName": "Edge",
+ "CommandLineArguments": "\"--profile-directory=Profile 4\" {url}"
+ },
+ "Incognito": {
+ "BrowserName": "Edge",
+ "CommandLineArguments": "-inprivate"
+ },
+ "Incognito2": {
+ "BrowserName": "FireFox",
+ "CommandLineArguments": "-inprivate {url}"
+ }
+ }
+ }
+}
+```
+
+### Properties
+
+- `Browsers`: Dictionary of known browsers and their path to use for opening urls.
+- `Profiles`: Profiles to use.
+
+This module contains the following methods, variables and/or constants:
+
+## browser@1
+
+Action opening a webbrowser with the provided url.
+
+Properties:
+
+- `name`: Name of the menu item. ([Text](repository_action_types.md#text))
+- `url`: The url to browse to. ([Text](repository_action_types.md#text))
+- `profile`: profile name used to select browser and browser profile ([Text](repository_action_types.md#text))
+- `context`: The context in which the action is available. ([Context](repository_action_types.md#context))
+- `active`: Whether the menu item is enabled. ([Predicate](repository_action_types.md#predicate))
+
+### Example
+
+snippet: webbrowser-browser@1-scenario01
+
diff --git a/docs/mdsource/plugin_repom.plugin.windowsexplorergitinfo.99.md b/docs/mdsource/plugin_repom.plugin.windowsexplorergitinfo.99.md
new file mode 100644
index 00000000..ccec6597
--- /dev/null
+++ b/docs/mdsource/plugin_repom.plugin.windowsexplorergitinfo.99.md
@@ -0,0 +1,3 @@
+
+
+Note that for Windows 11 users, the title will not be updated but in the taskbar the additional git information is still visible.
\ No newline at end of file
diff --git a/docs/mdsource/plugin_repom.plugin.windowsexplorergitinfo.generated.source.md b/docs/mdsource/plugin_repom.plugin.windowsexplorergitinfo.generated.source.md
new file mode 100644
index 00000000..ef970ea3
--- /dev/null
+++ b/docs/mdsource/plugin_repom.plugin.windowsexplorergitinfo.generated.source.md
@@ -0,0 +1,13 @@
+# WindowsExplorerTitle
+
+As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has no configuration.
+
+
+
+Note that for Windows 11 users, the title will not be updated but in the taskbar the additional git information is still visible.
\ No newline at end of file
diff --git a/docs_new/mdsource/repom.generated.source.md b/docs/mdsource/repom.generated.source.md
similarity index 99%
rename from docs_new/mdsource/repom.generated.source.md
rename to docs/mdsource/repom.generated.source.md
index ad0cc65b..f4e9160b 100644
--- a/docs_new/mdsource/repom.generated.source.md
+++ b/docs/mdsource/repom.generated.source.md
@@ -1,5 +1,9 @@
# RepoM Core Repository Actions
+## Configuration
+
+This plugin has no configuration.
+
This module contains the following methods, variables and/or constants:
## browse-repository@1
diff --git a/docs_new/mdsource/repository_action_types.md b/docs/mdsource/repository_action_types.md
similarity index 100%
rename from docs_new/mdsource/repository_action_types.md
rename to docs/mdsource/repository_action_types.md
diff --git a/docs_new/mdsource/repository_action_types.source.md b/docs/mdsource/repository_action_types.source.md
similarity index 100%
rename from docs_new/mdsource/repository_action_types.source.md
rename to docs/mdsource/repository_action_types.source.md
diff --git a/docs_new/mdsource/script_variables_azure_devops.generated.source.md b/docs/mdsource/script_variables_azure_devops.generated.source.md
similarity index 100%
rename from docs_new/mdsource/script_variables_azure_devops.generated.source.md
rename to docs/mdsource/script_variables_azure_devops.generated.source.md
diff --git a/docs_new/mdsource/script_variables_file.generated.source.md b/docs/mdsource/script_variables_file.generated.source.md
similarity index 100%
rename from docs_new/mdsource/script_variables_file.generated.source.md
rename to docs/mdsource/script_variables_file.generated.source.md
diff --git a/docs_new/mdsource/script_variables_heidi.generated.source.md b/docs/mdsource/script_variables_heidi.generated.source.md
similarity index 100%
rename from docs_new/mdsource/script_variables_heidi.generated.source.md
rename to docs/mdsource/script_variables_heidi.generated.source.md
diff --git a/docs_new/mdsource/script_variables_repository.generated.source.md b/docs/mdsource/script_variables_repository.generated.source.md
similarity index 100%
rename from docs_new/mdsource/script_variables_repository.generated.source.md
rename to docs/mdsource/script_variables_repository.generated.source.md
diff --git a/docs_new/mdsource/script_variables_sonarcloud.generated.source.md b/docs/mdsource/script_variables_sonarcloud.generated.source.md
similarity index 100%
rename from docs_new/mdsource/script_variables_sonarcloud.generated.source.md
rename to docs/mdsource/script_variables_sonarcloud.generated.source.md
diff --git a/docs_new/mdsource/script_variables_statistics.generated.source.md b/docs/mdsource/script_variables_statistics.generated.source.md
similarity index 100%
rename from docs_new/mdsource/script_variables_statistics.generated.source.md
rename to docs/mdsource/script_variables_statistics.generated.source.md
diff --git a/docs_new/plugin_repom.plugin.azuredevops.generated.md b/docs/plugin_repom.plugin.azuredevops.generated.md
similarity index 83%
rename from docs_new/plugin_repom.plugin.azuredevops.generated.md
rename to docs/plugin_repom.plugin.azuredevops.generated.md
index 5192725a..677e29d4 100644
--- a/docs_new/plugin_repom.plugin.azuredevops.generated.md
+++ b/docs/plugin_repom.plugin.azuredevops.generated.md
@@ -2,12 +2,29 @@
The AzureDevops module enables integration with one azure devops environment. The integration currently focuses on Pull Requests.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.AzureDevOps
-- PluginName: AzureDevOps
-- PluginDescription: Integration with Azure Devops providing fetching and creating pull requests.
-- PluginMarkdownDescription: The AzureDevops module enables integration with one azure devops environment. The integration currently focuses on Pull Requests.
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "PersonalAccessToken": null,
+ "BaseUrl": null
+ }
+}
+```
+
+### Properties
+
+- `PersonalAccessToken`: Personal access token (PAT) to access Azure Devops. The PAT should be granted access to read and write pull requests.
+To create a PAT, goto `https://dev.azure.com/[my-organisation]/_usersSettings/tokens`.
+- `BaseUrl`: The base url of azure devops for your organisation (i.e. `https://dev.azure.com/[my-organisation]/`).
This module contains the following methods, variables and/or constants:
diff --git a/docs_new/plugin_repom.plugin.clipboard.generated.md b/docs/plugin_repom.plugin.clipboard.generated.md
similarity index 82%
rename from docs_new/plugin_repom.plugin.clipboard.generated.md
rename to docs/plugin_repom.plugin.clipboard.generated.md
index a8317675..bc8c8cce 100644
--- a/docs_new/plugin_repom.plugin.clipboard.generated.md
+++ b/docs/plugin_repom.plugin.clipboard.generated.md
@@ -2,12 +2,11 @@
This module provides a repository actions to copy specific (evaluated) text to the clipboard using the action provider type `clipboard-copy`.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.Clipboard
-- PluginName: Clipboard
-- PluginDescription: Provides a 'copy to clipboard' action.
-- PluginMarkdownDescription: This module provides a repository actions to copy specific (evaluated) text to the clipboard using the action provider type `clipboard-copy`.
+## Configuration
+
+This plugin has no configuration.
This module contains the following methods, variables and/or constants:
diff --git a/docs/plugin_repom.plugin.heidi.generated.md b/docs/plugin_repom.plugin.heidi.generated.md
new file mode 100644
index 00000000..8de43793
--- /dev/null
+++ b/docs/plugin_repom.plugin.heidi.generated.md
@@ -0,0 +1,58 @@
+# HeidiSQL
+
+This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file. This module monitors this file and makes it possible to use this configuration in the action menu.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "ConfigPath": null,
+ "ConfigFilename": null,
+ "ExecutableFilename": null
+ }
+}
+```
+
+Example configuration:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "ConfigPath": "C:\\StandAloneProgramFiles\\HeidiSQL_12.3_64_Portable",
+ "ConfigFilename": "portable_settings.txt",
+ "ExecutableFilename": "C:\\StandAloneProgramFiles\\HeidiSQL_12.3_64_Portable\\heidisql.exe"
+ }
+}
+```
+
+### Properties
+
+- `ConfigPath`: The full directory where the portable configuration file is stored.
+- `ConfigFilename`: The portable-configurration filename (without path). Most likely `portable_settings.txt`
+- `ExecutableFilename`: The full executable of Heidi.
+
+In order to let RepoM know what database configuration should be linked to what git repository the following should be added in the comment section when editing a database configuration in the Heidi's session manager.
+
+- `repo`: Selector of the git repository (required, string)
+- `name`: Name of the title in the RepoM menu (required, string)
+- `order`: Order of appearance in RepoM. This is only applicable when multiple databases are linked to the same repository (optional, integer, default `0`)
+
+Example:
+
+```text
+#repo:RepoM
+#name:"RepoM Test database"
+#order:31
+```
+
+
+
diff --git a/docs/plugin_repom.plugin.lucenequeryparser.generated.md b/docs/plugin_repom.plugin.lucenequeryparser.generated.md
new file mode 100644
index 00000000..7ec31c38
--- /dev/null
+++ b/docs/plugin_repom.plugin.lucenequeryparser.generated.md
@@ -0,0 +1,80 @@
+# LuceneQueryParser
+
+Contains a custom query parser based on Lucene syntax for repository filtering.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has no configuration.
+
+To search for repositories, you can use a repom-dialect of Lucene query syntax.
+
+> ## Terms
+>
+> A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.
+>
+> A Single Term is a single word such as "test" or "hello".
+>
+> A Phrase is a group of words surrounded by double quotes such as "hello dolly".
+>
+> Multiple terms can be combined together with Boolean operators to form a more complex query.
+>
+> ## Fields
+>
+> Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.
+>
+> You can search any field by typing the field name followed by a colon `:` and then the term you are looking for.
+>
+> As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:
+>
+> `title:"The Right Way" AND text:go`
+>
+> or
+>
+> `title:"Do it right" AND right`
+>
+> Since text is the default field, the field indicator is not required.
+>
+> Note: The field is only valid for the term that it directly precedes, so the query
+>
+> `title:Do it right`
+>
+> Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).
+>
+> Note: The analyzer used to create the index will be used on the terms and phrases in the query string. So it is important to choose an analyzer that will not interfere with the terms used in the query string.
+>
+> ## Boolean Operators
+>
+> Boolean operators allow terms to be combined through logic operators. Lucene supports `AND`, `OR`, and `NOT` as Boolean operators (Note: Boolean operators must be ALL CAPS).
+>
+>The `AND` operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the `AND` operator is used.
+>
+> ### AND operator
+>
+> The `AND` operator links two terms and finds repositories when both terms are a match. I.e. `x AND y`. It is also possible to use `&&`.
+>
+> ### OR operator
+>
+> The `OR` operator finds repositories if either of the terms matches in a repository.
+>
+> To search for repositories that match either "x1 x2" or just "x3" use the query:
+>
+> `"x1 x2" OR x3`. You can also use `||` instead of `OR`.
+>
+> ### NOT operator
+>
+> The `NOT` operator excludes respositories that matches the term after NOT. You can also use `!` or `-`. For example, `NOT RepoM` finds all repositories except the ones that matches "RepoM". The same holds for `-RepoM` or `!RepoM`.
+>
+> ## Grouping
+>
+> Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.
+>
+> To search for either "jakarta" or "apache" and "website" use the query: `(jakarta OR apache) AND website`.
+>
+> ## Escaping Special Characters
+>
+> Lucene supports escaping special characters that are part of the query syntax. The current list special characters are `+ - && || ! ( ) { } [ ] ^ " ~ * ? : \`.
+>
+>To escape these character use the `\` before the character. For example to search for "(1+1):2" use the query: `\(1\+1\)\:2`
+>
diff --git a/docs_new/plugin_repom.plugin.sonarcloud.generated.md b/docs/plugin_repom.plugin.sonarcloud.generated.md
similarity index 68%
rename from docs_new/plugin_repom.plugin.sonarcloud.generated.md
rename to docs/plugin_repom.plugin.sonarcloud.generated.md
index 05662ce6..60af6442 100644
--- a/docs_new/plugin_repom.plugin.sonarcloud.generated.md
+++ b/docs/plugin_repom.plugin.sonarcloud.generated.md
@@ -2,12 +2,28 @@
This module integrates with SonarCloud. Currently, the only functionality is to star a given repository in SonarCloud using the repository action.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.SonarCloud
-- PluginName: SonarCloud
-- PluginDescription: Providing a repository action to mark a repository as favorite in SonarCloud
-- PluginMarkdownDescription: This module integrates with SonarCloud. Currently, the only functionality is to star a given repository in SonarCloud using the repository action.
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "PersonalAccessToken": null,
+ "BaseUrl": "https://sonarcloud.io"
+ }
+}
+```
+
+### Properties
+
+- `PersonalAccessToken`: Personal Access Token to access SonarCloud.
+- `BaseUrl`: SonarCloud url. Most likely `https//sonarcloud.io`.
This module contains the following methods, variables and/or constants:
diff --git a/docs/plugin_repom.plugin.statistics.generated.md b/docs/plugin_repom.plugin.statistics.generated.md
new file mode 100644
index 00000000..d01db527
--- /dev/null
+++ b/docs/plugin_repom.plugin.statistics.generated.md
@@ -0,0 +1,27 @@
+# Statistics
+
+Provides functionality to keep track how may times an action is performed on a given repository. These numbers can be accessed using variable providers. The plugin also contains functionality to use these statistics in orderings.
+
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "PersistenceBuffer": "00:05:00",
+ "RetentionDays": 30
+ }
+}
+```
+
+### Properties
+
+- `PersistenceBuffer`: Timespan for buffered events before making them persistant (i.e. `00:05:00` for five minutes). Must be greater then or equal to `00:00:10` (10 seconds).
+- `RetentionDays`: Number of days to keep statical information before deleting them.
+
diff --git a/docs_new/plugin_repom.plugin.webbrowser.generated.md b/docs/plugin_repom.plugin.webbrowser.generated.md
similarity index 53%
rename from docs_new/plugin_repom.plugin.webbrowser.generated.md
rename to docs/plugin_repom.plugin.webbrowser.generated.md
index 0da84f58..3e76ff46 100644
--- a/docs_new/plugin_repom.plugin.webbrowser.generated.md
+++ b/docs/plugin_repom.plugin.webbrowser.generated.md
@@ -2,12 +2,56 @@
Provides functionality to start a web browser from an action with profile information.
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-- ProjectName: RepoM.Plugin.WebBrowser
-- PluginName: WebBrowser
-- PluginDescription: Provides functionality to start a web browser from an action with profile information.
-- PluginMarkdownDescription: \
+## Configuration
+
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "Browsers": null,
+ "Profiles": null
+ }
+}
+```
+
+Example configuration:
+
+```json
+{
+ "Version": 1,
+ "Settings": {
+ "Browsers": {
+ "Edge": "C:\\PathTo\\msedge.exe",
+ "FireFox": "C:\\PathTo\\Mozilla\\firefox.exe"
+ },
+ "Profiles": {
+ "Work": {
+ "BrowserName": "Edge",
+ "CommandLineArguments": "\"--profile-directory=Profile 4\" {url}"
+ },
+ "Incognito": {
+ "BrowserName": "Edge",
+ "CommandLineArguments": "-inprivate"
+ },
+ "Incognito2": {
+ "BrowserName": "FireFox",
+ "CommandLineArguments": "-inprivate {url}"
+ }
+ }
+ }
+}
+```
+
+### Properties
+
+- `Browsers`: Dictionary of known browsers and their path to use for opening urls.
+- `Profiles`: Profiles to use.
This module contains the following methods, variables and/or constants:
diff --git a/docs/mdsource/RepoM.Plugin.WindowsExplorerGitInfo.source.md b/docs/plugin_repom.plugin.windowsexplorergitinfo.generated.md
similarity index 52%
rename from docs/mdsource/RepoM.Plugin.WindowsExplorerGitInfo.source.md
rename to docs/plugin_repom.plugin.windowsexplorergitinfo.generated.md
index 8a8c8bdc..b9c6d30a 100644
--- a/docs/mdsource/RepoM.Plugin.WindowsExplorerGitInfo.source.md
+++ b/docs/plugin_repom.plugin.windowsexplorergitinfo.generated.md
@@ -1,11 +1,13 @@
-# Enhanced Windows Explorer Titles
+# WindowsExplorerTitle
As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
-
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
-Note that for Windows 11 users, the title will not be updated but in the taskbar the additional git information is still visible.
+## Configuration
+
+This plugin has no configuration.
-include: _plugin_enable
+
-include: DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage#desc.verified.md
+Note that for Windows 11 users, the title will not be updated but in the taskbar the additional git information is still visible.
diff --git a/docs_new/querymatchers.md b/docs/querymatchers.md
similarity index 100%
rename from docs_new/querymatchers.md
rename to docs/querymatchers.md
diff --git a/docs_new/repom.generated.md b/docs/repom.generated.md
similarity index 99%
rename from docs_new/repom.generated.md
rename to docs/repom.generated.md
index ad0cc65b..f4e9160b 100644
--- a/docs_new/repom.generated.md
+++ b/docs/repom.generated.md
@@ -1,5 +1,9 @@
# RepoM Core Repository Actions
+## Configuration
+
+This plugin has no configuration.
+
This module contains the following methods, variables and/or constants:
## browse-repository@1
diff --git a/docs_new/repository_action_types.md b/docs/repository_action_types.md
similarity index 100%
rename from docs_new/repository_action_types.md
rename to docs/repository_action_types.md
diff --git a/docs_new/script_variables_azure_devops.generated.md b/docs/script_variables_azure_devops.generated.md
similarity index 100%
rename from docs_new/script_variables_azure_devops.generated.md
rename to docs/script_variables_azure_devops.generated.md
diff --git a/docs_new/script_variables_file.generated.md b/docs/script_variables_file.generated.md
similarity index 100%
rename from docs_new/script_variables_file.generated.md
rename to docs/script_variables_file.generated.md
diff --git a/docs_new/script_variables_heidi.generated.md b/docs/script_variables_heidi.generated.md
similarity index 100%
rename from docs_new/script_variables_heidi.generated.md
rename to docs/script_variables_heidi.generated.md
diff --git a/docs_new/script_variables_repository.generated.md b/docs/script_variables_repository.generated.md
similarity index 100%
rename from docs_new/script_variables_repository.generated.md
rename to docs/script_variables_repository.generated.md
diff --git a/docs_new/script_variables_sonarcloud.generated.md b/docs/script_variables_sonarcloud.generated.md
similarity index 100%
rename from docs_new/script_variables_sonarcloud.generated.md
rename to docs/script_variables_sonarcloud.generated.md
diff --git a/docs_new/script_variables_statistics.generated.md b/docs/script_variables_statistics.generated.md
similarity index 100%
rename from docs_new/script_variables_statistics.generated.md
rename to docs/script_variables_statistics.generated.md
diff --git a/docs_new/search.md b/docs/search.md
similarity index 100%
rename from docs_new/search.md
rename to docs/search.md
diff --git a/docs_new/mdsource/plugin_repom.plugin.heidi.generated.source.md b/docs_new/mdsource/plugin_repom.plugin.heidi.generated.source.md
deleted file mode 100644
index 48a6cda1..00000000
--- a/docs_new/mdsource/plugin_repom.plugin.heidi.generated.source.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# HeidiSQL
-
-This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file. This module monitors this file and makes it possible to use this configuration in the action menu.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.Heidi
-- PluginName: HeidiSQL
-- PluginDescription: Contains context variables to be used in the action menu. The variables are extracted from the portable Heidi DB configuration.
-- PluginMarkdownDescription: This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file. This module monitors this file and makes it possible to use this configuration in the action menu.
-
diff --git a/docs_new/mdsource/plugin_repom.plugin.lucenequeryparser.generated.source.md b/docs_new/mdsource/plugin_repom.plugin.lucenequeryparser.generated.source.md
deleted file mode 100644
index 9d7a0f50..00000000
--- a/docs_new/mdsource/plugin_repom.plugin.lucenequeryparser.generated.source.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# LuceneQueryParser
-
-Contains a custom query parser based on Lucene syntax for repository filtering.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.LuceneQueryParser
-- PluginName: LuceneQueryParser
-- PluginDescription: Contains a custom query parser based on Lucene syntax for repository filtering.
-- PluginMarkdownDescription: \
-
diff --git a/docs_new/mdsource/plugin_repom.plugin.statistics.generated.source.md b/docs_new/mdsource/plugin_repom.plugin.statistics.generated.source.md
deleted file mode 100644
index 807b2c48..00000000
--- a/docs_new/mdsource/plugin_repom.plugin.statistics.generated.source.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Statistics
-
-Provides functionality to keep track how may times an action is performed on a given repository. These numbers can be accessed using variable providers. The plugin also contains functionality to use these statistics in orderings.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.Statistics
-- PluginName: Statistics
-- PluginDescription: Provides functionality to keep track how may times an action is performed on a given repository. These numbers can be accessed using variable providers. The plugin also contains functionality to use these statistics in orderings.
-- PluginMarkdownDescription: \
-
diff --git a/docs_new/mdsource/plugin_repom.plugin.webbrowser.generated.source.md b/docs_new/mdsource/plugin_repom.plugin.webbrowser.generated.source.md
deleted file mode 100644
index 6f72aeb0..00000000
--- a/docs_new/mdsource/plugin_repom.plugin.webbrowser.generated.source.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# WebBrowser
-
-Provides functionality to start a web browser from an action with profile information.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.WebBrowser
-- PluginName: WebBrowser
-- PluginDescription: Provides functionality to start a web browser from an action with profile information.
-- PluginMarkdownDescription: \
-
-This module contains the following methods, variables and/or constants:
-
-## browser@1
-
-Action opening a webbrowser with the provided url.
-
-Properties:
-
-- `name`: Name of the menu item. ([Text](repository_action_types.md#text))
-- `url`: The url to browse to. ([Text](repository_action_types.md#text))
-- `profile`: profile name used to select browser and browser profile ([Text](repository_action_types.md#text))
-- `context`: The context in which the action is available. ([Context](repository_action_types.md#context))
-- `active`: Whether the menu item is enabled. ([Predicate](repository_action_types.md#predicate))
-
-### Example
-
-snippet: webbrowser-browser@1-scenario01
-
diff --git a/docs_new/mdsource/plugin_repom.plugin.windowsexplorergitinfo.generated.source.md b/docs_new/mdsource/plugin_repom.plugin.windowsexplorergitinfo.generated.source.md
deleted file mode 100644
index e96d440f..00000000
--- a/docs_new/mdsource/plugin_repom.plugin.windowsexplorergitinfo.generated.source.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# WindowsExplorerTitle
-
-As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.WindowsExplorerGitInfo
-- PluginName: WindowsExplorerTitle
-- PluginDescription: Contains a hook updating Explorer views in Windows with the current git status.
-- PluginMarkdownDescription: As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
-
diff --git a/docs_new/plugin_repom.plugin.heidi.generated.md b/docs_new/plugin_repom.plugin.heidi.generated.md
deleted file mode 100644
index 48a6cda1..00000000
--- a/docs_new/plugin_repom.plugin.heidi.generated.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# HeidiSQL
-
-This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file. This module monitors this file and makes it possible to use this configuration in the action menu.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.Heidi
-- PluginName: HeidiSQL
-- PluginDescription: Contains context variables to be used in the action menu. The variables are extracted from the portable Heidi DB configuration.
-- PluginMarkdownDescription: This module integrates with a portable [HeidiSQL](https://www.heidisql.com/) installation. The portable Heidi DB saves its database configuration in a portable configuration file. This module monitors this file and makes it possible to use this configuration in the action menu.
-
diff --git a/docs_new/plugin_repom.plugin.lucenequeryparser.generated.md b/docs_new/plugin_repom.plugin.lucenequeryparser.generated.md
deleted file mode 100644
index 9d7a0f50..00000000
--- a/docs_new/plugin_repom.plugin.lucenequeryparser.generated.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# LuceneQueryParser
-
-Contains a custom query parser based on Lucene syntax for repository filtering.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.LuceneQueryParser
-- PluginName: LuceneQueryParser
-- PluginDescription: Contains a custom query parser based on Lucene syntax for repository filtering.
-- PluginMarkdownDescription: \
-
diff --git a/docs_new/plugin_repom.plugin.statistics.generated.md b/docs_new/plugin_repom.plugin.statistics.generated.md
deleted file mode 100644
index 807b2c48..00000000
--- a/docs_new/plugin_repom.plugin.statistics.generated.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Statistics
-
-Provides functionality to keep track how may times an action is performed on a given repository. These numbers can be accessed using variable providers. The plugin also contains functionality to use these statistics in orderings.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.Statistics
-- PluginName: Statistics
-- PluginDescription: Provides functionality to keep track how may times an action is performed on a given repository. These numbers can be accessed using variable providers. The plugin also contains functionality to use these statistics in orderings.
-- PluginMarkdownDescription: \
-
diff --git a/docs_new/plugin_repom.plugin.windowsexplorergitinfo.generated.md b/docs_new/plugin_repom.plugin.windowsexplorergitinfo.generated.md
deleted file mode 100644
index e96d440f..00000000
--- a/docs_new/plugin_repom.plugin.windowsexplorergitinfo.generated.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# WindowsExplorerTitle
-
-As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
-
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: RepoM.Plugin.WindowsExplorerGitInfo
-- PluginName: WindowsExplorerTitle
-- PluginDescription: Contains a hook updating Explorer views in Windows with the current git status.
-- PluginMarkdownDescription: As an extra goodie for Windows users, RepoM automatically detects open File Explorer windows and adds a status appendix to their title if they are in context of a git repository.
-
diff --git a/docs/ActionList.md b/docs_old/ActionList.md
similarity index 100%
rename from docs/ActionList.md
rename to docs_old/ActionList.md
diff --git a/docs/Filtering.md b/docs_old/Filtering.md
similarity index 100%
rename from docs/Filtering.md
rename to docs_old/Filtering.md
diff --git a/docs/Ordering.md b/docs_old/Ordering.md
similarity index 100%
rename from docs/Ordering.md
rename to docs_old/Ordering.md
diff --git a/docs/QuickNavigation.gif b/docs_old/QuickNavigation.gif
similarity index 100%
rename from docs/QuickNavigation.gif
rename to docs_old/QuickNavigation.gif
diff --git a/docs/RepoZ-ReadMe-UI-Both.png b/docs_old/RepoZ-ReadMe-UI-Both.png
similarity index 100%
rename from docs/RepoZ-ReadMe-UI-Both.png
rename to docs_old/RepoZ-ReadMe-UI-Both.png
diff --git a/docs/Settings.md b/docs_old/Settings.md
similarity index 100%
rename from docs/Settings.md
rename to docs_old/Settings.md
diff --git a/docs/grr-5fps-compressed.gif b/docs_old/grr-5fps-compressed.gif
similarity index 100%
rename from docs/grr-5fps-compressed.gif
rename to docs_old/grr-5fps-compressed.gif
diff --git a/docs/mdsource/ActionList.source.md.old b/docs_old/mdsource/ActionList.source.md.old
similarity index 100%
rename from docs/mdsource/ActionList.source.md.old
rename to docs_old/mdsource/ActionList.source.md.old
diff --git a/docs/mdsource/Filtering.source.md b/docs_old/mdsource/Filtering.source.md
similarity index 100%
rename from docs/mdsource/Filtering.source.md
rename to docs_old/mdsource/Filtering.source.md
diff --git a/docs/mdsource/Ordering.source.md b/docs_old/mdsource/Ordering.source.md
similarity index 100%
rename from docs/mdsource/Ordering.source.md
rename to docs_old/mdsource/Ordering.source.md
diff --git a/docs/mdsource/Settings.source.md b/docs_old/mdsource/Settings.source.md
similarity index 100%
rename from docs/mdsource/Settings.source.md
rename to docs_old/mdsource/Settings.source.md
diff --git a/docs/mdsource/_plugin_enable.include.md b/docs_old/mdsource/_plugin_enable.include.md
similarity index 100%
rename from docs/mdsource/_plugin_enable.include.md
rename to docs_old/mdsource/_plugin_enable.include.md
diff --git a/docs/snippets/file.find_files.verified.yaml b/docs_old/snippets/file.find_files.verified.yaml
similarity index 100%
rename from docs/snippets/file.find_files.verified.yaml
rename to docs_old/snippets/file.find_files.verified.yaml
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 70624792..41e526bf 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -16,6 +16,9 @@
<_Parameter1>RepoM.Plugin.Misc.Tests
+
+ <_Parameter1>RepoM.ActionMenu.CodeGen
+
<_Parameter1>Tests
diff --git a/src/RepoM.ActionMenu.CodeGen/Constants.cs b/src/RepoM.ActionMenu.CodeGen/Constants.cs
new file mode 100644
index 00000000..0e8c56c2
--- /dev/null
+++ b/src/RepoM.ActionMenu.CodeGen/Constants.cs
@@ -0,0 +1,57 @@
+namespace RepoM.ActionMenu.CodeGen;
+
+using System.Collections.Generic;
+using RepoM.ActionMenu.CodeGen.Models;
+
+internal static class Constants
+{
+ internal static readonly Dictionary TypeInfos = new()
+ {
+ {
+ typeof(Interface.YamlModel.Templating.Text).FullName!,
+ new TypeInfoDescriptor(nameof(Text), typeof(Interface.YamlModel.Templating.Text).FullName!)
+ {
+ Link = "repository_action_types.md#text",
+ }
+ },
+ {
+ typeof(Interface.YamlModel.Templating.Predicate).FullName!,
+ new TypeInfoDescriptor(nameof(Interface.YamlModel.Templating.Predicate), typeof(Interface.YamlModel.Templating.Predicate).FullName!)
+ {
+ Link = "repository_action_types.md#predicate",
+ }
+ },
+ {
+ typeof(Interface.YamlModel.ActionMenus.Context).FullName!,
+ new TypeInfoDescriptor(nameof(Interface.YamlModel.ActionMenus.Context), typeof(Interface.YamlModel.ActionMenus.Context).FullName!)
+ {
+ Link = "repository_action_types.md#context",
+ }
+ },
+ {
+ typeof(Interface.YamlModel.ActionMenus.Context).FullName! + "?",
+ new TypeInfoDescriptor(nameof(Interface.YamlModel.ActionMenus.Context), typeof(Interface.YamlModel.ActionMenus.Context).FullName! + "?")
+ {
+ Link = "repository_action_types.md#context",
+ }
+ },
+ };
+
+ ///
+ /// Project names of all the projects that are used in the code generation.
+ ///
+ public static readonly List Projects =
+ [
+ "RepoM.ActionMenu.Interface", // this is for the description of the interface types and its members.
+ "RepoM.ActionMenu.Core",
+
+ "RepoM.Plugin.AzureDevOps",
+ "RepoM.Plugin.Clipboard",
+ "RepoM.Plugin.Heidi",
+ "RepoM.Plugin.LuceneQueryParser",
+ "RepoM.Plugin.SonarCloud",
+ "RepoM.Plugin.Statistics",
+ "RepoM.Plugin.WebBrowser",
+ "RepoM.Plugin.WindowsExplorerGitInfo",
+ ];
+}
\ No newline at end of file
diff --git a/src/RepoM.ActionMenu.CodeGen/DocsClassVisitor.cs b/src/RepoM.ActionMenu.CodeGen/DocsClassVisitor.cs
index 1dfbb780..dccb6b32 100644
--- a/src/RepoM.ActionMenu.CodeGen/DocsClassVisitor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/DocsClassVisitor.cs
@@ -17,12 +17,17 @@ public DocsClassVisitor(ITypeSymbol typeSymbol, IDictionary file
public void Visit(ActionMenuContextClassDescriptor descriptor)
{
- Misc.XmlDocsParser.ExtractDocumentation(_typeSymbol, descriptor, _files);
+ Visit(descriptor as ClassDescriptor);
}
public void Visit(ActionMenuClassDescriptor descriptor)
{
- Misc.XmlDocsParser.ExtractDocumentation(_typeSymbol, descriptor, _files);
+ Visit(descriptor as ClassDescriptor);
+ }
+
+ public void Visit(ModuleConfigurationClassDescriptor descriptor)
+ {
+ Visit(descriptor as ClassDescriptor);
}
public void Visit(ClassDescriptor descriptor)
diff --git a/src/RepoM.ActionMenu.CodeGen/DocumentationGenerator.cs b/src/RepoM.ActionMenu.CodeGen/DocumentationGenerator.cs
index 99b8ed1d..39d9bf4a 100644
--- a/src/RepoM.ActionMenu.CodeGen/DocumentationGenerator.cs
+++ b/src/RepoM.ActionMenu.CodeGen/DocumentationGenerator.cs
@@ -2,28 +2,31 @@ namespace RepoM.ActionMenu.CodeGen;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Threading.Tasks;
using RepoM.ActionMenu.CodeGen.Models;
using Scriban;
+using Scriban.Parsing;
using Scriban.Runtime;
internal static class DocumentationGenerator
{
- public static async Task GetPluginDocsContentAsync(ProjectDescriptor plugin, Template template)
+ public static async Task GetPluginDocsContentAsync(ProjectDescriptor plugin, Template template, string name)
{
plugin.ActionMenus.Sort((left, right) => string.Compare(left.Name, right.Name, StringComparison.Ordinal));
var context = new TemplateContext
- {
- LoopLimit = 0,
- MemberRenamer = x => x.Name,
- };
-
- var scriptObject = new ScriptObject()
- {
- { "plugin", plugin },
- };
+ {
+ LoopLimit = 0,
+ MemberRenamer = x => x.Name,
+ TemplateLoader = new FileSystemTemplateLoader(name, "Templates/Parts", RepoMFolders.DocumentationMarkDownSource),
+ };
+
+ var scriptObject = new ScriptObject
+ {
+ { "plugin", plugin },
+ };
scriptObject.Import(typeof(MyStringFunctions));
context.PushGlobal(scriptObject);
@@ -36,15 +39,16 @@ public static async Task GetDocsContentAsync(ActionMenuContextClassDescr
module.Members.Sort((left, right) => string.Compare(left.Name, right.Name, StringComparison.Ordinal));
var context = new TemplateContext
- {
- LoopLimit = 0,
- MemberRenamer = x => x.Name,
- };
-
- var scriptObject = new ScriptObject()
- {
- { "module", module },
- };
+ {
+ LoopLimit = 0,
+ MemberRenamer = x => x.Name,
+ TemplateLoader = new FileSystemTemplateLoader(string.Empty, "Templates/Parts", RepoMFolders.DocumentationMarkDownSource),
+ };
+
+ var scriptObject = new ScriptObject
+ {
+ { "module", module },
+ };
scriptObject.Import(typeof(MyStringFunctions));
context.PushGlobal(scriptObject);
@@ -57,16 +61,17 @@ public static async Task GetScribanInitializersCSharpCodeAsync(IEnumerab
var modules = actionContextMenus.OrderBy(x => x.ClassName).ToList();
var context = new TemplateContext
- {
- LoopLimit = 0,
- MemberRenamer = x => x.Name,
- EnableRelaxedMemberAccess = false,
- };
-
- var scriptObject = new ScriptObject()
- {
- { "modules", modules },
- };
+ {
+ LoopLimit = 0,
+ MemberRenamer = x => x.Name,
+ EnableRelaxedMemberAccess = false,
+ TemplateLoader = new FileSystemTemplateLoader(string.Empty, "Templates/Parts", RepoMFolders.DocumentationMarkDownSource),
+ };
+
+ var scriptObject = new ScriptObject
+ {
+ { "modules", modules },
+ };
scriptObject.Import(typeof(MyStringFunctions));
context.PushGlobal(scriptObject);
@@ -75,6 +80,79 @@ public static async Task GetScribanInitializersCSharpCodeAsync(IEnumerab
}
}
+internal class FileSystemTemplateLoader : ITemplateLoader
+{
+ private readonly string _prefix;
+ private readonly string _scribanTemplatesPathBase;
+ private readonly string _docsIncludeSourceFullPath;
+
+ public FileSystemTemplateLoader(string prefix, string scribanTemplatesPath, string docsIncludeSourceFullPath)
+ {
+ _prefix = prefix;
+ _scribanTemplatesPathBase = scribanTemplatesPath ?? throw new ArgumentNullException(nameof(scribanTemplatesPath));
+ _docsIncludeSourceFullPath = docsIncludeSourceFullPath ?? throw new ArgumentNullException(nameof(docsIncludeSourceFullPath));
+ }
+
+ public string GetPath(TemplateContext context, SourceSpan callerSpan, string templateName)
+ {
+ if (!string.IsNullOrWhiteSpace(_prefix) && templateName.Length == 2)
+ {
+ if (int.TryParse(templateName, out int _))
+ {
+ var prefix = Path.Combine(_docsIncludeSourceFullPath, $"{_prefix}." + templateName);
+ var path = $"{prefix}.md";
+ if (File.Exists(path))
+ {
+ return path;
+ }
+
+ return string.Empty;
+ }
+ }
+
+ var result = Path.Combine(_scribanTemplatesPathBase, templateName);
+ return result;
+ }
+
+ public string Load(TemplateContext context, SourceSpan callerSpan, string templatePath)
+ {
+ if (string.IsNullOrEmpty(templatePath))
+ {
+ return string.Empty;
+ }
+
+ try
+ {
+ var result = File.ReadAllText(templatePath);
+ return result;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
+
+ public async ValueTask LoadAsync(TemplateContext context, SourceSpan callerSpan, string templatePath)
+ {
+ if (string.IsNullOrEmpty(templatePath))
+ {
+ return string.Empty;
+ }
+
+ try
+ {
+ var result = await File.ReadAllTextAsync(templatePath);
+ return result;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
+}
+
public static class MyStringFunctions
{
public static string Hyphenated(string input)
diff --git a/src/RepoM.ActionMenu.CodeGen/IClassDescriptorVisitor.cs b/src/RepoM.ActionMenu.CodeGen/IClassDescriptorVisitor.cs
index d8ba62c3..c2117e03 100644
--- a/src/RepoM.ActionMenu.CodeGen/IClassDescriptorVisitor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/IClassDescriptorVisitor.cs
@@ -9,4 +9,6 @@ public interface IClassDescriptorVisitor
void Visit(ActionMenuClassDescriptor descriptor);
void Visit(ClassDescriptor descriptor);
+
+ void Visit(ModuleConfigurationClassDescriptor descriptor);
}
\ No newline at end of file
diff --git a/src/RepoM.ActionMenu.CodeGen/Misc/FileSystemHelper.cs b/src/RepoM.ActionMenu.CodeGen/Misc/FileSystemHelper.cs
index fd823197..619a889b 100644
--- a/src/RepoM.ActionMenu.CodeGen/Misc/FileSystemHelper.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Misc/FileSystemHelper.cs
@@ -3,9 +3,9 @@ namespace RepoM.ActionMenu.CodeGen.Misc;
using System;
using System.IO;
-public static class FileSystemHelper
+internal static class FileSystemHelper
{
- public static void DeleteFileIsExist(string pathToGeneratedCode)
+ public static void DeleteFileIfExist(string pathToGeneratedCode)
{
if (!File.Exists(pathToGeneratedCode))
{
@@ -23,7 +23,7 @@ public static void DeleteFileIsExist(string pathToGeneratedCode)
}
}
- public static void CheckDirectory(string path)
+ public static void CheckDirectoryExists(string path)
{
if (!Directory.Exists(path))
{
@@ -31,7 +31,7 @@ public static void CheckDirectory(string path)
}
}
- public static void CheckFile(string path)
+ public static void CheckFileExists(string path)
{
if (!File.Exists(path))
{
diff --git a/src/RepoM.ActionMenu.CodeGen/Misc/SymbolExtensions.cs b/src/RepoM.ActionMenu.CodeGen/Misc/SymbolExtensions.cs
index be584063..ddc69602 100644
--- a/src/RepoM.ActionMenu.CodeGen/Misc/SymbolExtensions.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Misc/SymbolExtensions.cs
@@ -1,5 +1,6 @@
namespace RepoM.ActionMenu.CodeGen.Misc;
+using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
@@ -9,4 +10,11 @@ public static class SymbolExtensions
{
return symbol.GetAttributes().FirstOrDefault(x => x.AttributeClass!.Name == typeof(T).Name);
}
+
+ public static List FindAttributes(this ISymbol symbol)
+ {
+ return symbol.GetAttributes()
+ .Where(x => x.AttributeClass!.Name == typeof(T).Name)
+ .ToList();
+ }
}
\ No newline at end of file
diff --git a/src/RepoM.ActionMenu.CodeGen/Models/ActionMenuClassDescriptor.cs b/src/RepoM.ActionMenu.CodeGen/Models/ActionMenuClassDescriptor.cs
index 0fe65a27..c9405441 100644
--- a/src/RepoM.ActionMenu.CodeGen/Models/ActionMenuClassDescriptor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Models/ActionMenuClassDescriptor.cs
@@ -9,10 +9,27 @@ public class ActionMenuClassDescriptor : ClassDescriptor
///
/// Properties
///
- public List ActionMenuProperties { get; set; } = new List();
+ public List ActionMenuProperties { get; } = [];
public string RepositoryActionName => Name;
+ public override void Accept(IClassDescriptorVisitor visitor)
+ {
+ visitor.Visit(this);
+ }
+}
+
+[DebuggerDisplay($"{{{nameof(ClassName)},nq}}")]
+public class ModuleConfigurationClassDescriptor : ClassDescriptor
+{
+ public string? DefaultValueJson { get; set; }
+
+ public string? ExampleValueJson { get; set; }
+
+ public List Properties { get; } = [];
+
+ public bool IsObsolete { get; set; }
+
public override void Accept(IClassDescriptorVisitor visitor)
{
visitor.Visit(this);
diff --git a/src/RepoM.ActionMenu.CodeGen/Models/ClassDescriptor.cs b/src/RepoM.ActionMenu.CodeGen/Models/ClassDescriptor.cs
index 060f69e5..fa20be80 100644
--- a/src/RepoM.ActionMenu.CodeGen/Models/ClassDescriptor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Models/ClassDescriptor.cs
@@ -20,7 +20,7 @@ public class ClassDescriptor : IXmlDocsExtended
///
/// Properties, Functions, fields etc. etc.
///
- public List Members { get; set; } = [];
+ public List Members { get; } = [];
///
/// Friendly name
@@ -31,6 +31,8 @@ public class ClassDescriptor : IXmlDocsExtended
public string Namespace { get; set; } = null!;
+ public string FullName => $"{Namespace}.{ClassName}";
+
public bool IsEnum => _symbolType == SymbolType.Enum;
public bool IsClass => _symbolType == SymbolType.Class;
@@ -58,6 +60,8 @@ string IXmlDocsExtended.Returns
List IXmlDocsExtended.Params => throw new NotSupportedException("no params for class.");
+ public Type? DotNetType { get; set; }
+
public virtual void Accept(IClassDescriptorVisitor visitor)
{
visitor.Visit(this);
diff --git a/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs b/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs
index c8a4d5c9..00b9528d 100644
--- a/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Models/MemberDescriptor.cs
@@ -1,6 +1,7 @@
namespace RepoM.ActionMenu.CodeGen.Models;
using System.Collections.Generic;
+using System.Diagnostics;
using Microsoft.CodeAnalysis;
public static class TypeInfoDescriptorFactory
@@ -8,17 +9,18 @@ public static class TypeInfoDescriptorFactory
public static TypeInfoDescriptor Create(ITypeSymbol typeSymbol)
{
var displayString = typeSymbol.ToDisplayString();
- if (Program.TypeInfos.TryGetValue(displayString, out TypeInfoDescriptor? typeInfoDescriptor))
+ if (Constants.TypeInfos.TryGetValue(displayString, out TypeInfoDescriptor? typeInfoDescriptor))
{
return typeInfoDescriptor;
}
var result = new TypeInfoDescriptor(typeSymbol);
- Program.TypeInfos.Add(displayString, result);
+ Constants.TypeInfos.Add(displayString, result);
return result;
}
}
+[DebuggerDisplay($"{{{nameof(Name)},nq}}")]
public class TypeInfoDescriptor
{
public TypeInfoDescriptor(ITypeSymbol typeSymbol)
@@ -72,6 +74,7 @@ private static bool IsNullableType(ITypeSymbol typeSymbol)
///
/// Property, Function, field etc. etc.
///
+[DebuggerDisplay($"{{{nameof(CSharpName)},nq}}")]
public class MemberDescriptor : IXmlDocsExtended
{
///
@@ -111,6 +114,7 @@ public class MemberDescriptor : IXmlDocsExtended
public List Params { get; } = [];
}
+[DebuggerDisplay($"{{{nameof(CSharpName)},nq}}")]
public class ActionMenuMemberDescriptor : MemberDescriptor
{
// public RepositoryActionAttribute RepositoryActionAttribute { get; init; }
@@ -128,7 +132,13 @@ public class ActionMenuMemberDescriptor : MemberDescriptor
public string? RefType { get; set; }
}
+[DebuggerDisplay($"{{{nameof(CSharpName)},nq}}")]
public class ActionMenuContextMemberDescriptor : MemberDescriptor
{
public string ActionMenuContextMemberName => Name;
}
+
+[DebuggerDisplay($"{{{nameof(CSharpName)},nq}}")]
+public class PluginConfigurationMemberDescriptor : MemberDescriptor
+{
+}
diff --git a/src/RepoM.ActionMenu.CodeGen/Models/ProjectDescriptor.cs b/src/RepoM.ActionMenu.CodeGen/Models/ProjectDescriptor.cs
index d1251d6c..0bfd2741 100644
--- a/src/RepoM.ActionMenu.CodeGen/Models/ProjectDescriptor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Models/ProjectDescriptor.cs
@@ -11,27 +11,42 @@ public sealed class ProjectDescriptor
///
/// Assembly Name
///
- public string AssemblyName { get; set; } = null!;
+ public required string AssemblyName { get; init; }
///
/// Project name
///
- public string ProjectName { get; set; } = null!;
+ public required string ProjectName { get; init; }
+
+ ///
+ /// Full filename of the sln or csproj.
+ ///
+ public required string FullFilename { get; init; }
+
+ ///
+ /// The directory of the project.
+ ///
+ public required string Directory { get; init; }
+
+ ///
+ /// List of class descriptors for configuration classes
+ ///
+ public List ConfigurationClasses { get; } = [];
///
/// List of class descriptors for repository actions.
///
- public List ActionMenus { get; } = new();
+ public List ActionMenus { get; } = [];
///
/// List of class descriptors for context (ie scriban methods, properties)
///
- public List ActionContextMenus { get; } = new();
+ public List ActionContextMenus { get; } = [];
///
- /// Regular types (to be used when action type has sub type property)
+ /// Regular types (to be used when action type has subtype property)
///
- public List Types { get; } = new();
+ public List Types { get; } = [];
///
/// when project is plugin, the pluginname.
@@ -51,7 +66,12 @@ public sealed class ProjectDescriptor
///
/// is plugin or not.
///
- public bool IsPlugin { get; private set; } = false;
+ public bool IsPlugin { get; private set; }
+
+ ///
+ /// When the project is a plugin, it might have some configuration.
+ ///
+ public bool HasConfiguration => ConfigurationClasses.Count > 0;
[ScriptMemberIgnore]
public void SetPackageInformation(PackageAttribute attribute)
diff --git a/src/RepoM.ActionMenu.CodeGen/ProcessMembersVisitor.cs b/src/RepoM.ActionMenu.CodeGen/ProcessMembersVisitor.cs
index 969bfaed..00c28000 100644
--- a/src/RepoM.ActionMenu.CodeGen/ProcessMembersVisitor.cs
+++ b/src/RepoM.ActionMenu.CodeGen/ProcessMembersVisitor.cs
@@ -4,6 +4,7 @@ namespace RepoM.ActionMenu.CodeGen;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
+using System.Reflection;
using System.Text;
using Microsoft.CodeAnalysis;
using RepoM.ActionMenu.CodeGen.Misc;
@@ -11,7 +12,9 @@ namespace RepoM.ActionMenu.CodeGen;
using RepoM.ActionMenu.Interface.Attributes;
using RepoM.ActionMenu.Interface.YamlModel.ActionMenus;
using RepoM.ActionMenu.Interface.YamlModel.Templating;
-using Text = RepoM.ActionMenu.Interface.YamlModel.Templating.Text;
+using RepoM.Api.Plugins;
+using RepoM.Core.Plugin;
+using Text = Interface.YamlModel.Templating.Text;
public class ProcessMembersVisitor : IClassDescriptorVisitor
{
@@ -20,11 +23,11 @@ public class ProcessMembersVisitor : IClassDescriptorVisitor
// todo extend.
private static readonly string[] _collectionTypes =
- {
- "System.Collections.Generic.List",
- "System.Collections.Generic.IList",
- "System.Collections.Generic.IEnumerable",
- };
+ [
+ "System.Collections.Generic.List",
+ "System.Collections.Generic.IList",
+ "System.Collections.Generic.IEnumerable",
+ ];
public ProcessMembersVisitor(ITypeSymbol typeSymbol, IDictionary files)
{
@@ -111,7 +114,7 @@ public void Visit(ActionMenuContextClassDescriptor descriptor)
descriptor.Members.Add(memberDescriptor);
- Misc.XmlDocsParser.ExtractDocumentation(member, memberDescriptor, _files);
+ XmlDocsParser.ExtractDocumentation(member, memberDescriptor, _files);
}
}
@@ -265,6 +268,56 @@ bool IsTypeOrNullableType()
}
}
+ public void Visit(ModuleConfigurationClassDescriptor descriptor)
+ {
+ Visit(descriptor as ClassDescriptor);
+
+ AttributeData? moduleConfigurationAttribute = _typeSymbol.FindAttribute();
+
+ if (moduleConfigurationAttribute == null)
+ {
+ return;
+ }
+
+ var version = (int)moduleConfigurationAttribute.ConstructorArguments[0].Value!;
+
+ ISymbol? defaultFactoryMethodSymbol = _typeSymbol.GetMembers().SingleOrDefault(symbol => symbol.FindAttribute() != null);
+ if (!(defaultFactoryMethodSymbol is IMethodSymbol methodSymbol))
+ {
+ return;
+ }
+
+ if (descriptor.DotNetType == null)
+ {
+ throw new Exception(descriptor.FullName + " No type found for ModuleConfigurationDefaultValueFactoryMethodAttribute");
+ }
+
+ var defaultValueResult = descriptor.DotNetType.InvokeMember(
+ methodSymbol.Name,
+ BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.NonPublic,
+ null,
+ null,
+ null);
+
+ descriptor.DefaultValueJson = FileBasedPackageConfiguration.SerializeConfiguration(defaultValueResult, version);
+
+ //
+ ISymbol? exampleFactoryMethodSymbol = _typeSymbol.GetMembers().SingleOrDefault(symbol => symbol.FindAttribute() != null);
+ if (!(exampleFactoryMethodSymbol is IMethodSymbol methodSymbolExample))
+ {
+ return;
+ }
+
+ var exampleValueResult = descriptor.DotNetType.InvokeMember(
+ methodSymbolExample.Name,
+ BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.NonPublic,
+ null,
+ null,
+ null);
+
+ descriptor.ExampleValueJson = FileBasedPackageConfiguration.SerializeConfiguration(exampleValueResult, version);
+ }
+
public void Visit(ClassDescriptor descriptor)
{
if (_typeSymbol is INamedTypeSymbol { TypeKind: TypeKind.Enum, } symbol)
@@ -288,7 +341,7 @@ public void Visit(ClassDescriptor descriptor)
XmlId = member.GetDocumentationCommentId() ?? string.Empty,
};
- Misc.XmlDocsParser.ExtractDocumentation(member, memberDescriptor, _files);
+ XmlDocsParser.ExtractDocumentation(member, memberDescriptor, _files);
descriptor.Members.Add(memberDescriptor);
}
@@ -384,7 +437,7 @@ public void Visit(ClassDescriptor descriptor)
descriptor.Members.Add(memberDescriptor);
- Misc.XmlDocsParser.ExtractDocumentation(member, memberDescriptor, _files);
+ XmlDocsParser.ExtractDocumentation(member, memberDescriptor, _files);
}
}
}
\ No newline at end of file
diff --git a/src/RepoM.ActionMenu.CodeGen/Program.cs b/src/RepoM.ActionMenu.CodeGen/Program.cs
index d51ff648..4315f3f0 100644
--- a/src/RepoM.ActionMenu.CodeGen/Program.cs
+++ b/src/RepoM.ActionMenu.CodeGen/Program.cs
@@ -4,146 +4,57 @@ namespace RepoM.ActionMenu.CodeGen;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Reflection;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using RepoM.ActionMenu.CodeGen.Misc;
using RepoM.ActionMenu.CodeGen.Models;
-using RepoM.ActionMenu.Core.TestLib.Utils;
using RepoM.ActionMenu.Interface.Attributes;
using RepoM.ActionMenu.Interface.YamlModel;
+using RepoM.Core.Plugin;
using RepoM.Core.Plugin.AssemblyInformation;
using Scriban;
public static class Program
{
- internal static readonly Dictionary TypeInfos = new()
- {
- {
- typeof(Interface.YamlModel.Templating.Text).FullName!,
- new TypeInfoDescriptor(nameof(Text), typeof(Interface.YamlModel.Templating.Text).FullName!)
- {
- Link = "repository_action_types.md#text",
- }
- },
- {
- typeof(Interface.YamlModel.Templating.Predicate).FullName!,
- new TypeInfoDescriptor(nameof(Interface.YamlModel.Templating.Predicate), typeof(Interface.YamlModel.Templating.Predicate).FullName!)
- {
- Link = "repository_action_types.md#predicate",
- }
- },
- {
- typeof(Interface.YamlModel.ActionMenus.Context).FullName!,
- new TypeInfoDescriptor(nameof(Interface.YamlModel.ActionMenus.Context), typeof(Interface.YamlModel.ActionMenus.Context).FullName!)
- {
- Link = "repository_action_types.md#context",
- }
- },
- {
- typeof(Interface.YamlModel.ActionMenus.Context).FullName! + "?",
- new TypeInfoDescriptor(nameof(Interface.YamlModel.ActionMenus.Context), typeof(Interface.YamlModel.ActionMenus.Context).FullName! + "?")
- {
- Link = "repository_action_types.md#context",
- }
- },
- };
-
public static async Task Main()
{
// var ns = typeSymbol.ContainingNamespace.ToDisplayString();
// var fullClassName = $"{ns}.{className}";
- var compile = new CompileRepoM();
- var rootFolder = ThisProjectAssembly.Info.GetSolutionDirectory();
- var srcFolder = Path.Combine(rootFolder, "src");
- var docsFolderSource = Path.Combine(rootFolder, "docs_new", "mdsource");
- var docsFolder = Path.Combine(rootFolder, "docs_new");
-
- FileSystemHelper.CheckDirectory(srcFolder);
- FileSystemHelper.CheckDirectory(docsFolder);
- FileSystemHelper.CheckDirectory(Path.Combine(rootFolder, ".git"));
-
- var projects = new List
- {
- "RepoM.ActionMenu.Interface", // this is for the description of the interface types and its members.
- "RepoM.ActionMenu.Core",
-
- "RepoM.Plugin.AzureDevOps",
- "RepoM.Plugin.Clipboard",
- "RepoM.Plugin.Heidi",
- "RepoM.Plugin.LuceneQueryParser",
- "RepoM.Plugin.SonarCloud",
- "RepoM.Plugin.Statistics",
- "RepoM.Plugin.WebBrowser",
- "RepoM.Plugin.WindowsExplorerGitInfo",
- };
-
+
+ FileSystemHelper.CheckDirectoryExists(RepoMFolders.Source);
+ FileSystemHelper.CheckDirectoryExists(RepoMFolders.Documentation);
+ FileSystemHelper.CheckDirectoryExists(Path.Combine(RepoMFolders.Root, ".git"));
+
Template templateModule = await LoadTemplateAsync("Templates/ScribanModuleRegistration.scriban-cs");
Template templateDocs = await LoadTemplateAsync("Templates/DocsScriptVariables.scriban-txt");
Template templatePluginDocs = await LoadTemplateAsync("Templates/DocsPlugin.scriban-txt");
- Dictionary files = await LoadFilesAsync(rootFolder);
-
- var processedProjects = new Dictionary();
+ Dictionary snippetFiles = await LoadOldDocumentationSnippetFilesAsync();
- foreach (var project in projects)
- {
- var fullCsProjectFilename = Path.Combine(srcFolder, project, $"{project}.csproj");
- FileSystemHelper.CheckFile(fullCsProjectFilename);
+ Console.WriteLine("Compiling projects ..");
+ List processedProjects = await CompileProjectsAsync(snippetFiles);
+ Console.WriteLine(string.Empty);
- ProjectDescriptor projectDescriptor = await CompileAndExtractProjectDescription(compile, fullCsProjectFilename, project, files);
- processedProjects.Add(project, projectDescriptor);
- }
+ Console.WriteLine("Get all members from all projects");
+ Dictionary> allMemberTypes = GetAllMembersFromProjects(processedProjects);
+ Console.WriteLine(string.Empty);
- Dictionary> _allTypes2 = new();
-
- foreach ((var projectName, ProjectDescriptor project) in processedProjects)
- {
- foreach (var classDescriptor in project.ActionMenus)
- {
- if (!_allTypes2.ContainsKey(classDescriptor.Namespace + "." + classDescriptor.ClassName))
- {
- _allTypes2.Add(classDescriptor.Namespace + "." + classDescriptor.ClassName, new List());
- }
+ processedProjects.RemoveAll(p => p.ProjectName.Equals("RepoM.ActionMenu.Interface"));
- foreach (var memberDescriptor in classDescriptor.ActionMenuProperties)
- {
- _allTypes2[classDescriptor.Namespace + "." + classDescriptor.ClassName].Add(memberDescriptor);
- }
- foreach (var memberDescriptor in classDescriptor.Members)
- {
- _allTypes2[classDescriptor.Namespace + "." + classDescriptor.ClassName].Add(memberDescriptor);
- }
- }
-
- foreach (var classDescriptor in project.ActionContextMenus)
- {
- if (!_allTypes2.ContainsKey(classDescriptor.Namespace + "." + classDescriptor.ClassName))
- {
- _allTypes2.Add(classDescriptor.Namespace + "." + classDescriptor.ClassName, new List());
- }
- foreach (var memberDescriptor in classDescriptor.Members)
- {
- _allTypes2[classDescriptor.Namespace + "." + classDescriptor.ClassName].Add(memberDescriptor);
- }
- }
+ Console.WriteLine("Update member type descriptions for all projects");
+ UpdateMemberTypeDescriptions(processedProjects, allMemberTypes);
+ Console.WriteLine(string.Empty);
- foreach (var classDescriptor in project.Types)
- {
- if (!_allTypes2.ContainsKey(classDescriptor.Namespace + "." + classDescriptor.ClassName))
- {
- _allTypes2.Add(classDescriptor.Namespace + "." + classDescriptor.ClassName, new List());
- }
- foreach (var memberDescriptor in classDescriptor.Members)
- {
- _allTypes2[classDescriptor.Namespace + "." + classDescriptor.ClassName].Add(memberDescriptor);
- }
- }
- }
-
- processedProjects.Remove("RepoM.ActionMenu.Interface");
+ await GenerateOutputAsync(processedProjects, templatePluginDocs, templateDocs, templateModule);
+ }
- // Copy descriptions from if (string.IsNullOrWhiteSpace(memberDescriptor.Description) && string.IsNullOrWhiteSpace(memberDescriptor.InheritDocs))
- foreach ((var projectName, ProjectDescriptor project) in processedProjects)
+ ///
+ /// Copy descriptions from if (string.IsNullOrWhiteSpace(memberDescriptor.Description) && string.IsNullOrWhiteSpace(memberDescriptor.InheritDocs))
+ ///
+ private static void UpdateMemberTypeDescriptions(List processedProjects, Dictionary> allMemberTypes)
+ {
+ foreach (ProjectDescriptor project in processedProjects)
{
foreach (ActionMenuClassDescriptor classDescriptor in project.ActionMenus)
{
@@ -158,38 +69,60 @@ public static async Task Main()
var className = memberDescriptor.InheritDocs[..index];
var typeName = memberDescriptor.InheritDocs[(index + 1)..];
- if (_allTypes2.TryGetValue(className, out List? xxx))
+ if (!allMemberTypes.TryGetValue(className, out List? memberTypes))
{
- MemberDescriptor? matchMemberDescriptor = xxx.SingleOrDefault(x => x.CSharpName == typeName);
- if (matchMemberDescriptor != null)
- {
- memberDescriptor.Description = matchMemberDescriptor.Description;
- }
- else
- {
- Console.WriteLine("InheritDocs not found");
- }
+ throw new Exception("Cannot find Inherit docs type");
}
- else
+
+ MemberDescriptor? matchMemberDescriptor = memberTypes.SingleOrDefault(memberType => memberType.CSharpName == typeName);
+ if (matchMemberDescriptor == null)
{
- Console.WriteLine("InheritDocs not found");
+ throw new Exception("Cannot find Inherit docs type");
}
+
+ memberDescriptor.Description = matchMemberDescriptor.Description;
}
}
}
+ }
+
+ private static async Task GenerateOutputAsync(List processedProjects, Template templatePluginDocs, Template templateDocs, Template templateModule)
+ {
+ await GenerateDocumentationAsync(processedProjects, templatePluginDocs, templateDocs);
+ await GenerateCodeAsync(processedProjects, templateModule);
+ }
+
+ private static async Task GenerateCodeAsync(List processedProjects, Template templateModule)
+ {
+ // Generate module registration code in c#.
+ foreach (ProjectDescriptor project in processedProjects)
+ {
+ var fileName = Path.Combine(project.Directory, "RepoMCodeGen.generated.cs");
+
+ if (project.ActionContextMenus.Count == 0)
+ {
+ FileSystemHelper.DeleteFileIfExist(fileName);
+ continue;
+ }
+ var content = await DocumentationGenerator.GetScribanInitializersCSharpCodeAsync(project.ActionContextMenus, templateModule).ConfigureAwait(false);
+ await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
+ }
+ }
+ private static async Task GenerateDocumentationAsync(List processedProjects, Template templatePluginDocs, Template templateDocs)
+ {
// Generate plugin documentation
- foreach ((var projectName, ProjectDescriptor? project) in processedProjects)
+ foreach (ProjectDescriptor project in processedProjects)
{
if (project.IsPlugin)
{
var name = project.ProjectName.ToLowerInvariant();
- var fileName = Path.Combine(docsFolderSource, $"plugin_{name}.generated.source.md");
- var content = await DocumentationGenerator.GetPluginDocsContentAsync(project, templatePluginDocs).ConfigureAwait(false);
+ var fileName = Path.Combine(RepoMFolders.DocumentationMarkDownSource, $"plugin_{name}.generated.source.md");
+ var content = await DocumentationGenerator.GetPluginDocsContentAsync(project, templatePluginDocs, $"plugin_{name}").ConfigureAwait(false);
await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
- fileName = Path.Combine(docsFolder, $"plugin_{name}.generated.md");
+ fileName = Path.Combine(RepoMFolders.Documentation, $"plugin_{name}.generated.md");
if (!File.Exists(fileName))
{
await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
@@ -198,11 +131,11 @@ public static async Task Main()
else
{
// core
- var fileName = Path.Combine(docsFolderSource, "repom.generated.source.md");
- var content = await DocumentationGenerator.GetPluginDocsContentAsync(project, templatePluginDocs).ConfigureAwait(false);
+ var fileName = Path.Combine(RepoMFolders.DocumentationMarkDownSource, "repom.generated.source.md");
+ var content = await DocumentationGenerator.GetPluginDocsContentAsync(project, templatePluginDocs, "repom").ConfigureAwait(false);
await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
- fileName = Path.Combine(docsFolder, "repom.generated.md");
+ fileName = Path.Combine(RepoMFolders.Documentation, "repom.generated.md");
if (!File.Exists(fileName))
{
await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
@@ -211,48 +144,96 @@ public static async Task Main()
}
// Generate module site documentation
- foreach ((var projectName, ProjectDescriptor? project) in processedProjects)
+ foreach (ProjectDescriptor project in processedProjects)
{
foreach (ActionMenuContextClassDescriptor actionContextMenu in project.ActionContextMenus)
{
var name = actionContextMenu.Name.ToLowerInvariant();
- var fileName = Path.Combine(docsFolderSource, $"script_variables_{name}.generated.source.md");
+ var fileName = Path.Combine(RepoMFolders.DocumentationMarkDownSource, $"script_variables_{name}.generated.source.md");
var content = await DocumentationGenerator.GetDocsContentAsync(actionContextMenu, templateDocs).ConfigureAwait(false);
await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
- fileName = Path.Combine(docsFolder, $"script_variables_{name}.generated.md");
+ fileName = Path.Combine(RepoMFolders.Documentation, $"script_variables_{name}.generated.md");
if (!File.Exists(fileName))
{
await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
}
}
}
+ }
- // Generate module registration code in c#.
- foreach ((var projectName, ProjectDescriptor? project) in processedProjects)
+ private static Dictionary> GetAllMembersFromProjects(List processedProjects)
+ {
+ Dictionary> allMemberTypes = new();
+
+ foreach (ProjectDescriptor project in processedProjects)
{
- var fileName = Path.Combine(srcFolder, projectName, "RepoMCodeGen.generated.cs");
+ foreach (ActionMenuClassDescriptor classDescriptor in project.ActionMenus)
+ {
+ allMemberTypes.TryAdd(classDescriptor.FullName, []);
+ allMemberTypes[classDescriptor.FullName].AddRange(classDescriptor.ActionMenuProperties);
+ allMemberTypes[classDescriptor.FullName].AddRange(classDescriptor.Members);
+ }
- if (project.ActionContextMenus.Count == 0)
+ foreach (ActionMenuContextClassDescriptor classDescriptor in project.ActionContextMenus)
{
- FileSystemHelper.DeleteFileIsExist(fileName);
- continue;
+ allMemberTypes.TryAdd(classDescriptor.FullName, []);
+ allMemberTypes[classDescriptor.FullName].AddRange(classDescriptor.Members);
}
- var content = await DocumentationGenerator.GetScribanInitializersCSharpCodeAsync(project.ActionContextMenus, templateModule).ConfigureAwait(false);
- await File.WriteAllTextAsync(fileName, content).ConfigureAwait(false);
+ foreach (ModuleConfigurationClassDescriptor classDescriptor in project.ConfigurationClasses)
+ {
+ allMemberTypes.TryAdd(classDescriptor.FullName, []);
+ allMemberTypes[classDescriptor.FullName].AddRange(classDescriptor.Members);
+ }
+
+ foreach (ModuleConfigurationClassDescriptor classDescriptor in project.ConfigurationClasses)
+ {
+ allMemberTypes.TryAdd(classDescriptor.FullName, []);
+ allMemberTypes[classDescriptor.FullName].AddRange(classDescriptor.Members);
+ }
+
+ foreach (ClassDescriptor classDescriptor in project.Types)
+ {
+ allMemberTypes.TryAdd(classDescriptor.FullName, []);
+ allMemberTypes[classDescriptor.FullName].AddRange(classDescriptor.Members);
+ }
}
+
+ return allMemberTypes;
}
- public static async Task CompileAndExtractProjectDescription(CompileRepoM compile, string pathToSolution, string project, IDictionary files)
+ private static async Task> CompileProjectsAsync(Dictionary files)
+ {
+ List processedProjects = new(Constants.Projects.Count);
+ var compile = new CompileRepoM();
+
+ foreach (var project in Constants.Projects)
+ {
+ var fullCsProjectFilename = Path.Combine(RepoMFolders.Source, project, $"{project}.csproj");
+ Console.WriteLine($" - {fullCsProjectFilename} .. ");
+
+ FileSystemHelper.CheckFileExists(fullCsProjectFilename);
+
+ ProjectDescriptor projectDescriptor = await CompileAndExtractProjectDescriptionAsync(compile, fullCsProjectFilename, project, files);
+ processedProjects.Add(projectDescriptor);
+ Console.WriteLine(" done");
+ }
+
+ return processedProjects;
+ }
+
+ public static async Task CompileAndExtractProjectDescriptionAsync(CompileRepoM compile, string pathToSolution, string project, IDictionary files)
{
Compilation compilation = await compile.CompileAsync(pathToSolution, project).ConfigureAwait(false);
var projectDescriptor = new ProjectDescriptor
- {
- AssemblyName = compilation.AssemblyName ?? throw new Exception("Could not determine AssemblyName"),
- ProjectName = project,
- };
+ {
+ AssemblyName = compilation.AssemblyName ?? throw new Exception("Could not determine AssemblyName"),
+ ProjectName = project,
+ FullFilename = pathToSolution,
+ Directory = Path.GetDirectoryName(pathToSolution) ?? throw new Exception("Could not determine Directory"),
+ };
AttributeData? assemblyAttribute = compilation.Assembly.GetAttributes().SingleOrDefault(x => x.AttributeClass?.Name == nameof(PackageAttribute));
if (assemblyAttribute != null)
@@ -269,6 +250,35 @@ public static async Task CompileAndExtractProjectDescription(
return projectDescriptor;
}
+ private static Type? GetTypeFromTypeSymbol(ITypeSymbol typeSymbol)
+ {
+ var displayName = typeSymbol.ToDisplayString();
+
+ AppDomain.CurrentDomain.Load(new AssemblyName(typeSymbol.ContainingAssembly.Name));
+
+ foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
+ {
+ foreach (Type foundType in assembly.GetTypes())
+ {
+ if (foundType.FullName == displayName)
+ {
+ return foundType;
+ }
+ }
+ }
+
+ try
+ {
+ return Type.GetType(displayName);
+ }
+ catch (Exception)
+ {
+ // ignored
+ }
+
+ return null;
+ }
+
private static void ProcessProject(Compilation compilation, ProjectDescriptor projectDescriptor, IDictionary files)
{
foreach (ITypeSymbol typeSymbol in compilation.GetTypes())
@@ -281,6 +291,7 @@ private static void ProcessProject(Compilation compilation, ProjectDescriptor pr
AttributeData? obsoleteAttribute = typeSymbol.FindAttribute();
AttributeData? actionMenuContextAttribute = typeSymbol.FindAttribute();
AttributeData? repositoryActionAttribute = typeSymbol.FindAttribute();
+ AttributeData? moduleConfigurationAttribute = typeSymbol.FindAttribute();
if (actionMenuContextAttribute != null && obsoleteAttribute == null)
{
@@ -303,6 +314,16 @@ private static void ProcessProject(Compilation compilation, ProjectDescriptor pr
classDescriptor = actionMenuClassDescriptor;
}
+ else if (moduleConfigurationAttribute != null)
+ {
+ var actionMenuClassDescriptor = new ModuleConfigurationClassDescriptor
+ {
+ IsObsolete = false,
+ };
+ projectDescriptor.ConfigurationClasses.Add(actionMenuClassDescriptor);
+
+ classDescriptor = actionMenuClassDescriptor;
+ }
else
{
classDescriptor = new ClassDescriptor();
@@ -311,6 +332,7 @@ private static void ProcessProject(Compilation compilation, ProjectDescriptor pr
classDescriptor.ClassName = typeSymbol.Name;
classDescriptor.Namespace = typeSymbol.ContainingNamespace.ToDisplayString();
+ classDescriptor.DotNetType = GetTypeFromTypeSymbol(typeSymbol);
classDescriptor.Accept(docsClassVisitor);
classDescriptor.Accept(memberVisitor);
@@ -329,18 +351,18 @@ public static async Task LoadTemplateAsync(string path)
return template;
}
- private static async Task> LoadFilesAsync(string root)
+ private static async Task> LoadOldDocumentationSnippetFilesAsync()
{
- var path = Path.Combine(root, "docs", "snippets");
+ var path = Path.Combine(RepoMFolders.DocumentationOld, "snippets");
var fileNames = Directory.GetFiles(path);
var result = new Dictionary(fileNames.Length);
foreach (var file in fileNames)
{
- var f = new FileInfo(file);
+ var fi = new FileInfo(file);
var fileContent = await File.ReadAllTextAsync(file);
- result.Add(f.Name, fileContent);
+ result.Add(fi.Name, fileContent);
}
return result;
diff --git a/src/RepoM.ActionMenu.CodeGen/RepoM.ActionMenu.CodeGen.csproj b/src/RepoM.ActionMenu.CodeGen/RepoM.ActionMenu.CodeGen.csproj
index 918aae54..adf548f2 100644
--- a/src/RepoM.ActionMenu.CodeGen/RepoM.ActionMenu.CodeGen.csproj
+++ b/src/RepoM.ActionMenu.CodeGen/RepoM.ActionMenu.CodeGen.csproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ net8.0-windows
@@ -19,12 +19,23 @@
+
+
+
+
+
+
+
+
Always
+
+ Always
+
diff --git a/src/RepoM.ActionMenu.CodeGen/RepoMFolders.cs b/src/RepoM.ActionMenu.CodeGen/RepoMFolders.cs
new file mode 100644
index 00000000..b8640db0
--- /dev/null
+++ b/src/RepoM.ActionMenu.CodeGen/RepoMFolders.cs
@@ -0,0 +1,37 @@
+namespace RepoM.ActionMenu.CodeGen;
+
+using System.IO;
+using RepoM.ActionMenu.Core.TestLib.Utils;
+
+internal static class RepoMFolders
+{
+ ///
+ /// Solution directory (root of the git repository)
+ ///
+ public static readonly string Root = ThisProjectAssembly.Info.GetSolutionDirectory();
+
+ ///
+ /// Git folder (.git)
+ ///
+ public static readonly string Git = Path.Combine(Root, ".git");
+
+ ///
+ /// Source folder (src)
+ ///
+ public static readonly string Source = Path.Combine(Root, "src");
+
+ ///
+ /// Documentation folder (docs)
+ ///
+ public static readonly string Documentation = Path.Combine(Root, "docs");
+
+ ///
+ /// Old Documentation folder (docs_old)
+ ///
+ public static readonly string DocumentationOld = Path.Combine(Root, "docs_old");
+
+ ///
+ /// Markdown source folder for documentation
+ ///
+ public static readonly string DocumentationMarkDownSource = Path.Combine(Documentation, "mdsource");
+}
\ No newline at end of file
diff --git a/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt b/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt
index 5cac7806..6848a28f 100644
--- a/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt
+++ b/src/RepoM.ActionMenu.CodeGen/Templates/DocsPlugin.scriban-txt
@@ -32,16 +32,24 @@ end
{{~ end ~}}
{{~ ## include: _plugin_enable ## ~}}
-To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. When enabling or disabling a plugin, you should restart RepoM.
-
-- ProjectName: {{ write_default_when_null plugin.ProjectName }}
-- PluginName: {{ write_default_when_null plugin.PluginName }}
-- PluginDescription: {{ write_default_when_null plugin.PluginDescription }}
-- PluginMarkdownDescription: {{ write_default_when_null plugin.PluginMarkdownDescription }}
+To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
+{{~ ##
+- ProjectName: { { write_default_when_null plugin.ProjectName } }
+- PluginName: { { write_default_when_null plugin.PluginName } }
+- PluginDescription: { { write_default_when_null plugin.PluginDescription } }
+- PluginMarkdownDescription: { { write_default_when_null plugin.PluginMarkdownDescription } }
+## ~}}
{{~ else ~}}
# {{ plugin.IsPlugin ? plugin.PluginName : "RepoM Core Repository Actions" }}
{{~ end ~}}
+## Configuration
+{{~ if plugin.HasConfiguration ~}}
+{{~ include 'plugin.configuration.scriban-txt' ~}}
+{{ else }}
+This plugin has no configuration.
+{{ end ~}}
+{{~ include '30' }}
{{~ if array.size(plugin.ActionMenus) > 0 ~}}
This module contains the following methods, variables and/or constants:
{{~ for member in plugin.ActionMenus ~}}
@@ -89,4 +97,5 @@ Properties:
{{~ end ~}}
{{~ end ~}}
{{~ end ~}}
-{{~ end ~}}
\ No newline at end of file
+{{~ end ~}}
+{{ include '99' ~}}
\ No newline at end of file
diff --git a/src/RepoM.ActionMenu.CodeGen/Templates/Parts/plugin.configuration.scriban-txt b/src/RepoM.ActionMenu.CodeGen/Templates/Parts/plugin.configuration.scriban-txt
new file mode 100644
index 00000000..9390b9a0
--- /dev/null
+++ b/src/RepoM.ActionMenu.CodeGen/Templates/Parts/plugin.configuration.scriban-txt
@@ -0,0 +1,25 @@
+{{~ if !string.empty plugin.ConfigurationClasses[0].DefaultValueJson }}
+This plugin has specific configuration stored in the following directory `%APPDATA%/RepoM/Module/`. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
+
+The following default configuration is used:
+
+```json
+{{ plugin.ConfigurationClasses[0].DefaultValueJson | string.rstrip }}
+```
+{{ else }}
+Could not find the default configuration.
+{{~ end ~}}
+{{~ if !string.empty plugin.ConfigurationClasses[0].ExampleValueJson }}
+Example configuration:
+
+```json
+{{ plugin.ConfigurationClasses[0].ExampleValueJson | string.rstrip }}
+```
+{{~ end ~}}
+{{~ if array.size(plugin.ConfigurationClasses[0].Members) > 0 }}
+### Properties
+
+ {{~ for member in plugin.ConfigurationClasses[0].Members ~}}
+- `{{ member.Name ?? member.CSharpName }}`: {{ member.Description }}
+ {{~ end ~}}
+{{~ end ~}}
\ No newline at end of file
diff --git a/src/RepoM.Api/Plugins/FileBasedPackageConfiguration.cs b/src/RepoM.Api/Plugins/FileBasedPackageConfiguration.cs
index e298de8a..09389613 100644
--- a/src/RepoM.Api/Plugins/FileBasedPackageConfiguration.cs
+++ b/src/RepoM.Api/Plugins/FileBasedPackageConfiguration.cs
@@ -51,8 +51,8 @@ public async Task PersistConfigurationAsync(T configuration, int version)
return;
}
- var json = JsonConvert.SerializeObject(new ConfigEnvelope { Version = version, Settings = configuration, }, Formatting.Indented);
-
+ var json = SerializeConfiguration(configuration, version);
+
try
{
await _fileSystem.File.WriteAllTextAsync(filename, json).ConfigureAwait(false);
@@ -123,6 +123,17 @@ private string GetFilename()
return Path.Combine(_appDataPathProvider.AppDataPath, "Module", _filename + ".json");
}
+ internal static string SerializeConfiguration(T configuration, int version)
+ {
+ return JsonConvert.SerializeObject(
+ new ConfigEnvelope
+ {
+ Version = version,
+ Settings = configuration,
+ },
+ Formatting.Indented);
+ }
+
private sealed class ConfigEnvelope
{
public int? Version { get; init; }
diff --git a/src/RepoM.Core.Plugin/AssemblyInformation/PackageAttribute.cs b/src/RepoM.Core.Plugin/AssemblyInformation/PackageAttribute.cs
index cfe2cc9c..d256b519 100644
--- a/src/RepoM.Core.Plugin/AssemblyInformation/PackageAttribute.cs
+++ b/src/RepoM.Core.Plugin/AssemblyInformation/PackageAttribute.cs
@@ -16,9 +16,9 @@ public PackageAttribute(string name, string toolTip, string description)
Description = description;
}
- public string Name { get; set; }
+ public string Name { get; }
- public string ToolTip { get; set; }
+ public string ToolTip { get; }
public string Description { get; }
-}
+}
\ No newline at end of file
diff --git a/src/RepoM.Core.Plugin/ModuleConfigurationAttribute.cs b/src/RepoM.Core.Plugin/ModuleConfigurationAttribute.cs
new file mode 100644
index 00000000..a3a4dd12
--- /dev/null
+++ b/src/RepoM.Core.Plugin/ModuleConfigurationAttribute.cs
@@ -0,0 +1,18 @@
+namespace RepoM.Core.Plugin;
+
+using System;
+
+///
+/// This attribute is optional for Plugins.
+/// RepoM uses this attribute to extract module configuration objects for documentation purposes.
+///
+[AttributeUsage(AttributeTargets.Class)]
+public sealed class ModuleConfigurationAttribute : Attribute
+{
+ public ModuleConfigurationAttribute(int version)
+ {
+ Version = version;
+ }
+
+ public int Version { get; }
+}
\ No newline at end of file
diff --git a/src/RepoM.Core.Plugin/ModuleConfigurationDefaultValueFactoryMethodAttribute.cs b/src/RepoM.Core.Plugin/ModuleConfigurationDefaultValueFactoryMethodAttribute.cs
new file mode 100644
index 00000000..e75fe991
--- /dev/null
+++ b/src/RepoM.Core.Plugin/ModuleConfigurationDefaultValueFactoryMethodAttribute.cs
@@ -0,0 +1,17 @@
+namespace RepoM.Core.Plugin;
+
+using System;
+
+///
+/// This attribute is optional for Plugins.
+/// RepoM uses this attribute to create the default configuration for documentation purposes.
+///
+[AttributeUsage(AttributeTargets.Method)]
+public sealed class ModuleConfigurationDefaultValueFactoryMethodAttribute : Attribute
+{
+}
+
+[AttributeUsage(AttributeTargets.Method)]
+public sealed class ModuleConfigurationExampleValueFactoryMethodAttribute : Attribute
+{
+}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.AzureDevOps/AzureDevOpsPackage.cs b/src/RepoM.Plugin.AzureDevOps/AzureDevOpsPackage.cs
index f48ce35b..d3a7b268 100644
--- a/src/RepoM.Plugin.AzureDevOps/AzureDevOpsPackage.cs
+++ b/src/RepoM.Plugin.AzureDevOps/AzureDevOpsPackage.cs
@@ -59,8 +59,8 @@ private static void RegisterServices(Container container)
/// This method is used by reflection to generate documentation file
private static async Task PersistDefaultConfigAsync(IPackageConfiguration packageConfiguration)
{
- var config = new AzureDevopsConfigV1();
- await packageConfiguration.PersistConfigurationAsync(config, CurrentConfigVersion.VERSION).ConfigureAwait(false);
+ var config = AzureDevopsConfigV1.CreateDefault();
+ await packageConfiguration.PersistConfigurationAsync(config, AzureDevopsConfigV1.VERSION).ConfigureAwait(false);
return config;
}
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/AzureDevopsConfigV1.cs b/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/AzureDevopsConfigV1.cs
index d7b86fd5..b9eb5344 100644
--- a/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/AzureDevopsConfigV1.cs
+++ b/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/AzureDevopsConfigV1.cs
@@ -1,11 +1,16 @@
namespace RepoM.Plugin.AzureDevOps.PersistentConfiguration;
+using RepoM.Core.Plugin;
+
/// DO NOT CHANGE PROPERTYNAMES, TYPES, or VISIBILITIES
/// Module configuration (version 1)
+[ModuleConfiguration(VERSION)]
public class AzureDevopsConfigV1
{
+ internal const int VERSION = 1;
+
///
- /// Personal access token (PAT) to access Azure Devops. The PAT should be granted access to read pull requests.
+ /// Personal access token (PAT) to access Azure Devops. The PAT should be granted access to read and write pull requests.
/// To create a PAT, goto `https://dev.azure.com/[my-organisation]/_usersSettings/tokens`.
///
public string? PersonalAccessToken { get; init; }
@@ -14,4 +19,10 @@ public class AzureDevopsConfigV1
/// The base url of azure devops for your organisation (i.e. `https://dev.azure.com/[my-organisation]/`).
///
public string? BaseUrl { get; init; }
+
+ [ModuleConfigurationDefaultValueFactoryMethod]
+ internal static AzureDevopsConfigV1 CreateDefault()
+ {
+ return new AzureDevopsConfigV1();
+ }
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/CurrentVersion.cs b/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/CurrentVersion.cs
index b2cbd5f7..6f2d4a99 100644
--- a/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/CurrentVersion.cs
+++ b/src/RepoM.Plugin.AzureDevOps/PersistentConfiguration/CurrentVersion.cs
@@ -2,5 +2,5 @@ namespace RepoM.Plugin.AzureDevOps.PersistentConfiguration;
internal static class CurrentConfigVersion
{
- public const int VERSION = 1;
+ public const int VERSION = AzureDevopsConfigV1.VERSION;
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.Heidi/HeidiPackage.cs b/src/RepoM.Plugin.Heidi/HeidiPackage.cs
index ebcda387..11890150 100644
--- a/src/RepoM.Plugin.Heidi/HeidiPackage.cs
+++ b/src/RepoM.Plugin.Heidi/HeidiPackage.cs
@@ -68,8 +68,8 @@ private static void RegisterInternals(Container container)
/// This method is used by reflection to generate documentation file
private static async Task PersistDefaultConfigAsync(IPackageConfiguration packageConfiguration)
{
- var config = new HeidiConfigV1();
- await packageConfiguration.PersistConfigurationAsync(config, CurrentConfigVersion.VERSION).ConfigureAwait(false);
+ var config = HeidiConfigV1.CreateDefault();
+ await packageConfiguration.PersistConfigurationAsync(config, HeidiConfigV1.VERSION).ConfigureAwait(false);
return config;
}
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.Heidi/PersistentConfiguration/CurrentVersion.cs b/src/RepoM.Plugin.Heidi/PersistentConfiguration/CurrentVersion.cs
index dd7979d2..bd002ff0 100644
--- a/src/RepoM.Plugin.Heidi/PersistentConfiguration/CurrentVersion.cs
+++ b/src/RepoM.Plugin.Heidi/PersistentConfiguration/CurrentVersion.cs
@@ -2,5 +2,5 @@ namespace RepoM.Plugin.Heidi.PersistentConfiguration;
internal static class CurrentConfigVersion
{
- public const int VERSION = 1;
+ public const int VERSION = HeidiConfigV1.VERSION;
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.Heidi/PersistentConfiguration/HeidiConfigV1.cs b/src/RepoM.Plugin.Heidi/PersistentConfiguration/HeidiConfigV1.cs
index cbd1d0a3..f498cffd 100644
--- a/src/RepoM.Plugin.Heidi/PersistentConfiguration/HeidiConfigV1.cs
+++ b/src/RepoM.Plugin.Heidi/PersistentConfiguration/HeidiConfigV1.cs
@@ -1,9 +1,14 @@
namespace RepoM.Plugin.Heidi.PersistentConfiguration;
+using RepoM.Core.Plugin;
+
/// DO NOT CHANGE PROPERTYNAMES, TYPES, or VISIBILITIES
/// Module configuration (version 1)
+[ModuleConfiguration(VERSION)]
public class HeidiConfigV1
{
+ internal const int VERSION = 1;
+
///
/// The full directory where the portable configuration file is stored.
///
@@ -18,4 +23,21 @@ public class HeidiConfigV1
/// The full executable of Heidi.
///
public string? ExecutableFilename { get; init;}
+
+ [ModuleConfigurationDefaultValueFactoryMethod]
+ internal static HeidiConfigV1 CreateDefault()
+ {
+ return new HeidiConfigV1();
+ }
+
+ [ModuleConfigurationExampleValueFactoryMethod]
+ internal static HeidiConfigV1 CreateExample()
+ {
+ return new HeidiConfigV1
+ {
+ ConfigPath = @"C:\StandAloneProgramFiles\HeidiSQL_12.3_64_Portable",
+ ConfigFilename = "portable_settings.txt",
+ ExecutableFilename = @"C:\StandAloneProgramFiles\HeidiSQL_12.3_64_Portable\heidisql.exe",
+ };
+ }
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/CurrentVersion.cs b/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/CurrentVersion.cs
index 18d15838..d4d86f28 100644
--- a/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/CurrentVersion.cs
+++ b/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/CurrentVersion.cs
@@ -2,5 +2,5 @@ namespace RepoM.Plugin.SonarCloud.PersistentConfiguration;
internal static class CurrentConfigVersion
{
- public const int VERSION = 1;
+ public const int VERSION = SonarCloudConfigV1.VERSION;
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/SonarCloudConfigV1.cs b/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/SonarCloudConfigV1.cs
index b6b2d42d..7b148ad6 100644
--- a/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/SonarCloudConfigV1.cs
+++ b/src/RepoM.Plugin.SonarCloud/PersistentConfiguration/SonarCloudConfigV1.cs
@@ -1,9 +1,14 @@
namespace RepoM.Plugin.SonarCloud.PersistentConfiguration;
+using RepoM.Core.Plugin;
+
/// DO NOT CHANGE PROPERTYNAMES, TYPES, or VISIBILITIES
/// Module configuration (version 1)
+[ModuleConfiguration(VERSION)]
public class SonarCloudConfigV1
{
+ internal const int VERSION = 1;
+
///
/// Personal Access Token to access SonarCloud.
///
@@ -13,4 +18,14 @@ public class SonarCloudConfigV1
/// SonarCloud url. Most likely `https//sonarcloud.io`.
///
public string? BaseUrl { get; init; }
+
+ [ModuleConfigurationDefaultValueFactoryMethod]
+ internal static SonarCloudConfigV1 CreateDefault()
+ {
+ return new SonarCloudConfigV1()
+ {
+ BaseUrl = "https://sonarcloud.io",
+ PersonalAccessToken = null,
+ };
+ }
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.SonarCloud/SonarCloudPackage.cs b/src/RepoM.Plugin.SonarCloud/SonarCloudPackage.cs
index 46cd18a3..c0374559 100644
--- a/src/RepoM.Plugin.SonarCloud/SonarCloudPackage.cs
+++ b/src/RepoM.Plugin.SonarCloud/SonarCloudPackage.cs
@@ -56,12 +56,8 @@ private static void RegisterServices(Container container)
/// This method is used by reflection to generate documentation file
private static async Task PersistDefaultConfigAsync(IPackageConfiguration packageConfiguration)
{
- var config = new SonarCloudConfigV1()
- {
- BaseUrl = "https://sonarcloud.io",
- PersonalAccessToken = null,
- };
- await packageConfiguration.PersistConfigurationAsync(config, CurrentConfigVersion.VERSION).ConfigureAwait(false);
+ var config = SonarCloudConfigV1.CreateDefault();
+ await packageConfiguration.PersistConfigurationAsync(config, SonarCloudConfigV1.VERSION).ConfigureAwait(false);
return config;
}
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.Statistics/PersistentConfiguration/CurrentVersion.cs b/src/RepoM.Plugin.Statistics/PersistentConfiguration/CurrentVersion.cs
index 4055fd91..61fe1ee7 100644
--- a/src/RepoM.Plugin.Statistics/PersistentConfiguration/CurrentVersion.cs
+++ b/src/RepoM.Plugin.Statistics/PersistentConfiguration/CurrentVersion.cs
@@ -2,5 +2,5 @@ namespace RepoM.Plugin.Statistics.PersistentConfiguration;
internal static class CurrentConfigVersion
{
- public const int VERSION = 1;
+ public const int VERSION = StatisticsConfigV1.VERSION;
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.Statistics/PersistentConfiguration/StatisticsConfigV1.cs b/src/RepoM.Plugin.Statistics/PersistentConfiguration/StatisticsConfigV1.cs
index 575c0382..ad25f877 100644
--- a/src/RepoM.Plugin.Statistics/PersistentConfiguration/StatisticsConfigV1.cs
+++ b/src/RepoM.Plugin.Statistics/PersistentConfiguration/StatisticsConfigV1.cs
@@ -1,11 +1,15 @@
namespace RepoM.Plugin.Statistics.PersistentConfiguration;
using System;
+using RepoM.Core.Plugin;
/// DO NOT CHANGE PROPERTYNAMES, TYPES, or VISIBILITIES
/// Module configuration (version 1)
+[ModuleConfiguration(VERSION)]
public class StatisticsConfigV1
{
+ internal const int VERSION = 1;
+
///
/// Timespan for buffered events before making them persistant (i.e. `00:05:00` for five minutes). Must be greater then or equal to `00:00:10` (10 seconds).
///
@@ -15,4 +19,14 @@ public class StatisticsConfigV1
/// Number of days to keep statical information before deleting them.
///
public int? RetentionDays { get; init; }
+
+ [ModuleConfigurationDefaultValueFactoryMethod]
+ internal static StatisticsConfigV1 CreateDefault()
+ {
+ return new StatisticsConfigV1
+ {
+ PersistenceBuffer = TimeSpan.FromMinutes(5),
+ RetentionDays = 30,
+ };
+ }
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.Statistics/StatisticsPackage.cs b/src/RepoM.Plugin.Statistics/StatisticsPackage.cs
index 4588d18b..a6da5bb3 100644
--- a/src/RepoM.Plugin.Statistics/StatisticsPackage.cs
+++ b/src/RepoM.Plugin.Statistics/StatisticsPackage.cs
@@ -88,12 +88,8 @@ private static void RegisterInternals(Container container)
/// This method is used by reflection to generate documentation file
private static async Task PersistDefaultConfigAsync(IPackageConfiguration packageConfiguration)
{
- var config = new StatisticsConfigV1
- {
- PersistenceBuffer = TimeSpan.FromMinutes(5),
- RetentionDays = 30,
- };
- await packageConfiguration.PersistConfigurationAsync(config, CurrentConfigVersion.VERSION).ConfigureAwait(false);
+ var config = StatisticsConfigV1.CreateDefault();
+ await packageConfiguration.PersistConfigurationAsync(config, StatisticsConfigV1.VERSION).ConfigureAwait(false);
return config;
}
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/CurrentVersion.cs b/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/CurrentVersion.cs
index d72390b4..342cb715 100644
--- a/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/CurrentVersion.cs
+++ b/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/CurrentVersion.cs
@@ -2,5 +2,5 @@ namespace RepoM.Plugin.WebBrowser.PersistentConfiguration;
internal static class CurrentConfigVersion
{
- public const int VERSION = 1;
+ public const int VERSION = WebBrowserConfigV1.VERSION;
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/WebBrowserConfigV1.cs b/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/WebBrowserConfigV1.cs
index c5a72a67..a9a0e90e 100644
--- a/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/WebBrowserConfigV1.cs
+++ b/src/RepoM.Plugin.WebBrowser/PersistentConfiguration/WebBrowserConfigV1.cs
@@ -1,11 +1,15 @@
namespace RepoM.Plugin.WebBrowser.PersistentConfiguration;
using System.Collections.Generic;
+using RepoM.Core.Plugin;
/// DO NOT CHANGE PROPERTYNAMES, TYPES, or VISIBILITIES
/// Module configuration (version 1)
+[ModuleConfiguration(VERSION)]
public class WebBrowserConfigV1
{
+ internal const int VERSION = 1;
+
///
/// Dictionary of known browsers and their path to use for opening urls.
///
@@ -15,4 +19,33 @@ public class WebBrowserConfigV1
/// Profiles to use.
///
public Dictionary? Profiles { get; set; }
+
+ [ModuleConfigurationDefaultValueFactoryMethod]
+ internal static WebBrowserConfigV1 CreateDefault()
+ {
+ return new WebBrowserConfigV1
+ {
+ Browsers = null,
+ Profiles = null,
+ };
+ }
+
+ [ModuleConfigurationExampleValueFactoryMethod]
+ internal static WebBrowserConfigV1 CreateExample()
+ {
+ return new WebBrowserConfigV1
+ {
+ Browsers = new Dictionary
+ {
+ { "Edge", @"C:\PathTo\msedge.exe" },
+ { "FireFox", @"C:\PathTo\Mozilla\firefox.exe" },
+ },
+ Profiles = new Dictionary
+ {
+ { "Work", new ProfileConfig { BrowserName = "Edge", CommandLineArguments = "\"--profile-directory=Profile 4\" {url}", } },
+ { "Incognito", new ProfileConfig { BrowserName = "Edge", CommandLineArguments = "-inprivate", } },
+ { "Incognito2", new ProfileConfig { BrowserName = "FireFox", CommandLineArguments = "-inprivate {url}", } },
+ },
+ };
+ }
}
\ No newline at end of file
diff --git a/src/RepoM.Plugin.WebBrowser/WebBrowserPackage.cs b/src/RepoM.Plugin.WebBrowser/WebBrowserPackage.cs
index fbafb309..4353f300 100644
--- a/src/RepoM.Plugin.WebBrowser/WebBrowserPackage.cs
+++ b/src/RepoM.Plugin.WebBrowser/WebBrowserPackage.cs
@@ -80,38 +80,18 @@ private static void RegisterInternals(Container container)
/// This method is used by reflection to generate documentation file
private static async Task PersistDefaultConfigAsync(IPackageConfiguration packageConfiguration)
{
- var config = new WebBrowserConfigV1
- {
- Browsers = null,
- Profiles = null,
- };
-
- await packageConfiguration.PersistConfigurationAsync(config, CurrentConfigVersion.VERSION).ConfigureAwait(false);
+ var config = WebBrowserConfigV1.CreateDefault();
+ await packageConfiguration.PersistConfigurationAsync(config, WebBrowserConfigV1.VERSION).ConfigureAwait(false);
return config;
}
-
-
+
/// This method is used by reflection to generate documentation file
[UsedImplicitly]
[System.Diagnostics.CodeAnalysis.SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "Reflection")]
private static async Task PersistExampleConfigAsync(IPackageConfiguration packageConfiguration)
{
- var config = new WebBrowserConfigV1
- {
- Browsers = new Dictionary
- {
- { "Edge", "C:\\PathTo\\msedge.exe" },
- { "FireFox", "C:\\PathTo\\Mozilla\\firefox.exe" },
- },
- Profiles = new Dictionary
- {
- { "Work", new ProfileConfig { BrowserName = "Edge", CommandLineArguments = "\"--profile-directory=Profile 4\" {url}", } },
- { "Incognito", new ProfileConfig { BrowserName = "Edge", CommandLineArguments = "-inprivate", } },
- { "Incognito2", new ProfileConfig { BrowserName = "FireFox", CommandLineArguments = "-inprivate {url}", } },
- },
- };
-
- await packageConfiguration.PersistConfigurationAsync(config, CurrentConfigVersion.VERSION).ConfigureAwait(false);
+ var config = WebBrowserConfigV1.CreateExample();
+ await packageConfiguration.PersistConfigurationAsync(config, WebBrowserConfigV1.VERSION).ConfigureAwait(false);
return config;
}
}
\ No newline at end of file
diff --git a/tests/RepoM.ActionMenu.CodeGen.Tests/CompiledProjectFixture.cs b/tests/RepoM.ActionMenu.CodeGen.Tests/CompiledProjectFixture.cs
index dda9bcdc..2953af72 100644
--- a/tests/RepoM.ActionMenu.CodeGen.Tests/CompiledProjectFixture.cs
+++ b/tests/RepoM.ActionMenu.CodeGen.Tests/CompiledProjectFixture.cs
@@ -29,7 +29,7 @@ public CompiledProjectFixture()
public async Task InitializeAsync()
{
- _project = await Program.CompileAndExtractProjectDescription(
+ _project = await Program.CompileAndExtractProjectDescriptionAsync(
_compile,
_pathToSolution,
PROJECT_NAME,
diff --git a/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt b/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt
index 95d7b497..575ed33e 100644
--- a/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt
+++ b/tests/RepoM.ActionMenu.CodeGen.Tests/ProgramTests.CompileAndExtractProjectDescription_ShouldReturn_WhenValidProject.verified.txt
@@ -1,6 +1,8 @@
{
AssemblyName: RepoM.ActionMenu.CodeGenDummyLibrary,
ProjectName: RepoM.ActionMenu.CodeGenDummyLibrary,
+ FullFilename: {SolutionDirectory}tests\RepoM.ActionMenu.CodeGenDummyLibrary\RepoM.ActionMenu.CodeGenDummyLibrary.csproj,
+ Directory: {SolutionDirectory}tests\RepoM.ActionMenu.CodeGenDummyLibrary,
ActionMenus: [
{
ActionMenuProperties: [
@@ -234,6 +236,7 @@ Title will be the last part of the branchname split on `/`, so `feature/123-test
Name: dummy-abc@1,
ClassName: RepositoryActionDummyAbcV1,
Namespace: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus,
+ FullName: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.RepositoryActionDummyAbcV1,
IsEnum: false,
IsClass: true,
Description: Action menu item to create a pull request in Azure Devops.,
@@ -279,7 +282,8 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740";
Name: azure-devops-create-pr@1-scenario03
}
]
- }
+ },
+ DotNetType: RepositoryActionDummyAbcV1
}
],
ActionContextMenus: [
@@ -352,9 +356,11 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740";
Name: statistics,
ClassName: UsageVariables,
Namespace: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Context,
+ FullName: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Context.UsageVariables,
IsEnum: false,
IsClass: true,
- Description: Provides statistical information accessible through `statistics`.
+ Description: Provides statistical information accessible through `statistics`.,
+ DotNetType: UsageVariables
}
],
Types: [
@@ -407,9 +413,11 @@ devops_project_id = "805ACF64-0F06-47EC-96BF-E830895E2740";
],
ClassName: AutoCompleteOptionsV1,
Namespace: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus,
+ FullName: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.AutoCompleteOptionsV1,
IsEnum: false,
IsClass: true,
- Description: Auto complete options.
+ Description: Auto complete options.,
+ DotNetType: AutoCompleteOptionsV1
},
{
Members: [
@@ -456,15 +464,20 @@ no-fast-forward merge. The source branch is updated during the rebase operation.
],
ClassName: MergeStrategyV1,
Namespace: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus,
+ FullName: RepoM.ActionMenu.CodeGenDummyLibrary.ActionMenu.Model.ActionMenus.MergeStrategyV1,
IsEnum: true,
- IsClass: false
+ IsClass: false,
+ DotNetType: MergeStrategyV1
},
{
ClassName: ThisAssembly,
Namespace: ,
+ FullName: .ThisAssembly,
IsEnum: false,
- IsClass: true
+ IsClass: true,
+ DotNetType: ThisAssembly
}
],
- IsPlugin: false
+ IsPlugin: false,
+ HasConfiguration: false
}
\ No newline at end of file
diff --git a/tests/RepoM.ActionMenu.CodeGen.Tests/RepoM.ActionMenu.CodeGen.Tests.csproj b/tests/RepoM.ActionMenu.CodeGen.Tests/RepoM.ActionMenu.CodeGen.Tests.csproj
index 9199915d..ac2be2b4 100644
--- a/tests/RepoM.ActionMenu.CodeGen.Tests/RepoM.ActionMenu.CodeGen.Tests.csproj
+++ b/tests/RepoM.ActionMenu.CodeGen.Tests/RepoM.ActionMenu.CodeGen.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net8.0-windows
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/DocsModuleSettingsTests.cs b/tests/RepoM.Plugin.Misc.Tests/Configuration/DocsModuleSettingsTests.cs
index e133a21a..5b4acc85 100644
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/DocsModuleSettingsTests.cs
+++ b/tests/RepoM.Plugin.Misc.Tests/Configuration/DocsModuleSettingsTests.cs
@@ -5,22 +5,15 @@ namespace RepoM.Plugin.Misc.Tests.Configuration;
using System.IO.Abstractions.TestingHelpers;
using System.Linq;
using System.Reflection;
-using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging.Abstractions;
-using NuDoq;
using RepoM.Api.Plugins;
using RepoM.Core.Plugin;
using RepoM.Plugin.Misc.Tests.TestFramework;
-using RepoM.Plugin.Misc.Tests.TestFramework.NuDoc;
using VerifyTests;
using VerifyXunit;
using Xunit;
-#if !DEBUG
-using FluentAssertions;
-#endif
-
public class DocsModuleSettingsTests
{
private const string VERIFY_DIRECTORY = "ModuleSettingsDocs";
@@ -61,119 +54,12 @@ public async Task VerifyChanges()
await Verifier.Verify(results, _verifySettings);
}
- [Theory]
- [MemberData(nameof(PackagesTestData))]
- public async Task DocsModuleSettings(IPackage package)
- {
- // arrange
- var packageName = package.GetType().Name;
-
- // act
- (object? config, string? persistedConfig) = await PersistDefaultConfigAsync(package);
-
- // assert
- _verifySettings.UseTextForParameters(package.GetType().Name);
- if (config == null && persistedConfig == null)
- {
- _verifySettings.AppendContentAsFile(CreateConfigWithoutSnippetDocumentationMarkdown(), "md", "desc");
- await Verifier.Verify($"No config in {packageName}", settings: _verifySettings);
- }
- else
- {
- (_, string? examplePersistedConfig) = await PersistExampleConfigAsync(package);
-
- var builtinClassNames = new Dictionary
- {
- [config!.GetType().Name] = "config",
- };
-
-#if DEBUG
- var options = new NuDoq.ReaderOptions
- {
- KeepNewLinesInText = true,
- };
- AssemblyMembers members = DocReader.Read(config.GetType().Assembly, options);
-#else
- var members = new DocumentMembers(System.Xml.Linq.XDocument.Parse(""), Array.Empty());
-#endif
-
- var visitor = new PluginConfigurationMarkdownVisitor(builtinClassNames);
- members.Accept(visitor);
-
- var sb = new StringBuilder();
- foreach (ClassWriter classWriter in visitor.ClassWriters.OrderBy(c => c.Key).Select(c => c.Value))
- {
- var head = classWriter.Head.ToString();
- var properties = classWriter.Properties.ToString();
-
- if (string.IsNullOrWhiteSpace(head) && string.IsNullOrWhiteSpace(properties))
- {
- continue;
- }
-
- sb.AppendLine("Properties:");
- sb.AppendLine(string.Empty);
- sb.Append(classWriter.Properties);
- }
-
- var configWithSnippetDocumentationMarkdown = CreateConfigWithSnippetDocumentationMarkdown(persistedConfig, examplePersistedConfig);
-
- if (!string.IsNullOrWhiteSpace(sb.ToString()))
- {
- configWithSnippetDocumentationMarkdown += Environment.NewLine + sb;
- }
-
- _verifySettings.AppendContentAsFile(configWithSnippetDocumentationMarkdown, "md", "desc");
-
-#if DEBUG
- await Verifier.Verify(persistedConfig, settings: _verifySettings, extension: "json");
-#else
- true.Should().BeTrue(); // this test should only be run in Debug mode.
-#endif
- }
- }
-
- private static string CreateConfigWithSnippetDocumentationMarkdown(string? snippet, string? exampleSnippet = null)
- {
- StringBuilder sb = new StringBuilder()
- .AppendLine("## Configuration")
- .AppendLine(string.Empty)
- .AppendLine("This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.")
- .AppendLine(string.Empty)
- .AppendLine("The following default configuration is used:")
- .AppendLine(string.Empty)
- .AppendLine("```json")
- .AppendLine(snippet)
- .AppendLine("```");
-
- if (!string.IsNullOrWhiteSpace(exampleSnippet))
- {
- sb.AppendLine(string.Empty)
- .AppendLine("For example:")
- .AppendLine(string.Empty)
- .AppendLine("```json")
- .AppendLine(exampleSnippet)
- .AppendLine("```");
- }
-
- return sb.ToString();
- }
-
- private static string CreateConfigWithoutSnippetDocumentationMarkdown()
- {
- return new StringBuilder()
- .AppendLine("## Configuration")
- .AppendLine(string.Empty)
- .AppendLine("This module has no configuration.")
- .ToString();
- }
-
private async Task> PersistDefaultConfigAsync(IPackage package)
{
MethodInfo? methodInfo = package.GetType().GetMethod("PersistDefaultConfigAsync", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
return await PersistUsingMethodAsync(package, methodInfo).ConfigureAwait(false);
}
-
+
private async Task> PersistExampleConfigAsync(IPackage package)
{
MethodInfo? methodInfo = package.GetType().GetMethod("PersistExampleConfigAsync", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
@@ -189,7 +75,7 @@ private static string CreateConfigWithoutSnippetDocumentationMarkdown()
_fileSystem.RemoveFile("C:\\tmp\\Module\\dummy.json");
- object?[] arguments = { _fileBasedPackageConfiguration, };
+ object?[] arguments = [_fileBasedPackageConfiguration,];
var rawResult = methodInfo.Invoke(package, arguments);
var persistedContent = _fileSystem.GetFile("C:\\tmp\\Module\\dummy.json").TextContents;
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage#desc.verified.md
deleted file mode 100644
index 2881338c..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage#desc.verified.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "PersonalAccessToken": null,
- "BaseUrl": null
- }
-}
-```
-
-Properties:
-
-- `PersonalAccessToken`: Personal access token (PAT) to access Azure Devops. The PAT should be granted access to read pull requests.
-To create a PAT, goto `https://dev.azure.com/[my-organisation]/_usersSettings/tokens`.
-- `BaseUrl`: The base url of azure devops for your organisation (i.e. `https://dev.azure.com/[my-organisation]/`).
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage.verified.json b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage.verified.json
deleted file mode 100644
index 5566f298..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_AzureDevOpsPackage.verified.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Version": 1,
- "Settings": {
- "PersonalAccessToken": null,
- "BaseUrl": null
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage#desc.verified.md
deleted file mode 100644
index 2e98301f..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage#desc.verified.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Configuration
-
-This module has no configuration.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage.verified.txt b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage.verified.txt
deleted file mode 100644
index ed2a6643..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_ClipboardPackage.verified.txt
+++ /dev/null
@@ -1 +0,0 @@
-No config in ClipboardPackage
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage#desc.verified.md
deleted file mode 100644
index d1a8c6e4..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage#desc.verified.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "ConfigPath": null,
- "ConfigFilename": null,
- "ExecutableFilename": null
- }
-}
-```
-
-Properties:
-
-- `ConfigPath`: The full directory where the portable configuration file is stored.
-- `ConfigFilename`: The portable-configurration filename (without path). Most likely `portable_settings.txt`
-- `ExecutableFilename`: The full executable of Heidi.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage.verified.json b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage.verified.json
deleted file mode 100644
index 7fb19bc5..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_HeidiPackage.verified.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Version": 1,
- "Settings": {
- "ConfigPath": null,
- "ConfigFilename": null,
- "ExecutableFilename": null
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage#desc.verified.md
deleted file mode 100644
index 2e98301f..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage#desc.verified.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Configuration
-
-This module has no configuration.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage.verified.txt b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage.verified.txt
deleted file mode 100644
index b3889bb0..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_LuceneQueryParserPackage.verified.txt
+++ /dev/null
@@ -1 +0,0 @@
-No config in LuceneQueryParserPackage
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage#desc.verified.md
deleted file mode 100644
index d3bf8f0f..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage#desc.verified.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "PersonalAccessToken": null,
- "BaseUrl": "https://sonarcloud.io"
- }
-}
-```
-
-Properties:
-
-- `PersonalAccessToken`: Personal Access Token to access SonarCloud.
-- `BaseUrl`: SonarCloud url. Most likely `https//sonarcloud.io`.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage.verified.json b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage.verified.json
deleted file mode 100644
index efe51069..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_SonarCloudPackage.verified.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Version": 1,
- "Settings": {
- "PersonalAccessToken": null,
- "BaseUrl": "https://sonarcloud.io"
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage#desc.verified.md
deleted file mode 100644
index 7a554b70..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage#desc.verified.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "PersistenceBuffer": "00:05:00",
- "RetentionDays": 30
- }
-}
-```
-
-Properties:
-
-- `PersistenceBuffer`: Timespan for buffered events before making them persistant (i.e. `00:05:00` for five minutes). Must be greater then or equal to `00:00:10` (10 seconds).
-- `RetentionDays`: Number of days to keep statical information before deleting them.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage.verified.json b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage.verified.json
deleted file mode 100644
index ff77b1f0..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_StatisticsPackage.verified.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Version": 1,
- "Settings": {
- "PersistenceBuffer": "00:05:00",
- "RetentionDays": 30
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage#desc.verified.md
deleted file mode 100644
index 8122defe..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage#desc.verified.md
+++ /dev/null
@@ -1,48 +0,0 @@
-## Configuration
-
-This plugin has specific configuration stored in a separate configuration file stored in `%APPDATA%/RepoM/Module/` directory. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
-
-The following default configuration is used:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "Browsers": null,
- "Profiles": null
- }
-}
-```
-
-For example:
-
-```json
-{
- "Version": 1,
- "Settings": {
- "Browsers": {
- "Edge": "C:\\PathTo\\msedge.exe",
- "FireFox": "C:\\PathTo\\Mozilla\\firefox.exe"
- },
- "Profiles": {
- "Work": {
- "BrowserName": "Edge",
- "CommandLineArguments": "\"--profile-directory=Profile 4\" {url}"
- },
- "Incognito": {
- "BrowserName": "Edge",
- "CommandLineArguments": "-inprivate"
- },
- "Incognito2": {
- "BrowserName": "FireFox",
- "CommandLineArguments": "-inprivate {url}"
- }
- }
- }
-}
-```
-
-Properties:
-
-- `Browsers`: Dictionary of known browsers and their path to use for opening urls.
-- `Profiles`: Profiles to use.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage.verified.json b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage.verified.json
deleted file mode 100644
index 6577532a..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WebBrowserPackage.verified.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Version": 1,
- "Settings": {
- "Browsers": null,
- "Profiles": null
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage#desc.verified.md b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage#desc.verified.md
deleted file mode 100644
index 2e98301f..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage#desc.verified.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## Configuration
-
-This module has no configuration.
diff --git a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage.verified.txt b/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage.verified.txt
deleted file mode 100644
index 6bdd62e6..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/Configuration/ModuleSettingsDocs/DocsModuleSettingsTests.DocsModuleSettings_WindowsExplorerGitInfoPackage.verified.txt
+++ /dev/null
@@ -1 +0,0 @@
-No config in WindowsExplorerGitInfoPackage
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/PluginConfigurationMarkdownVisitor.cs b/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/PluginConfigurationMarkdownVisitor.cs
deleted file mode 100644
index 61a85143..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/PluginConfigurationMarkdownVisitor.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-namespace RepoM.Plugin.Misc.Tests.TestFramework.NuDoc;
-
-using NuDoq;
-using System.IO;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Reflection;
-
-internal class PluginConfigurationMarkdownVisitor : Visitor
-{
- private readonly Dictionary _builtinClassNames;
- private StringWriter _writer;
- private StringWriter _writerSummary;
-
- public PluginConfigurationMarkdownVisitor(Dictionary builtinClassNames)
- {
- _builtinClassNames = builtinClassNames;
-
- ClassWriters = new Dictionary();
- _writerSummary = new StringWriter();
- _writer = new StringWriter();
- }
-
- public Dictionary ClassWriters { get; }
-
- private bool IsBuiltinType(Type? type, [NotNullWhen(true)] out string? shortName)
- {
- shortName = null;
- if (type == null)
- {
- return false;
- }
-
- if (string.IsNullOrWhiteSpace(type.Namespace))
- {
- return false;
- }
-
- return type.Namespace.StartsWith("RepoM") && _builtinClassNames.TryGetValue(type.Name, out shortName);
- }
-
- public override void VisitMember(Member member)
- {
- if (member.Info is Type type && IsBuiltinType(type, out var shortName))
- {
- var classWriter = new ClassWriter();
- ClassWriters[shortName] = classWriter;
-
- _writer = classWriter.Head;
-
- base.VisitMember(member);
-
- _writer = classWriter.Head;
-
- _writer.WriteLine(_writerSummary);
- _writer.WriteLine();
- }
- else if (member.Info is PropertyInfo propertyInfo && IsBuiltinType(propertyInfo.DeclaringType, out shortName))
- {
- var propertyName = propertyInfo.Name;
-
- ClassWriter classWriter = ClassWriters[shortName];
-
- _writer = classWriter.Properties;
-
- base.VisitMember(member);
-
- _writer = classWriter.Properties;
-
- var summary = _writerSummary.ToString();
- _writer.WriteLine(string.IsNullOrWhiteSpace(summary)
- ? $"- `{propertyName}` (no description known)"
- : $"- `{propertyName}`: {summary}");
- }
-
- _writerSummary = new StringWriter();
- }
-
- public override void VisitSummary(Summary summary)
- {
- _writer = _writerSummary;
- base.VisitSummary(summary);
- }
-
- public override void VisitText(Text text)
- {
- _writer.Write(text.Content);
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/RepositoryActionBaseMarkdownVisitor.cs b/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/RepositoryActionBaseMarkdownVisitor.cs
deleted file mode 100644
index 7942c5b3..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/RepositoryActionBaseMarkdownVisitor.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-namespace RepoM.Plugin.Misc.Tests.TestFramework.NuDoc;
-
-using System;
-using System.IO;
-using System.Reflection;
-using NuDoq;
-
-internal class RepositoryActionBaseMarkdownVisitor : Visitor
-{
- private readonly Type _repositoryActionType;
- private StringWriter _writer;
- private StringWriter _writerSummary;
-
- public RepositoryActionBaseMarkdownVisitor(Type repositoryActionType)
- {
- _repositoryActionType = repositoryActionType;
- ClassWriter = new ClassWriter();
- _writerSummary = new StringWriter();
- _writer = new StringWriter();
- }
-
- public ClassWriter ClassWriter { get; }
-
- private bool IsBuiltinType(Type? type)
- {
- if (type == null)
- {
- return false;
- }
-
- return type == _repositoryActionType;
- }
-
- public override void VisitMember(Member member)
- {
- if (member.Info is Type type && IsBuiltinType(type))
- {
- _writer = ClassWriter.Head;
-
- base.VisitMember(member);
-
- _writer = ClassWriter.Head;
-
- _writer.WriteLine(_writerSummary);
- _writer.WriteLine();
- }
- else if (member.Info is PropertyInfo propertyInfo && IsBuiltinType(propertyInfo.DeclaringType))
- {
-
- var propertyName = propertyInfo.SanitizePropertyName();
-
- _writer = ClassWriter.Properties;
-
- base.VisitMember(member);
-
- _writer = ClassWriter.Properties;
-
- var propertyAttributes = propertyInfo.PropertyAttributesToString();
-
- var summary = _writerSummary.ToString();
- _writer.WriteLine(string.IsNullOrWhiteSpace(summary)
- ? $"- `{propertyName}` (no description known){propertyAttributes}"
- : $"- `{propertyName}`: {summary}{propertyAttributes}");
- }
-
- _writerSummary = new StringWriter();
- }
-
- public override void VisitSummary(Summary summary)
- {
- _writer = _writerSummary;
- base.VisitSummary(summary);
- }
-
- public override void VisitText(Text text)
- {
- _writer.Write(text.Content);
- }
-}
\ No newline at end of file
diff --git a/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/RepositoryActionMarkdownVisitor.cs b/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/RepositoryActionMarkdownVisitor.cs
deleted file mode 100644
index 8977f2e2..00000000
--- a/tests/RepoM.Plugin.Misc.Tests/TestFramework/NuDoc/RepositoryActionMarkdownVisitor.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-namespace RepoM.Plugin.Misc.Tests.TestFramework.NuDoc;
-
-using NuDoq;
-using System.IO;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Reflection;
-
-internal class RepositoryActionMarkdownVisitor : Visitor
-{
- private readonly Dictionary _builtinClassNames;
- private StringWriter _writer;
- private StringWriter _writerSummary;
-
- public RepositoryActionMarkdownVisitor(Dictionary builtinClassNames)
- {
- _builtinClassNames = builtinClassNames;
-
- ClassWriters = new Dictionary();
- _writerSummary = new StringWriter();
- _writer = new StringWriter();
- }
-
- public Dictionary ClassWriters { get; }
-
- private bool IsBuiltinType(Type? type, [NotNullWhen(true)] out string? shortName)
- {
- shortName = null;
- if (type == null)
- {
- return false;
- }
-
- if (string.IsNullOrWhiteSpace(type.Namespace))
- {
- return false;
- }
-
- return type.Namespace.StartsWith("RepoM") && _builtinClassNames.TryGetValue(type.Name, out shortName);
- }
-
- public override void VisitMember(Member member)
- {
- if (member.Info is Type type && IsBuiltinType(type, out var shortName))
- {
- var classWriter = new ClassWriter();
- ClassWriters[shortName] = classWriter;
-
- _writer = classWriter.Head;
-
- base.VisitMember(member);
-
- _writer = classWriter.Head;
-
- _writer.WriteLine(_writerSummary);
- _writer.WriteLine();
- }
- else if (member.Info is PropertyInfo propertyInfo && IsBuiltinType(propertyInfo.DeclaringType, out shortName))
- {
- var propertyName = propertyInfo.SanitizePropertyName();
-
- ClassWriter classWriter = ClassWriters[shortName];
-
- _writer = classWriter.Properties;
-
- base.VisitMember(member);
-
- _writer = classWriter.Properties;
-
- var propertyAttributes = propertyInfo.PropertyAttributesToString();
-
- var summary = _writerSummary.ToString();
-
- _writer.WriteLine(string.IsNullOrWhiteSpace(summary)
- ? $"- `{propertyName}` (no description known){propertyAttributes}"
- : $"- `{propertyName}`: {summary}{propertyAttributes}");
- }
-
- _writerSummary = new StringWriter();
- }
-
- public override void VisitSummary(Summary summary)
- {
- _writer = _writerSummary;
- base.VisitSummary(summary);
- }
-
- public override void VisitText(Text text)
- {
- _writer.Write(text.Content);
- }
-}
\ No newline at end of file