- try {
- for (int quark : ss.getSubAttributes(parentQuark, false)) {
- if (quark >= fullState.size()) {
- // attribute was created after the full state query
- continue;
- }
- ITmfStateInterval interval = fullState.get(quark);
- StateEntry stateEntry = findStateEntry(parent, quark);
- if (stateEntry == null) {
- boolean modified = fFilterStatus ?
- interval.getStartTime() == timestamp :
- !interval.getStateValue().isNull();
- stateEntry = new StateEntry(ss.getAttributeName(quark), quark, ss.getFullAttributePath(quark),
- interval.getStateValue(),
- TmfTimestamp.fromNanos(interval.getStartTime()),
- TmfTimestamp.fromNanos(interval.getEndTime()),
- modified);
-
- // update children first to know if parent is really needed
- updateStateEntries(ss, fullState, stateEntry, quark, timestamp);
-
- /*
- * Add this entry to parent if filtering is off, or
- * if the entry has children to display, or
- * if there is a state change at the current timestamp
- */
- if (!fFilterStatus || stateEntry.hasChildren() || interval.getStartTime() == timestamp) {
- parent.addChild(stateEntry);
- changed = true;
- }
- } else {
- stateEntry.update(interval.getStateValue(),
- TmfTimestamp.fromNanos(interval.getStartTime()),
- TmfTimestamp.fromNanos(interval.getEndTime()));
+ for (int quark : ss.getSubAttributes(parentQuark, false)) {
+ if (quark >= fullState.size()) {
+ // attribute was created after the full state query
+ continue;
+ }
+ ITmfStateInterval interval = fullState.get(quark);
+ StateEntry stateEntry = findStateEntry(parent, quark);
+ if (stateEntry == null) {
+ boolean modified = fFilterStatus ?
+ interval.getStartTime() == timestamp :
+ !interval.getStateValue().isNull();
+ stateEntry = new StateEntry(ss.getAttributeName(quark), quark, ss.getFullAttributePath(quark),
+ interval.getStateValue(),
+ TmfTimestamp.fromNanos(interval.getStartTime()),
+ TmfTimestamp.fromNanos(interval.getEndTime()),
+ modified);
+
+ // update children first to know if parent is really needed
+ updateStateEntries(ss, fullState, stateEntry, quark, timestamp);