void (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())); } }