public void setScope(int idx, @NotNull NamedScope namedScope) {
    if (myTools != null && myTools.size() > idx && idx >= 0) {
      ScopeToolState scopeToolState = myTools.get(idx);
      InspectionToolWrapper<?,?> toolWrapper = scopeToolState.getTool();
      myTools.remove(idx);
      myTools.add(idx, new ScopeToolState(namedScope, toolWrapper, scopeToolState.isEnabled(), scopeToolState.getLevel()));
    }
  }
public void setScope(int idx, @NotNull NamedScope namedScope)