private static boolean isArgumentInThreadConstructor(@Nullable PsiExpression inArgument) {
      PsiElement skipped = PsiUtil.skipParenthesizedExprUp(inArgument);
      if (skipped == null) return false;
      PsiElement argParent = skipped.getParent();
      PsiExpression argument = null;
      if (argParent instanceof PsiLambdaExpression) {
        argument = (PsiExpression)argParent;
      }
      else if (argParent instanceof PsiAnonymousClass) {
        argument = tryCast(argParent, PsiNewExpression.class);
      }
      return isInThreadConstructor(argument);
    }
private static boolean isArgumentInThreadConstructor(@Nullable PsiExpression inArgument)