private static boolean searchReferencesAndProcessAssignmentTarget(@NotNull PsiElement element,
                                                                    final @Nullable PsiElement context,
                                                                    @NotNull JavaSliceUsage parent,
                                                                    @NotNull Processor<? super SliceUsage> processor) {
    return ReferencesSearch.search(element).forEach(reference -> {
      PsiElement element1 = reference.getElement();
      if (context != null && element1.getTextOffset() < context.getTextOffset()) return true;
      return processAssignmentTarget(element1, parent, processor);
    });
  }
private static boolean searchReferencesAndProcessAssignmentTarget(@NotNull PsiElement element,
                                                                    final @Nullable PsiElement context,
                                                                    @NotNull JavaSliceUsage parent,
                                                                    @NotNull Processor<? super SliceUsage> processor)