private boolean walkChildren(@NotNull PsiScopeProcessor processor,
                               @NotNull ResolveState state,
                               PsiElement lastParent,
                               @NotNull PsiElement place) {
    if (!(getParent() instanceof PsiSwitchBlock)) {
      return PsiScopesUtil.walkChildrenScopes(this, processor, state, lastParent, place);
    }
    PsiElement child = null;
    if (lastParent != null && lastParent.getParent() == this) {
      child = lastParent.getPrevSibling();
      if (child == null) return true; // first element
    }

    if (child == null) {
      child = ((PsiElement)this).getLastChild();
    }

    while (child != null) {
      if (child instanceof PsiSwitchLabelStatementBase) {
        state = PatternResolveState.WHEN_NONE.putInto(state);
      }
      if (!child.processDeclarations(processor, state, null, place)) return false;
      child = child.getPrevSibling();
    }
    return true;
  }
private boolean walkChildren(@NotNull PsiScopeProcessor processor,
                               @NotNull ResolveState state,
                               PsiElement lastParent,
                               @NotNull PsiElement place)