AToMPM / AToMPM/atompm

getAllNodes Should Return Subclass Nodes

Open
#91 0 comments 0 reactions 0 assignees View on GitHub
compat-breaking enhancement
Dominant language
JavaScript
Stars
25
Forks
15
PR merge metrics
No merged PRs in 30d

Description

1. Create metamodel with A and B, B inherits from A
2. Create a model with A's and B's
3. Write a rule and have getAllNodes('A') in the LHS condition
4. Observe that the B nodes are not returned.

Reason: In mmmk.js, lines 692-705, the '$type' of the node is directly matched against.

Proposal: getAllNodes should be extended with an extra boolean parameter 'includeSubclasses' which then instructs the function to include the sub class nodes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in mmmk.js around lines 692-705 and reproduce the reported metamodel/model setup with A and subclass B. Trace how getAllNodes('A') matches node types, then verify that the optional includeSubclasses behavior returns both A and B nodes while preserving the existing behavior when it is not enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.