Skip to content
Permalink
Browse files

Error-trace variable filtering only works for one state - #386

- Fixing regression introduced with a3c4329
- Providing RCPTT test

#386
[Regression][Toolbox]
  • Loading branch information...
quaeler committed Nov 4, 2019
1 parent e376574 commit 4cddc0896e76c29e37b4856059cac8a82e8158e5
@@ -6,7 +6,7 @@ Element-Version: 3.0
External-Reference:
Id: _BbLbgO0TEemu8qbF8JrHog
Runtime-Version: 2.4.0.201902010011
Save-Time: 10/14/19, 11:30 AM
Save-Time: 11/4/19, 9:49 AM
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
@@ -74,6 +74,20 @@ try -command {
}
}
}


// The following is testing for regressions like the one behind Issue 386, which is, sadly, a regression due to 372.
get-view $TLA-VIEW-TLC-ERRORS | get-section $TLA-MO-ED-TLCERRORS-SECTION-ET
| get-button "Click to select variables and expressions to omit from the trace display; ALT-click on an individual item below to omit it immediately."
| click
with [ get-window "Error Trace Filter" ] {
get-table | get-item -path " b" | check
get-button "OK" | click
}
with [get-view $TLA-VIEW-TLC-ERRORS | get-section $TLA-MO-ED-TLCERRORS-SECTION-ET | get-tree] {
get-object | invoke getItem 0 | invoke getItem 0 | invoke getText 0 | str | equals " c" | verify-true
get-object | invoke getItem 1 | invoke getItem 0 | invoke getText 0 | str | equals " b" | verify-false
}
} -finally {
DeleteSpecNew
}
@@ -838,8 +838,18 @@ private void performVariableViewPopulation(final EnumSet<FilterType> filters) {
// so we do this clone and filter of the input data.
for (final TLCState filteredState : filtered.getStates(TLCError.Length.ALL)) {
final List<TLCVariable> variables = filteredState.getVariablesAsList();
final ArrayList<TLCVariable> removals = new ArrayList<>();

variables.removeAll(currentErrorTraceFilterSet);
for (final TLCVariable variable : variables) {
for (final TLCVariable filterVariable : currentErrorTraceFilterSet) {
if (filterVariable.representsTheSameAs(variable)) {
removals.add(variable);
break;
}
}
}

variables.removeAll(removals);
}
}

@@ -923,7 +933,7 @@ public void run() {
private static final String SELECTED_TOOL_TIP_TEXT = "Click to display all variables and expressions.";

FilterErrorTrace() {
super("Filter the displayed variables and expressions..", AS_CHECK_BOX);
super("Filter the displayed variables and expressions", AS_CHECK_BOX);

final ImageDescriptor id = TLCUIActivator.getImageDescriptor("icons/elcl16/trace_filter.png");
setImageDescriptor(id);

0 comments on commit 4cddc08

Please sign in to comment.
You can’t perform that action at this time.