void changeToolsOrder(@NotNull List<String> scopesOrder) {
    if (myTools != null) {
      myTools.sort((scope1, scope2) -> {
        int key1 = scopesOrder.indexOf(scope1.getScopeName());
        int key2 = scopesOrder.indexOf(scope2.getScopeName());

        if (key1 == -1 && key2 == -1) return scope1.getScopeName().compareTo(scope2.getScopeName());
        return Integer.compare(key1, key2);
      });
    }
  }
void changeToolsOrder(@NotNull List<String> scopesOrder)