[Feature] Generate a single combined report across multiple .ecore files#113
Merged
Conversation
Add ReportGenerator.LoadRootPackages(FileInfo/DirectoryInfo) and an aggregate CreateHandlebarsPayload(IReadOnlyList<EPackage>) so a single HTML, Markdown, Excel or inspection report can document a whole multi-file metamodel. Each generator gains GenerateCombinedReport overloads (entry + reachable, and directory-wide) while the existing single-file behaviour is unchanged.
…ommands When set, the report handler produces a single combined report that also includes every cross-referenced .ecore model reachable from the input model.
…d inspection Add combined-report tests against the Capella metamodel (directory-wide and entry-reachable), a CLI -r handler test and null-guard tests for the new GenerateCombinedReport overloads. fixes #89
…the CLI Promote GenerateCombinedReport(DirectoryInfo, FileInfo) to IReportGenerator so the report handler can produce a directory-wide combined report polymorphically, and implement it on the model inspector. Add the -d/--input-directory option (input-model is no longer required) and route directory -> combined-directory, -r -> entry-reachable, otherwise single-file, validating that the directory exists. Covered by CLI handler tests.
Member
Author
|
Added CLI directory mode (follow-up commit): the combined report can now be driven from the command line.
To make this polymorphic across all report types, |
Mirror CapellaHtmlReportGeneratorTestFixture for Markdown and Excel: a per-file report over all 21 Capella files plus a single combined report of the whole metamodel (and an entry-reachable combined report). Move the Capella combined-report assertions out of the generic Markdown/Excel fixtures to avoid duplication; the generic fixtures keep their recipe content and null-guard tests.
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds the ability to generate a single report (HTML, Markdown, Excel or model-inspection) that documents a multi-file Ecore metamodel, rather than one report per input file (fixes #89). The existing single-file behaviour is unchanged.
What is delivered
ReportGenerator):LoadRootPackages(FileInfo)(entry model plus every cross-referenced model reachable from it) andLoadRootPackages(DirectoryInfo)(every.ecorein a folder), both returning the rootEPackageof every resource in oneResourceSet.HandleBarsReportGenerator):CreateHandlebarsPayload(IReadOnlyList<EPackage>)aggregates enums, primitive/other data types, classes and interfaces across all root packages; the single-package overload delegates to it.GenerateCombinedReport(...)overloads onHtmlReportGenerator,MarkdownReportGenerator,XlReportGeneratorandModelInspector— both the entry-reachable (FileInfo) and directory-wide (DirectoryInfo) shapes. The Excel info sheet gains an "Included Packages" row.IReportGenerator.GenerateCombinedReport(FileInfo, FileInfo)(drives the CLI polymorphically) plus format-specific directory/string overloads.--include-referenced-models/-ron every report command; when set the handler callsGenerateCombinedReportinstead ofGenerateReport.Design notes
EPackage.QueryPackages()returns each root plus its containment subtree, and the file roots are disjoint, so there is no double counting.ResourceSet); the Overloaded EOperations produce duplicate cache keys; loading EMF's own Ecore.ecore crashes with ArgumentException #96/[Feature] Bring the HTML report generator to parity with uml4net #112 anchor scheme keeps anchors unique across files so intra-document links work in the combined HTML report.-rflag exposes.Testing
dotnet test EcoreNetto.sln): 338 tests..ecorefiles; plus entry-reachable tests, a CLI-rhandler test and null-guard tests.Acceptance criteria