You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command ultimately returns a list of files that contain the unique string.
184
-
185
-
Each of these file paths then get 'loaded' in [parser.ts](./parser.ts) into a `File` instance, which starts the process of consuming modelica JSON and generating various types of parse `Element`s.
182
+
All template classes, and all packages between the root package and the template classes
183
+
are considered as "entry points" and added to the `templateNodes` array of [loader.ts](./loader.ts).
184
+
This means that the class URI ultimately dictates the explorer tree structure,
185
+
starting from the "root" package which must be unique inside a library.
186
186
187
+
Based on their URIs, the entry points are loaded in [parser.ts](./parser.ts) into
188
+
`File` instances, which starts the process of consuming modelica JSON and generating
189
+
various types of parsed `Element`s.
187
190
188
191
### Type Store
189
192
During the process of creating `Element`s, each element gets registered to a typestore using the modelica path.
@@ -215,23 +218,6 @@ Currently data is NOT being pulled in from the Modelica Standard Library. A simp
215
218
It is likely a good idea to try and separate out 'Modifier' like objects that have a modelicaPath vs. those that do not. `redeclare` and `final` only relate to modifiers that have a `modelicaPath`.
216
219
217
220
### Template Entry Points
218
-
219
-
The current approach is a simplistic and not very flexible. A more robust approach has been discussed:
220
-
221
-
- Use a flag indicating that a package (in our case Buildings.Templates) is to be considered as the "root" for all template URIs, for instance:
222
-
__ctrlFlow(routing="root")
223
-
- For each template class (for instance Buildings.Templates.AirHandlersFans.VAVMultiZone):
224
-
__ctrlFlow(routing="template")
225
-
226
-
227
-
>The contract for the template developer will then be that the class URI dictates the explorer tree structure, starting from the "root" package (necessarily unique inside a library).
228
-
So for instance the template Buildings.Templates.AirHandlersFans.VAVMultiZone with the above annotation would yield the following tree structure:
229
-
>
230
-
>AirHandlersFans
231
-
>
232
-
>└── VAVMultiZone
233
-
>
234
-
>Without having to add any annotation to the subpackage Buildings.Templates.AirHandlersFans.
235
-
```
236
-
237
-
To implement this, the grep command can continue to be used (by changing the template identifier), however the process for finding subpackages would need to be tweaked a bit in the parser since they are not explicitly listed from the grep command.
221
+
The UI doesn't currently support multiple subpackages. Therefore, only the
222
+
parent package of each template class is used to generate the tree structure in the UI.
223
+
See the function `_extractSystemTypes` in [template.ts](./template.ts).
0 commit comments