Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
cdc.mf.html.templates.mf-frames.stg Maven / Gradle / Ivy
delimiters "$", "$"
/* Map used to check whether a value is the empty string or not. */
isEmptyMap ::= [
"":true,
default:false
]
/* Map used to check whether a value is 0 or not. */
isZeroMap ::= [
"0":true,
default:false
]
/* Conversion of MfVisibility to display text. */
visibilityMap ::= [
"PUBLIC":"public",
"PROTECTED":"protected",
"PACKAGE":"package",
"PRIVATE":"private",
default:""
]
tipSideMap ::= [
"SOURCE":"source",
"TARGET":"target",
default:""
]
severityClassMap ::= [
"INFO":"info",
"MINOR":"minor",
"MAJOR":"major",
"CRITICAL":"critical",
"BLOCKER":"blocker",
default:""
]
ruleEnablingClassMap ::= [
"true":"enabled",
"false":"disabled",
default:""
]
ruleEnablingLabelMap ::= [
"true":"Enabled",
"false":"Disabled",
default:""
]
ruleChecksResultClassMap ::= [
"FAILED":"failed",
"PASSED":"passed",
default:""
]
ruleChecksResultLabelMap ::= [
"FAILED":"Failed",
"PASSED":"Passed",
default:""
]
rightFrame() ::= "rightFrame"
dot() ::= "."
dotdot() ::= ".."
noName() ::= "?"
generateSingleDocument(args) ::= <<
$addHead(args.model.upPath, args.model.displayName)$
$addSingleToc(args)$
$addSingleModelOverview(args)$
$addSinglePackages(args)$
$if(args.issues)$
$addSingleIssues(args)$
$endif$
$if(args.profile)$
$addSingleProfile(args)$
$endif$
$addSingleIndex(args)$
>>
addSingleToc(args) ::= <<
Table of contents
>>
addSingleTocPackage(package) ::= <<
$if(package.types)$
$addSingleTocItem(package)$
$package.allTypes: {x | $addSingleTocItem(x)$ };separator="\n"$
$else$
$addSingleTocItem(package)$
$endif$
>>
addSingleTocItem(item) ::= <<
$addItemLinkFull(item, dot(), [])$
>>
addSingleTocSectionKey(section) ::= <<
$section.key$
>>
addSingleModelOverview(args) ::= <<
$addStereotypesInline(args.model)$ $addKind(args.model)$ $addName(args.model, "model-name")$
$addMfId(args.model)$
$addItemIssues(args.model, false, dot(), [])$
$addSTD(args.model, true, true, dot(), [])$
$addImage("Overview", args.model, "model-overview-", dot())$
$addPackagesSummaryTable("Package Summary", args.model.allPackages, dot(), [])$
>>
addSinglePackages(args) ::= <<
$args.model.allPackages: {x| $addSinglePackage(x)$}; separator="\n"$
>>
addSinglePackage(package) ::= <<
$addStereotypesInline(package)$ $addKind(package)$ $addName(package, "package-name")$
$addMfId(package)$
$addItemIssues(package, false, dot(), [])$
$addHierarchy(package.parent, dot(), [])$
$addSTD(package, true, true, dot(), [])$
$addImage("Overview", package, "package-overview-", dot())$
$addConstraints(package, true, true, dot(), [])$
$addSubPackagesSummaryTable("Package Summary", package.packages, dot(), [])$
$addTypesSummaryTable("Interface Summary", "Interface", package.ownedInterfaces, dot(), [])$
$addTypesSummaryTable("Class Summary", "Class", package.ownedClasses, dot(), [])$
$addTypesSummaryTable("Enumeration Summary", "Enumeration", package.ownedEnumerations, dot(), [])$
$addSinglePackageTypes(package)$
>>
addSinglePackageTypes(package) ::= <<
$package.allTypes: {x| $addSinglePackageType(x)$}; separator="\n"$
>>
addSinglePackageType(type) ::= <<
$addStereotypesInline(type)$ $addKind(type)$ $addName(type, "type-name")$
$addTypeContent(type, dot(), [])$
>>
addSingleIssues(args) ::= <<
Issues
$addIssues(args.issues, dot(), [])$
>>
addSingleProfile(args) ::= <<
$addKind(args.profile)$ $addName(args.profile, "profile-name")$
$addProfile(args.profile, dot(), [])$
>>
addSingleIndex(args) ::= <<
Index
$args.index.sections:{ x | $addIndexSectionContent(x, x.upPath, [])$};separator="\n"$
>>
/**
* Generation of the main frame of a model.
*
* @param args The arguments.
*/
generateMainFrame(args) ::= <<
$addHead(args.model.upPath, args.model.displayName)$
>>
/**
* Generation of the frame listing all packages of a model.
*
* @param args The arguments.
*/
generateAllPackagesFrame(args) ::= <<
$addHead(args.model.upPath, [args.model.displayName, " Packages"])$
Packages
Packages
$addNavChildrenPackages(args.model)$
>>
addNavChildrenPackages(item) ::= <<
$if(item.packages)$
$item.packages: {x | $addNavPackage(x)$};separator="\n"$
$endif$
>>
addNavPackage(package) ::= <<
$if(package.packages)$$\\$
$addNavPackageLink(package)$
$addNavChildrenPackages(package)$
$\\$
$else$$\\$
$addNavPackageLink(package)$ $\\$
$endif$
>>
addNavPackageLink(package) ::= <<
$addIssuesIcon(package, ".")$ $addStereotypesInline(package)$ $package.name$
>>
/**
* Generation of the frame listing all items of a model.
*
* @param args The arguments.
* @param interfaces The list of all interfaces.
* @param classes The list of all classes.
* @param enumerations The list of all enumerations.
*/
generateAllItemsFrame(args, interfaces, classes, enumerations) ::= <<
$addHead(args.model.upPath, [args.model.displayName, " Items"])$
Items
$addNavTypes("Interfaces", interfaces, dot(), rightFrame())$
$addNavTypes("Classes", classes, dot(), rightFrame())$
$addNavTypes("Enumerations", enumerations, dot(), rightFrame())$
>>
/**
* Generation of the frame listing all items of a package.
*
* @param args The arguments.
* @param package The MfPackage.
*/
generatePackageItemsFrame(args, package) ::= <<
$addHead(package.upPath, [args.model.displayName, "/", package.displayName])$
$addA("package-overview.html", "rightFrame", package.name)$
$addNavTypes("Interfaces", package.ownedInterfaces, package.upPath, rightFrame())$
$addNavTypes("Classes", package.ownedClasses, package.upPath, rightFrame())$
$addNavTypes("Enumerations", package.ownedEnumerations, package.upPath, rightFrame())$
>>
addNavTypes(title, types, upPath, target) ::= <<
$if(types)$
$title$
$types:{ x | $addNavType(x, upPath, target)$};separator="\n"$
$endif$
>>
addNavType(type, upPath, target) ::= <<
$addLi(addItemLinkLight(type, upPath, target))$
>>
/**
* Generation of the overview frame of a model.
*
* @param args The arguments.
*/
generateModelOverviewFrame(args) ::= <<
$addHead(args.model.upPath, [args.model.displayName, " Overview"])$
$addIssuesIcon(args.model, ".")$ $addStereotypesInline(args.model)$ $addKind(args.model)$ $addName(args.model, "model-name")$
$addMfId(args.model)$
$addItemIssues(args.model, false, dot(), rightFrame())$
$addSTD(args.model, true, true, dot(), rightFrame())$
$addImage("Overview", args.model, "model-overview-", dot())$
$addPackagesSummaryTable("Package Summary", args.model.allPackages, dot(), rightFrame())$
>>
generateIssuesFrame(args) ::= <<
$addHead(args.model.upPath, [args.model.displayName, " Issues"])$
$addKind(args.snapshot)$ $addName(args.snapshot, "snapshot-name")$
$addIssues(args.issues, dot(), rightFrame())$
>>
generateProfileFrame(args) ::= <<
$addHead(args.model.upPath, [args.model.displayName, " Profile"])$
$addKind(args.profile)$ $addName(args.profile, "profile-name")$
$addProfile(args.profile, dot(), rightFrame())$
>>
/**
* Generation of the overview frame of a package.
*
* @param args The arguments.
* @param package The MfPackage.
*/
generatePackageOverviewFrame(args, package) ::= <<
$addHead(package.upPath, package.name)$
$addIssuesIcon(package, package.upPath)$ $addStereotypesInline(package)$ $addKind(package)$ $addName(package, "package-name")$
$addMfId(package)$
$addItemIssues(package, false, package.upPath, rightFrame())$
$addHierarchy(package.parent, package.upPath, rightFrame())$
$addSTD(package, true, true, package.upPath, rightFrame())$
$addImage("Overview", package, "package-overview-", package.upPath)$
$addConstraints(package, true, true, package.upPath, rightFrame())$
$addSubPackagesSummaryTable("Package Summary", package.packages, package.upPath, rightFrame())$
$addTypesSummaryTable("Interface Summary", "Interface", package.ownedInterfaces, package.upPath, rightFrame())$
$addTypesSummaryTable("Class Summary", "Class", package.ownedClasses, package.upPath, rightFrame())$
$addTypesSummaryTable("Enumeration Summary", "Enumeration", package.ownedEnumerations, package.upPath, rightFrame())$
>>
/**
* Generation of the overview frame of a type.
*
* @param args The arguments.
* @param type The MfType.
*/
generateTypeOverviewFrame(args, type) ::= <<
$addHead(type.upPath, type.displayName)$
$addIssuesIcon(type, type.upPath)$ $addVisibility(type)$$addAbstract(type)$$addStatic(type)$$addFinal(type)$$addStereotypesInline(type)$ $addKind(type)$ $addName(type, "type-name")$
$addTypeContent(type, type.upPath, rightFrame())$
>>
/**
* Generation of an index file for a particular key.
*
* @param args The arguments.
* @param section The index section.
*/
generateIndexFrame(args, section) ::= <<
$addHead(section.upPath, [section.key, "-Index"])$
Index
$args.index.sections:{ x | $addIndexSectionKey(x, section.upPath, rightFrame())$};separator="\n"$
$addIndexSectionContent(section, section.upPath, rightFrame())$
>>
addIndexSectionContent(section, upPath, target) ::= <<
$section.key$
$section.entries:{ x | $addIndexEntry(x, upPath, target)$};separator="\n"$
>>
addIndexSectionKey(section, upPath, target) ::= <<
$addA([upPath, "/index-files/index-", section.number, ".html"], target, section.key)$
>>
addIndexEntry(entry, upPath, target) ::= <<
$addKind(entry)$ $addItemLinkLight(entry, upPath, target)$
$addMfId(entry)$
>>
addTypeContent(type, upPath, target) ::= <<
$addMfId(type)$
$addItemIssues(type, false, upPath, target)$
$addHierarchy(type.parent, upPath, target)$
$addSTD(type, true, true, upPath, target)$
$addImage("Overview", type, "type-overview-", upPath)$
$addConstraints(type, true, true, upPath, target)$
$addInheritances(type, target)$
$addExtendedTypes(type, target)$
$addImplementedInterfaces(type, target)$
$addExtendedByTypes(type, target)$
$addImplementedByTypes(type, target)$
$addEnumerationValues(type, upPath, target)$
$addProperties(type, upPath, target)$
$addOperations(type, upPath, target)$
$addConnectors(type, target)$
$addReversedConnectors(type, target)$
$addUsages(type, target)$
>>
/**
* Generation of the packages summary table of a model.
*
* @param title The section title.
* @param packages The list of packages.
* @param upPath The up path.
*/
addPackagesSummaryTable(title, packages, upPath, target) ::= <<
$if(packages)$
$addSection(title, {
Package
Description
Types
$packages:{ x | $addPackageSummaryTableRow(x, upPath, target)$};separator="\n"$
})$
$endif$
>>
/**
* Generation of one row of the packages summary table.
*
* @param package The package.
* @param upPath The up path.
* @param target The frame target.
*/
addPackageSummaryTableRow(package, upPath, target) ::= <<
$indent(package, addItemLinkLight(package, upPath, target))$
$addDocumentations(package, false, false, upPath, target)$
$length(package.types)$
>>
addSubPackagesSummaryTable(title, packages, upPath, target) ::= <<
$if(packages)$
$addSection(title, {
Package
Description
Types
$packages:{x | $addSubPackageSummaryTableRow(x, upPath, target)$};separator="\n"$
})$
$endif$
>>
addSubPackageSummaryTableRow(package, upPath, target) ::= <<
$addItemLinkLight(package, upPath, target)$
$addDocumentations(package, false, false, upPath, target)$
$length(package.types)$
>>
/**
* Generation of the types summary table of a package.
*
* @param title The section title.
* @param head The name to use for the head column.
* @param types The list of types.
* @param upPath The up path.
* @param target The target frame.
*/
addTypesSummaryTable(title, head, types, upPath, target) ::= <<
$if(types)$
$addSection(title, {
$head$
Description
Properties
Operations
Usages
$types:{ x | $addTypesSummaryTableRow(x, upPath, target)$};separator="\n"$
})$
$endif$
>>
/**
* Generation of one row of a types summary table.
*
* @param type The type.
* @param upPath The up path.
*/
addTypesSummaryTableRow(type, upPath, target) ::= <<
$addItemLinkLight(type, upPath, target)$
$addDocumentations(type, false, false, upPath, target)$
$length(type.properties)$
$length(type.operations)$
$length(type.usages)$
>>
addProfile(profile, upPath, target) ::= <<
$addMetas(profile.metas)$
$addDiv("profile-description", profile.description)$
$addSection(["Rules (", length(profile.rules), ")"], {
$profile.rules:{ x | $addRule(x, upPath, target)$};separator="\n"$
})$
>>
addRule(rule, upPath, target) ::= <<
$addMfIdInline(rule)$
$rule.domain$ $rule.name$
$addRuleSeverity(rule)$
$addRuleEnabling(rule)$
$addRuleChecksResult(rule)$
$addLabels(rule.labels)$
$addMetas(rule.metas)$
$rule.description$
$if(rule.hasIssues)$
Issues ($length(rule.issues)$)
$rule.issues:{x | $addRuleIssue(x, upPath, target)$};separator="\n"$
$endif$
>>
addRuleIssue(issue, upPath, target) ::= <<
$addIssueLinkLight(issue, upPath, target)$
$addIssueLocations(issue, upPath, target)$
>>
addIssues(issues, upPath, target) ::= <<
$addSection(["Issues (", length(issues), ")"], {
$issues:{ x | $addIssue(x, upPath, target)$};separator="\n"$
})$
>>
addIssue(issue, upPath, target) ::= <<
$addMfIdInline(issue)$
$addIssueId(issue, upPath, target)$
$addParams(issue.params)$
$addSeverity(issue.severity)$
$addSpan("issue-project", issue.project)$
$addSpan("issue-snapshot", issue.snapshot)$
$addIssueLocations(issue, upPath, target)$
$addDiv("issue-description", issue.(["description(", upPath, ")"]))$
$addMetas(issue.metas)$
>>
addIssueId(issue, upPath, target) ::= <<
$addA(toIssueRuleHRef(issue, upPath), target, [addSpan("rule-domain", issue.domain), " ", addSpan("rule-name", issue.name)])$
>>
addIssueLocations(issue, upPath, target) ::= <<
$if(issue.locations)$
$issue.locations:{ x | $addLocation(x, upPath, target)$};separator="\n"$
$endif$
>>
addLocation(location, upPath, target) ::= <<
$if(location.element)$
$addA(toItemHRef(location.element, upPath), target, addLocationText(location))$
$else$
$addLocationText(location)$
$endif$
>>
addLocationText(location) ::= <<
$if(false)$
$addSpan("location-tag", location.tag)$$\\$
$addSpan("location-separator", "::")$$\\$
$endif$
$addSpan("location-path", addLocationPath(location))$$\\$
$if(location.anchor)$$\\$
$addSpan("location-separator", "::")$$\\$
$addSpan("location-anchor", location.anchor)$$\\$
$endif$
>>
addLocationPath(location) ::= <<
$if(!isZeroMap.(length(trunc(location.parts))))$$\\$
$trunc(location.parts):{ x | $addLocationPart(x, false)$};separator="/"$$\\$
/$\\$
$endif$$\\$
$addLocationPart(last(location.parts), true)$
>>
addLocationPart(part, last) ::= <<
$if(last)$$\\$
$addSpan("location-part, location-part-last", part)$$\\$
$else$$\\$
$addSpan("location-part", part)$$\\$
$endif$
>>
addMetas(metas) ::= <<
$if(!metas.empty)$
$metas.sortedMetas: { x | $addMeta(x)$};separator="\n"$
$endif$
>>
addMeta(meta) ::= <<
$addSpan("meta-name", meta.name)$ $addSpan("meta-value", meta.value)$
>>
addParams(params) ::= <<
$if(!params.empty)$
$params.sortedParams: { x | $addParam(x)$};separator="\n"$
$endif$
>>
addParam(param) ::= <<
$addSpan("param-name", param.name)$ $addSpan("param-value", param.value)$
>>
addLabels(labels) ::= <<
$if(!labels.empty)$
$labels.sorted: {x | $addLabel(x)$}; separator="\n"$
$endif$
>>
addLabel(label) ::= <<
$label$
>>
addExtendedTypes(type, target) ::= <<
$addDecoratedInheritance(type.decoratedExtends, ["All extended Types (", length(type.decoratedExtends), ")"], type.upPath, target)$
>>
addExtendedByTypes(type, target) ::= <<
$addDecoratedInheritance(type.decoratedExtended, ["All Known Specializations (", length(type.decoratedExtended), ")"], type.upPath, target)$
>>
addImplementedInterfaces(type, target) ::= <<
$addDecoratedInheritance(type.decoratedImplements, ["All Implemented Interfaces (", length(type.decoratedImplements), ")"], type.upPath, target)$
>>
addImplementedByTypes(type, target) ::= <<
$addDecoratedInheritance(type.decoratedImplemented, ["All Known Implementations (", length(type.decoratedImplemented), ")"], type.upPath, target)$
>>
addDecoratedInheritance(related, title, upPath, target) ::= <<
$if(related)$
$addSection(title, {
$related: {x | $addLi(addDecoratedItemLink(x, upPath, target))$}; separator="\n"$
$\\$
})$
$endif$
>>
addInheritances(type, target) ::= <<
$if(type.inheritances)$
$addSection(["Inheritances (", length(type.inheritances), ")"], {$type.inheritances: {x | $addInheritance(x, type.upPath, target)$}; separator="\n"$})$
$endif$
>>
addInheritance(inheritance, upPath, target) ::= <<
$addSectionEntry(
{
$addStereotypesInline(inheritance)$
$addKind(inheritance)$
$addName(inheritance, "inheritance-name")$
},
getHtmlId(inheritance, true),
{
$addMfId(inheritance)$
$addItemIssues(inheritance, false, upPath, target)$
$addSTD(inheritance, false, true, upPath, target)$
$addItemLinkLight(inheritance.generalType, upPath, target)$
}
)$
>>
addImage(title, item, prefix, upPath) ::= <<
$addSection(title, {
$if(hints.("IMG_SVG"))$
$elseif(item.([prefix, "has-cmapx"]))$
$item.([prefix, "cmapx"])$
$else$
$endif$
})$
>>
addSTD(item, top, main, upPath, target) ::= <<
$addDocumentations(item, true, main, upPath, target)$
$addItemMetas(item, top, main)$
$addTags(item, top, main, upPath, target)$
>>
addStereotypesSection(item) ::= <<
$if(item.stereotypes)$
$addSection("Stereotypes", {$item.stereotypes: {x | $addStereotype(x)$}; separator=", "$})$
$endif$
>>
addStereotypesInline(item) ::= <<
$if(item.stereotypes)$$\\$
$item.stereotypes: {x | $addStereotype(x)$}; separator=", "$$\\$
$endif$
>>
addStereotype(x) ::= "<<$x$>> "
addItemMetas(item, top, main) ::= <<
$if(item.metas)$
$if(top)$
$addSection(["Metas (", length(item.metas), ")"], {$item.metas: {x | $addItemMeta(x, main)$}; separator="\n"$})$
$else$
$item.metas: {x | $addItemMeta(x, main)$}; separator="\n"$
$endif$
$endif$
>>
addItemMeta(x, main) ::= <<
>>
/**
* @param item The issues owner.
* @param compact. If true, a compact display is used.
* @param upPath The up path.
* @param target The frame target.
*/
addItemIssues(item, compact, upPath, target) ::= <<
$if(item.issues)$
$item.issues: {x | $addItemIssue(x, compact, upPath, target)$}; separator="\n"$
$endif$
>>
/**
* @param issue The issue.
* @param compact. If true, a compact display is used.
* @param upPath The up path.
* @param target The frame target.
*/
addItemIssue(issue, compact, upPath, target) ::= <<
$addIssueId(issue, upPath, target)$
$addSeverity(issue.severity)$
$addIssueLinkFull(issue, upPath, target)$
$if(!compact)$
$addDiv("issue-description", issue.(["description(", upPath, ")"]))$
$addMetas(issue.metas)$
$endif$
>>
addIssuesIcon(element, upPath) ::= <<
$if(element.hasDeepIssues)$$\\$
⚠ $\\$
$endif$
>>
addSeverity(severity) ::= <<
$severity$
>>
addRuleSeverity(rule) ::= <<
$addSeverity(rule.severity)$
>>
addRuleEnabling(rule) ::= <<
$ruleEnablingLabelMap.(rule.enabled)$
>>
addRuleChecksResult(rule) ::= <<
$ruleChecksResultLabelMap.(rule.checksResult)$
>>
/**
* @param item The tags owner.
* @param top If true, a section is created.
* @param main If true, each tag is identified (id attribute).
* @param upPath The up path.
* @param target The frame target.
*/
addTags(item, top, main, upPath, target) ::= <<
$if(item.tags)$
$if(top)$
$addSection(["Tags (", length(item.tags), ")"], {$item.tags: {x | $addTag(x, main, upPath, target)$}; separator="\n"$})$
$else$
$item.tags: {x | $addTag(x, main, upPath, target)$}; separator="\n"$
$endif$
$endif$
>>
/**
* @param x The tag.
* @param main If true, tag is identified (id attribute).
* @param upPath The up path.
* @param target The frame target.
*/
addTag(x, main, upPath, target) ::= <<
$if(x.documentations || x.id)$$\\$
$addMfId(x)$
$addItemIssues(x, false, upPath, target)$
$addDocumentations(x, true, main, upPath, target)$
$endif$
>>
/**
* @param item The documentions owner.
* @param recurse If true, documentation children are generated.
* @param main If true, each documentation is identified (id attribute).
*/
addDocumentations(item, recurse, main, upPath, target) ::= <<
$if(item.documentations)$
$item.documentations: {x | $addDocumentation(x, recurse, main, upPath, target)$}; separator=" \n"$
$endif$
>>
/**
* @param x The documention.
* @param recurse If true, documentation children are generated.
* @param main If true, documentation is identified (id attribute).
*/
addDocumentation(x, recurse, main, upPath, target) ::= <<
$if(recurse)$
$addStereotypesInline(x)$
$endif$
$if(main)$
$addMfId(x)$
$addItemIssues(x, false, upPath, target)$
$endif$
$x.(["html(", upPath, ")"])$
$if(recurse)$
$addSTD(x, false, main, upPath, target)$
$endif$
>>
addUsages(item, target) ::= <<
$if(item.usages)$
$addSection(["Usages (", length(item.usages), ")"], {
$item.usages: {x | $addUsage(x, item.upPath, target)$}; separator="\n"$
$\\$
})$
$endif$
>>
addUsage(usage, upPath, target) ::= <<
$addItemLinkFull(usage.element, upPath, target)$ $usage.kind$ $addDirect(usage, upPath, target)$
>>
addProperties(type, upPath, target) ::= <<
$if(type.decoratedProperties)$
$addSection(["All Properties (", length(type.decoratedProperties), ")"], {$type.decoratedProperties: {x | $addDecoratedProperty(x, upPath, target)$}; separator="\n"$})$
$endif$
>>
addDecoratedProperty(decorated, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(decorated.element, upPath)$
$addVisibility(decorated.element)$
$addStatic(decorated.element)$
$addFinal(decorated.element)$
$addStereotypesInline(decorated.element)$
$addKind(decorated.element)$
$addName(decorated.element, "member-name")$
: $addRef(decorated.element.typeRef, decorated.element.parent.upPath, target)$
$addCardinality(decorated.element)$
$addDefault(decorated.element)$
$addLocal(decorated, upPath, target)$
},
getHtmlId(decorated.element, true),
{
$addMfId(decorated.element)$
$addItemIssues(decorated.element, false, upPath, target)$
$addSTD(decorated.element, false, true, upPath, target)$
$addConstraints(decorated.element, false, true, upPath, target)$
}
)$
>>
addConstraints(item, top, main, upPath, target) ::= <<
$if(item.constraints)$
$if(top)$
$addSection("Constraints", {$item.constraints: {x | $addConstraint(x, main, upPath, target)$}; separator="\n"$})$
$else$
$item.constraints: {x | $addConstraint(x, main, upPath, target)$}; separator="\n"$
$endif$
$endif$
>>
addConstraint(x, main, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(x, upPath)$
$addStereotypesInline(x)$
$addKind(x)$
$addName(x, "constraint-name")$
},
getHtmlId(x, main),
{
$addConstraintSpecification(x)$
$addConstrainedElements(x, target)$
$addMfId(x)$
$addItemIssues(x, false, upPath, target)$
$addSTD(x, false, main, upPath, target)$
}
)$
>>
addConstraintSpecification(constraint) ::= <<
$constraint.specification$
>>
addConstrainedElements(constraint, target) ::= <<
$if(constraint.constrainedElementRefs)$
$constraint.constrainedElementRefs : {x | $addRef(x, constraint.parent.upPath, target)$ }; separator="\n"$
$endif$
>>
addOperations(type, upPath, target) ::= <<
$if(type.decoratedOperations)$
$addSection(["All Operations (", length(type.decoratedOperations), ")"], {$type.decoratedOperations: {x | $addDecoratedOperation(x, upPath, target)$}; separator="\n"$})$
$endif$
>>
addDecoratedOperation(decorated, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(decorated.element, upPath)$
$addVisibility(decorated.element)$$addStatic(decorated.element)$$addAbstract(decorated.element)$$addFinal(decorated.element)$
$addStereotypesInline(decorated.element)$
$addKind(decorated.element)$
$addName(decorated.element, "member-name")$
($addSignatureParametersInline(decorated.element, target)$)$addReturnParametersInline(decorated.element, target)$
$addLocal(decorated, upPath, target)$
},
getHtmlId(decorated.element, true),
{
$addMfId(decorated.element)$
$addItemIssues(decorated.element, false, upPath, target)$
$addSTD(decorated.element, false, true, upPath, target)$
$addParametersTable(decorated.element, target)$
}
)$
>>
addSignatureParametersInline(operation, target) ::= <<
$operation.signatureParameters: {x| $addParameterInline(x, operation.parent.upPath, target)$}; separator=", "$
>>
addReturnParametersInline(operation, target) ::= <<
$if(operation.returnParameters)$
: ($operation.returnParameters: {x| $addParameterInline(x, operation.parent.upPath, target)$}; separator=", "$)
$endif$
>>
addParameterInline(param, upPath, target) ::= <<
$orElse(param.name, noName())$ : $addRef(param.typeRef, upPath, target)$
>>
addParametersTable(operation, target) ::= <<
$if(operation.parameters)$
Parameters
Parameter
Direction
Type
Description
Metas
Tags
$operation.parameters: {x| $addParametersTableRow(x, operation.parent.upPath, target)$}; separator="\n"$
$endif$
>>
addParametersTableRow(param, upPath, target) ::= <<
$addIssuesIcon(param, upPath)$
$addStereotypesInline(param)$ $orElse(param.name, noName())$
$addMfId(param)$
$addItemIssues(param, false, upPath, target)$
$addParameterDirection(param)$
$addRef(param.typeRef, upPath, target)$
$addDocumentations(param, false, true, upPath, target)$
$addItemMetas(param, false, true)$
$addTags(param, false, true, upPath, target)$
>>
addEnumerationValues(type, upPath, target) ::= <<
$if(type.mfEnumeration)$
$if(type.values)$
$addSection("Values", {$type.values: {x | $addEnumerationValue(x, upPath, target)$}; separator="\n"$})$
$endif$
$endif$
>>
addEnumerationValue(value, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(value, upPath)$
$addStereotypesInline(value)$
$addKind(value)$
$addName(value, "member-name")$
},
getHtmlId(value, true),
{
$addMfId(value)$
$addItemIssues(value, false, upPath, target)$
$addSTD(value, false, true, upPath, target)$
}
)$
>>
addConnectors(type, target) ::= <<
$if(type.decoratedConnectors)$
$addSection(["All Owned Connectors (", length(type.decoratedConnectors), ")"], {$type.decoratedConnectors: {x | $addDecoratedConnector(x, type.upPath, target)$}; separator="\n"$})$
$endif$
>>
addDecoratedConnector(decorated, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(decorated.element, upPath)$
$addStereotypesInline(decorated.element)$
$addKind(decorated.element)$
$addName(decorated.element, "connector-name")$
$addLocal(decorated, upPath, target)$
},
getHtmlId(decorated.element, true),
{
$addMfId(decorated.element)$
$addItemIssues(decorated.element, false, upPath, target)$
$addSTD(decorated.element, false, true, upPath, target)$
$addConstraints(decorated.element, false, true, upPath, target)$
$addTip(decorated.element.sourceTip, true, upPath, target)$
$addTip(decorated.element.targetTip, true, upPath, target)$
}
)$
>>
addReversedConnectors(type, target) ::= <<
$if(type.decoratedReversedConnectors)$
$addSection(["All Known Reversed Connectors (", length(type.decoratedReversedConnectors), ")"], {$type.decoratedReversedConnectors: {x | $addDecoratedReversedConnector(x, type.upPath, target)$}; separator="\n"$})$
$endif$
>>
addDecoratedReversedConnector(decorated, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(decorated.element, upPath)$
$addStereotypesInline(decorated.element)$
$addKind(decorated.element)$
$addName(decorated.element, "connector-name")$
$addLocal(decorated, upPath, target)$
},
"",
{
$addMfId(decorated.element)$
$addItemIssues(decorated.element, false, upPath, target)$
$addSTD(decorated.element, false, false, upPath, target)$
$addConstraints(decorated.element, false, false, upPath, target)$
$addTip(decorated.element.sourceTip, false, upPath, target)$
$addTip(decorated.element.targetTip, false, upPath, target)$
}
)$
>>
addTip(x, main, upPath, target) ::= <<
$addSectionEntry(
{
$addIssuesIcon(x, upPath)$
$addStereotypesInline(x)$
$addTipSide(x)$
$addKind(x)$
$addName(x, "tip-name")$
:
$addRef(x.typeRef, upPath, target)$
$addCardinality(x)$
$addOrdered(x)$
$addNavigable(x)$
},
getHtmlId(x, main),
{
$addMfId(x)$
$addItemIssues(x, false, upPath, target)$
$addSTD(x, false, main, upPath, target)$
}
)$
>>
addKind(x) ::= "$addSpan(\"kind\", x.kind)$"
addTipSide(x) ::= "$addSpan(\"tip-side\", tipSideMap.(x.side))$"
addParameterDirection(x) ::= "$addSpan(\"parameter-direction\", x.direction)$"
addName(x, class) ::= "$addSpan(class, x.displayName)$"
addAbstract(x) ::= "$if(x.abstract && x.mfClass)$$addModifier(\"abstract\")$ $endif$"
addVisibility(x) ::= "$if(x.visibility)$$addModifier(visibilityMap.(x.visibility))$ $endif$"
addStatic(x) ::= "$if(x.static)$$addModifier(\"static\")$ $endif$"
addFinal(x) ::= "$if(x.final)$$addModifier(\"final\")$ $endif$"
addCardinality(x) ::= "$if(x.cardinality)$[$x.cardinality.text$] $endif$"
addModifier(x) ::= "$addSpan(\"modifier\", x)$"
addOrdered(x) ::= "$if(x.ordered)$$addModifier(\"ordered\")$$endif$"
addNavigable(x) ::= "$if(x.navigable)$$addModifier(\"navigable\")$$else$$addModifier(\"not navigable\")$$endif$"
addDefault(x) ::= "$if(x.def)$ = $x.def$$endif$"
orElse(x, y) ::= "$if(x)$$x$$else$$y$$endif$"
addHtmlId(id, main) ::= "$if(main && id && !isEmptyMap.(id))$ id=\"$id$\"$endif$"
getHtmlId(item, main) ::= "$if(main)$$item.htmlId$$endif$"
addSpan(class, text) ::= "$text$ "
addDiv(class, content) ::= "$content$
"
addLi(item) ::= "$item$ "
addA(href, target, text) ::= <<
$text$
>>
addUl(items) ::= <<
$items:addLi();separator="\n"$
>>
addDirect(x, upPath, target) ::= <%
$if(x.direct)$
Direct
$else$
Indirect
(declared in $addItemLinkFull(x.element.parent, upPath, target)$)
$endif$
%>
addLocal(x, upPath, target) ::= <%
$if(x.direct)$
Local
$else$
Inherited
(declared in $addItemLinkFull(x.element.parent, upPath, target)$)
$endif$
%>
indent(item, text) ::= <<
$if(item.parent && !item.parent.mfModel)$
$indent(item.parent, text)$
$else$
$text$
$endif$
>>
addDecoratedItemLink(decorated, upPath, target) ::= <%
$addItemLinkLight(decorated.element, upPath, target)$ $addDirect(decorated, upPath, target)$
%>
addItemLinkLight(item, upPath, target) ::= <%
$if(item.abstract)$
$addA(toItemHRef(item, upPath), target, [addIssuesIcon(item, upPath), " ", addStereotypesInline(item), " ", item.displayName, " "])$
$else$
$addA(toItemHRef(item, upPath), target, [addIssuesIcon(item, upPath), " ", addStereotypesInline(item), " ", item.displayName])$
$endif$
%>
addItemLinkFull(item, upPath, target) ::= <%
$if(item.abstract)$
$addA(toItemHRef(item, upPath), target, [addIssuesIcon(item, upPath), " ", addStereotypesInline(item), " ", addKind(item), " ", item.displayName, " "])$
$else$
$addA(toItemHRef(item, upPath), target, [addIssuesIcon(item, upPath), " ", addStereotypesInline(item), " ", addKind(item), " ", item.displayName])$
$endif$
%>
addRef(ref, upPath, target) ::= <%
$if(ref.valid)$
$addItemLinkFull(ref.element, upPath, target)$
$elseif(ref.refQName)$
$ref.refQName$
$elseif(ref.refId)$
$ref.refId$
$else$
$noName()$
$endif$
%>
toItemHRef(item, upPath) ::= <<
$if(hints.("SINGLE_PAGE"))$$\\$
$item.itemRef$$\\$
$else$$\\$
$upPath$/$item.itemRef$$\\$
$endif$
>>
addIssueLinkFull(issue, upPath, target) ::= <<
$addA(toIssueHRef(issue, upPath), target, ["▶ ", issue.id])$
>>
addIssueLinkLight(issue, upPath, target) ::= <<
$addA(toIssueHRef(issue, upPath), target, issue.id)$
>>
toIssueHRef(issue, upPath) ::= <<
$if(hints.("SINGLE_PAGE"))$$\\$
$issue.issueRef$$\\$
$else$$\\$
$upPath$/$issue.issueRef$$\\$
$endif$
>>
toIssueRuleHRef(issue, upPath) ::= <<
$if(hints.("SINGLE_PAGE"))$$\\$
$issue.ruleRef$$\\$
$else$$\\$
$upPath$/$issue.ruleRef$$\\$
$endif$
>>
addSection(title, content) ::= <<
>>
addSectionEntry(title, id, content) ::= <<
>>
addLogo(args, upPath) ::= <<
Generated by
CDC MF - $args.configVersion$
>>
addHead(upPath, title) ::= <<
$title$
>>
addNavMenuOverview(active, upPath) ::= <<
$if(active)$
Overview
$else$
$addA([upPath, "/overview.html"], rightFrame(), "Overview")$
$endif$
>>
addNavMenuPackage(active, upPath, type) ::= <<
$if(active)$
Package
$else$
$if(type)$
$addA([upPath, "/", type.rootType.owningPackage.itemRef], rightFrame(), "Package")$
$else$
Package
$endif$
$endif$
>>
addNavMenuItem(active, upPath) ::= <<
$if(active)$
Item
$else$
Item
$endif$
>>
addNavMenuIssues(active, upPath, args) ::= <<
$if(args.issues)$
$if(active)$
Issues
$else$
$addA([upPath, "/issues.html"], rightFrame(), "Issues")$
$endif$
$endif$
>>
addNavMenuProfile(active, upPath, args) ::= <<
$if(args.profile)$
$if(active)$
Profile
$else$
$addA([upPath, "/profile.html"], rightFrame(), "Profile")$
$endif$
$endif$
>>
addNavMenuIndex(active, upPath) ::= <<
$if(active)$
Index
$else$
$addA([upPath, "/index-files/index-0.html"], rightFrame(), "Index")$
$endif$
>>
addNavAbout(args) ::= <<
>>
addMfId(item) ::= <<
$if(item.id && hints.("SHOW_IDS"))$
$addMfIdInline(item)$
$endif$
$if(item.guid && hints.("SHOW_IDS"))$
$addMfGuidInline(item)$
$endif$
>>
addMfIdInline(item) ::= <<
id $item.id$
>>
addMfGuidInline(item) ::= <<
guid $item.guid$
>>
addHierarchy(item, upPath, target) ::= <<
$addSection("Hierarchy", {
$addHierarchyRec(item.hierarchy, upPath, target)$
})$
>>
addHierarchyRec(items, upPath, target) ::= <<
$if(rest(items))$
$addItemLinkFull(first(items), upPath, target)$
$addHierarchyRec(rest(items), upPath, target)$
$\\$
$else$
$addItemLinkFull(first(items), upPath, target)$
$\\$
$endif$
>>