/// Abstract super class from which all generators
@@ -75,6 +76,7 @@ protected HandleBarsReportGenerator(ILoggerFactory loggerFactory = null) : base(
protected virtual void RegisterHelpers()
{
uml4net.HandleBars.StringHelper.RegisterStringHelper(this.Handlebars);
+ uml4net.HandleBars.IEnumerableHelper.RegisterEnumerableHelper(this.Handlebars);
uml4net.HandleBars.PropertyHelper.RegisterStructuralFeatureHelper(this.Handlebars);
uml4net.HandleBars.GeneralizationHelper.RegisterGeneralizationHelper(this.Handlebars);
uml4net.HandleBars.DocumentationHelper.RegisteredDocumentationHelper(this.Handlebars);
diff --git a/uml4net.Reporting/Templates/uml-to-html-docs.hbs b/uml4net.Reporting/Templates/uml-to-html-docs.hbs
index f3a8eb86..18457fa3 100644
--- a/uml4net.Reporting/Templates/uml-to-html-docs.hbs
+++ b/uml4net.Reporting/Templates/uml-to-html-docs.hbs
@@ -265,168 +265,245 @@
1. Enumeration Types
- {{#each this.Enumerations as | enumeration |}}
- {{enumeration.Name}}
- Definition
- {{ #RawDocumentation enumeration }}
- Enumeration Literals
-
-
-
- Name |
- Description |
-
-
-
- {{#each enumeration.OwnedLiteral as | enumerationLiteral |}}
-
- {{enumerationLiteral.Name}} |
-
- {{ #RawDocumentation enumerationLiteral }}
- |
-
- {{/each}}
-
-
- {{/each}}
+ {{ #if (IEnumerable.IsEmpty this.Enumerations) }}
+ No Enumerations have been found in the UML model
+ {{ else }}
+ {{#each this.Enumerations as | enumeration |}}
+ {{enumeration.Name}} [Enumeration]
+ Features
+
+
+
+ Name |
+ Description |
+
+
+
+
+ Fully Qualified Name |
+ {{ enumeration.QualifiedName }} |
+
+
+ Definition |
+ {{ #RawDocumentation enumeration }} |
+
+
+
+ Enumeration Literals
+
+
+
+ Name |
+ Description |
+
+
+
+ {{#each enumeration.OwnedLiteral as | enumerationLiteral |}}
+
+ {{enumerationLiteral.Name}} |
+
+ {{ #RawDocumentation enumerationLiteral }}
+ |
+
+ {{/each}}
+
+
+ {{/each}}
+ {{ /if }}
2. Primitive Types
- {{#each this.PrimitiveTypes as | primitiveType |}}
- {{primitiveType.Name}}
- Definition
- {{ #RawDocumentation primitiveType }}
- {{/each}}
+ {{ #if (IEnumerable.IsEmpty this.PrimitiveTypes) }}
+ No Primitive Types have been found in the UML model
+ {{ else }}
+ {{#each this.PrimitiveTypes as | primitiveType |}}
+ {{primitiveType.Name}} [PrimitiveType]
+ Features
+
+
+
+ Name |
+ Description |
+
+
+
+
+ Fully Qualified Name |
+ {{ primitiveType.QualifiedName }} |
+
+
+ Definition |
+ {{ #RawDocumentation primitiveType }} |
+
+
+
+ {{/each}}
+ {{ /if }}
3. Data Types
- {{#each this.DataTypes as | datatype |}}
- {{datatype.Name}}
- Definition
- {{ #RawDocumentation datatype }}
- {{/each}}
+ {{ #if (IEnumerable.IsEmpty this.DataTypes) }}
+ No Data Types (other than Enumerations and Primitive Types) have been found in the UML model
+ {{ else }}
+ {{#each this.DataTypes as | datatype |}}
+ {{datatype.Name}} [DataType]
+ Features
+
+
+
+ Name |
+ Description |
+
+
+
+
+ Fully Qualified Name |
+ {{ primitiveType.QualifiedName }} |
+
+
+ Definition |
+ {{ #RawDocumentation primitiveType }} |
+
+
+
+ {{/each}}
+ {{ /if }}
4. Classes
- {{#each this.Classes as | class |}}
-
- {{class.Name}}
- Definition
- {{ #RawDocumentation class }}
- Features
-
-
-
- Name |
- Description |
-
-
-
-
- Is Abstract |
- {{#if class.IsAbstract}} TRUE {{else}} FALSE {{/if}} |
-
-
- Generalizations |
-
- {{#each class.SuperClass as | superClass |}}
- {{superClass.Name}}
- {{/each}}
- |
-
-
- Specializations |
- TBD
-
- |
-
-
-
- Properties
-
-
-
- Name |
- Type |
- Default |
- Description |
- Inheritance |
-
-
-
- {{#each this.QueryAllProperties as | property |}}
-
- {{ property.Name }} |
-
- {{Property.QueryTypeName property}} [{{ property.Lower }}..{{ property.Upper }}]
- {{#if property.IsDerived }} {derived} {{/if}}
- {{#if (Property.QueryIsContainment property) }} {composite} {{/if}}
- |
- {{ property.DefaultValueLiteral }} |
- {{ #RawDocumentation property }} |
- {{property.Owner.Name}} |
-
- {{/each}}
-
-
- {{/each}}
-
-
+ {{ #if (IEnumerable.IsEmpty this.Classes) }}
+ No Classes have been found in the UML model
+ {{ else }}
+ {{#each this.Classes as | class |}}
+ {{class.Name}} [Class]
+ Features
+
+
+
+ Name |
+ Description |
+
+
+
+
+ Fully Qualified Name |
+ {{ class.QualifiedName }} |
+
+
+ Definition |
+ {{ #RawDocumentation class }} |
+
+
+ Is Abstract |
+ {{#if class.IsAbstract}} TRUE {{else}} FALSE {{/if}} |
+
+
+ Generalizations |
+
+ {{#each class.SuperClass as | superClass |}}
+ {{superClass.Name}}
+ {{/each}}
+ |
+
+
+ Specializations |
+ TBD
+
+ |
+
+
+
+ Properties
+
+
+
+ Name |
+ Type |
+ Default |
+ Description |
+ Inheritance |
+
+
+
+ {{#each this.QueryAllProperties as | property |}}
+
+ {{ property.Name }} |
+
+ {{Property.QueryTypeName property}} [{{ property.Lower }}..{{ property.Upper }}]
+ {{#if property.IsDerived }} {derived} {{/if}}
+ {{#if (Property.QueryIsContainment property) }} {composite} {{/if}}
+ |
+ {{ property.DefaultValueLiteral }} |
+ {{ #RawDocumentation property }} |
+ {{property.Owner.Name}} |
+
+ {{/each}}
+
+
+ {{/each}}
+ {{ /if }}
4. Interfaces
- {{#each this.Interfaces as | interface |}}
-
- {{interface.Name}}
- Definition
- {{ #RawDocumentation interface }}
- Features
-
-
-
- Name |
- Description |
-
-
-
-
- Generalizations |
-
- {{#each interface.ESuperTypes as | superInterface |}}
- {{superInterface.Name}}
- {{/each}}
- |
-
-
-
- Properties
-
-
-
- Name |
- Type |
- Default |
- Description |
- Inheritance |
-
-
-
- {{#each this.QueryAllProperties as | property |}}
-
- {{ property.Name }} |
-
- {{Property.QueryTypeName property}} [{{ property.Lower }}..{{ property.Upper }}]
- {{#if property.IsDerived }} {derived} {{/if}}
- {{#if (Property.QueryIsContainment property) }} {composite} {{/if}}
- |
- {{ property.DefaultValueLiteral }} |
- {{ #RawDocumentation property }} |
- {{property.Owner.Name}} |
-
- {{/each}}
-
-
- {{/each}}
+ {{ #if (IEnumerable.IsEmpty this.Interfaces) }}
+ No Interfaces have been found in the UML model
+ {{ else }}
+ {{#each this.Interfaces as | interface |}}
+ {{interface.Name}} [Interface]
+ Definition
+ {{ #RawDocumentation interface }}
+ Features
+
+
+
+ Name |
+ Description |
+
+
+
+
+ Fully Qualified Name |
+ {{ interface.QualifiedName }} |
+
+
+ Generalizations |
+
+ {{#each interface.ESuperTypes as | superInterface |}}
+ {{superInterface.Name}}
+ {{/each}}
+ |
+
+
+
+ Properties
+
+
+
+ Name |
+ Type |
+ Default |
+ Description |
+ Inheritance |
+
+
+
+ {{#each this.QueryAllProperties as | property |}}
+
+ {{ property.Name }} |
+
+ {{Property.QueryTypeName property}} [{{ property.Lower }}..{{ property.Upper }}]
+ {{#if property.IsDerived }} {derived} {{/if}}
+ {{#if (Property.QueryIsContainment property) }} {composite} {{/if}}
+ |
+ {{ property.DefaultValueLiteral }} |
+ {{ #RawDocumentation property }} |
+ {{property.Owner.Name}} |
+
+ {{/each}}
+
+
+ {{/each}}
+ {{ /if }}