The elements annotated with __ctrlFlow(enable=false) (deadEnd property) or enable=false with literal boolean assignments are not parsed in server/src/parser/parser.ts.
let childInputs =
this.enable === false || this.deadEnd
? []
: typeInputs[this.type]?.inputs || [];
This must be changed because these elements (such as cfg in Buildings.Templates.AirHandlersFans.Interfaces.PartialAirHandler) may contain parameters used in bindings for, e.g, enable annotations.
The dead end logic should be moved to the client interpreter.
If any parent in the instance tree is disabled, the declaration must not be displayed.
⚠️ This change is expected to significantly increase the runtime of npm run parseTemplateJSON (e.g., medium elements are currently not parsed due to this annotation). The impact must be evaluated when addressing the issue.
[EDIT]
- "Elements annotated
__ctrlFlow(enable=false) are not parsed" is imprecise: the type of a dead-ended component is still loaded and recursively walked. Likewise LongClass.getInputs() calls getInputs on every element including dead-ended ones. So all entries land in the options; what gets pruned is only the reference lists, which means that these entries are all included but not reachable (any reference to it will fail to resolve).
- Medium classes are currently not parsed for another reason. First, the
__ctrlFlow(enable=false) annotation logic is not implemented for short classes. So the aliased medium package should be parsed. The reason it's not is a gap in modelica-json that doesn't create JSON files for the classes aliased by short classes.
The elements annotated with
__ctrlFlow(enable=false)(deadEndproperty) orenable=falsewith literal boolean assignments are not parsed in server/src/parser/parser.ts.This must be changed because these elements (such as
cfginBuildings.Templates.AirHandlersFans.Interfaces.PartialAirHandler) may contain parameters used in bindings for, e.g,enableannotations.The dead end logic should be moved to the client interpreter.
If any parent in the instance tree is disabled, the declaration must not be displayed.
npm run parseTemplateJSON(e.g., medium elements are currently not parsed due to this annotation). The impact must be evaluated when addressing the issue.[EDIT]
__ctrlFlow(enable=false)are not parsed" is imprecise: the type of a dead-ended component is still loaded and recursively walked. LikewiseLongClass.getInputs()callsgetInputson every element including dead-ended ones. So all entries land in the options; what gets pruned is only the reference lists, which means that these entries are all included but not reachable (any reference to it will fail to resolve).__ctrlFlow(enable=false)annotation logic is not implemented for short classes. So the aliased medium package should be parsed. The reason it's not is a gap in modelica-json that doesn't create JSON files for the classes aliased by short classes.