private static boolean isEndOfLineComment(PsiElement elementAtCaret) {
    PsiElement prevElement = PsiTreeUtil.prevLeaf(elementAtCaret);
    return prevElement instanceof PsiComment && JavaTokenType.END_OF_LINE_COMMENT.equals(((PsiComment)prevElement).getTokenType());
  }
private static boolean isEndOfLineComment(PsiElement elementAtCaret)