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 -``` - -![Screenshot](HeidiSQL.png) -![Screenshot](HeidiInRepoM.png) - -## 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. - -![Screenshot](https://raw.githubusercontent.com/awaescher/RepoZ/master/_doc/RepoZ-ReadMe-Explorer.png) - -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'. - -![Enabled plugin](EnablePlugin.png) - -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: ``` ![Screenshot](HeidiSQL.png) -![Screenshot](HeidiInRepoM.png) - -include: _plugins.heidi.action +![Screenshot](HeidiInRepoM.png) \ 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 +``` + +![Screenshot](HeidiSQL.png) +![Screenshot](HeidiInRepoM.png) 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 @@ +![Screenshot](RepoZ-ReadMe-Explorer.png) + +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. + +![Screenshot](RepoZ-ReadMe-Explorer.png) + +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 +``` + +![Screenshot](HeidiSQL.png) +![Screenshot](HeidiInRepoM.png) 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. -![Screenshot](https://raw.githubusercontent.com/awaescher/RepoZ/master/_doc/RepoZ-ReadMe-Explorer.png) +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 +![Screenshot](RepoZ-ReadMe-Explorer.png) -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