Interface IEditorListener

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void activeBlockChanged​(@NotNull Editor editor, @NotNull java.lang.String blockId)
      Invoked when the active block has changed.
      void contentChanged​(@NotNull Editor editor, @NotNull java.lang.String[] blockIds)
      Invoked when the content has changed.
      void onError​(@NotNull Editor editor, @NotNull java.lang.String blockId, @NotNull EditorError err, @NotNull java.lang.String message)
      Invoked when an error has occurred.
      void partChanged​(@NotNull Editor editor)
      Invoked when the part associated with the listened editor has changed.
      void partChanging​(@NotNull Editor editor, @Nullable ContentPart oldPart, @Nullable ContentPart newPart)
      Invoked when the part associated with the listened editor is about to change.
      void selectionChanged​(@NotNull Editor editor)
      Invoked when the selection has changed.
    • Method Detail

      • partChanging

        void partChanging​(@NotNull
                          @NotNull Editor editor,
                          @Nullable
                          @Nullable ContentPart oldPart,
                          @Nullable
                          @Nullable ContentPart newPart)
        Invoked when the part associated with the listened editor is about to change.
        Parameters:
        editor - the editor.
        oldPart - the old part.
        newPart - the new part.
        See Also:
        Editor.setPart(ContentPart)
      • partChanged

        void partChanged​(@NotNull
                         @NotNull Editor editor)
        Invoked when the part associated with the listened editor has changed.
        Parameters:
        editor - the editor.
        See Also:
        Editor.setPart(ContentPart)
      • contentChanged

        void contentChanged​(@NotNull
                            @NotNull Editor editor,
                            @NotNull
                            @NotNull java.lang.String[] blockIds)
        Invoked when the content has changed.
        Parameters:
        editor - the editor associated to the part that contains the modified content.
        blockIds - the identifiers of the modified blocks.
      • onError

        void onError​(@NotNull
                     @NotNull Editor editor,
                     @NotNull
                     @NotNull java.lang.String blockId,
                     @NotNull
                     @NotNull EditorError err,
                     @NotNull
                     @NotNull java.lang.String message)
        Invoked when an error has occurred.
        Parameters:
        editor - the editor associated to block on which the error has occurred.
        blockId - the identifier of the block on which this error has occurred.
        err - the error code corresponding to the error.
        message - the error message.
      • selectionChanged

        void selectionChanged​(@NotNull
                              @NotNull Editor editor)
        Invoked when the selection has changed. The selection can be retrieved by calling getSelection on the editor.
        Parameters:
        editor - the editor that performed the selection change.
      • activeBlockChanged

        void activeBlockChanged​(@NotNull
                                @NotNull Editor editor,
                                @NotNull
                                @NotNull java.lang.String blockId)
        Invoked when the active block has changed. The active block is usually the last modified text block.
        Parameters:
        editor - the editor that performed the selection change.
        blockId - the identifier of the active block.