AccessToken (@NotNull @NonNls String sectionName) { if (!EDT.isCurrentThreadEdt()) { return AccessToken.EMPTY_ACCESS_TOKEN; } FList<String> prev = ourStack; ourStack = prev.prepend(sectionName); return new AccessToken() { @Override public void finish() { //noinspection AssignmentToStaticFieldFromInstanceMethod ourStack = prev; } }; }