コード例 #1
0
 private static Caret getNextCaretToProcess(@NotNull Editor editor) {
   for (Caret caret : editor.getCaretModel().getAllCarets()) {
     if (caret.getUserData(CARET_PROCESSED) == null) {
       return caret;
     }
   }
   return null;
 }
コード例 #2
0
 private static void markCaretAsProcessed(@NotNull Caret caret) {
   caret.putUserData(CARET_PROCESSED, Boolean.TRUE);
 }
コード例 #3
0
 private static void clearCaretMarkers(@NotNull Editor editor) {
   for (Caret caret : editor.getCaretModel().getAllCarets()) {
     caret.putUserData(CARET_PROCESSED, null);
   }
 }