private void reloadScopes() {
    UIUtil.invokeLaterIfNeeded(() -> {
      if (getProject().isDisposed()) {
        return;
      }

      List<Pair<NamedScope, NamedScopesHolder>> scopeList = new ArrayList<>();
      addScopesToList(scopeList, this);
      addScopesToList(scopeList, myNamedScopeManager);
      myScopePairs.clear();
      myScopePairs.addAll(scopeList);

      Element element = new Element("rules_2_reload");
      writeRules(element, myState);
      State state = new State();
      readRules(element, state);
      myState = state;
    });
  }
private void reloadScopes()