Skip to content

Commit

Permalink
ctf.core: Set parent/child in data stream and event record nodes
Browse files Browse the repository at this point in the history
Set the parent/child relationships of the immediate children of
JsonDataStreamMetadataNode and JsonEventRecordMetadataNode during their
initialization.

[Fixed] Set parent/child in data stream and event record nodes

Change-Id: I9374b49588aef38b518e8fb14915abbda65b316a
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/204822
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
PatrickTasse committed Oct 10, 2023
1 parent bc785ee commit 01c87e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,18 @@ public void initialize() throws CTFException {
super.initialize();
if (fPacketContextFieldClass != null) {
fPacketContextFieldClass.initialize();
addChild(fPacketContextFieldClass);
fPacketContextFieldClass.setParent(this);
}
if (fEventRecordCommonContextClass != null) {
fEventRecordCommonContextClass.initialize();
addChild(fEventRecordCommonContextClass);
fEventRecordCommonContextClass.setParent(this);
}
if (fEventRecordHeaderClass != null) {
fEventRecordHeaderClass.initialize();
addChild(fEventRecordHeaderClass);
fEventRecordHeaderClass.setParent(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ public void initialize() throws CTFException {
super.initialize();
if (fSpecificContextClass != null) {
fSpecificContextClass.initialize();
addChild(fSpecificContextClass);
fSpecificContextClass.setParent(this);
}
if (fPayloadFieldClass != null) {
fPayloadFieldClass.initialize();
addChild(fPayloadFieldClass);
fPayloadFieldClass.setParent(this);
}
}
}

0 comments on commit 01c87e9

Please sign in to comment.