Interface ApplicationComponent

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String getDebugName()
      A debug name for this component, used in developer mode to e.g.
      DesignerRoot getDesignerRoot()  
      default EventLogger getLogger()
      Gets the logger of the application.
      default javafx.stage.Stage getMainStage()
      Gets the main stage of the application.
      default boolean isDeveloperMode()
      If true, some more events are pushed to the event log, and console streams are open.
      default void logInternalDebugInfo​(java.util.function.Supplier<java.lang.String> shortMessage, java.util.function.Supplier<java.lang.String> details)
      Logs an exception that occurred somewhere in the app logic.
      default void logInternalException​(java.lang.Throwable throwable)
      Logs an exception that occurred somewhere in the app logic.
      default <T> void logMessageTrace​(MessageChannel.Message<T> event, java.util.function.Supplier<java.lang.String> details)
      Traces a message.
      default void logUserException​(java.lang.Throwable throwable, LogEntry.Category category)
      Notify the logger of an exception that somewhere in PMD logic.
      default void raiseParsableSourceFlag()
      Notify the logger that source code parsing succeeded and that the last recent failure may be thrown away.
      default void raiseParsableXPathFlag()
      Notify the logger that XPath parsing succeeded and that the last recent failure may be thrown away.
    • Method Detail

      • getDebugName

        default java.lang.String getDebugName()
        A debug name for this component, used in developer mode to e.g. trace events handling paths.
      • getLogger

        default EventLogger getLogger()
        Gets the logger of the application. Events pushed to the logger are filtered then forwarded to the Event Log control.
        Returns:
        The logger
      • getMainStage

        default javafx.stage.Stage getMainStage()
        Gets the main stage of the application.
      • isDeveloperMode

        default boolean isDeveloperMode()
        If true, some more events are pushed to the event log, and console streams are open. This is enabled by the -v or --verbose option on command line for now.
      • logUserException

        default void logUserException​(java.lang.Throwable throwable,
                                      LogEntry.Category category)
        Notify the logger of an exception that somewhere in PMD logic. Exceptions raised by the app logic are considered internal and should be forwarded to the logger using logInternalException(Throwable). If we're not in developer mode they will be ignored.
      • raiseParsableXPathFlag

        default void raiseParsableXPathFlag()
        Notify the logger that XPath parsing succeeded and that the last recent failure may be thrown away. Only logged in developer mode.
      • raiseParsableSourceFlag

        default void raiseParsableSourceFlag()
        Notify the logger that source code parsing succeeded and that the last recent failure may be thrown away. Only logged in developer mode.
      • logInternalException

        default void logInternalException​(java.lang.Throwable throwable)
        Logs an exception that occurred somewhere in the app logic.
      • logInternalDebugInfo

        default void logInternalDebugInfo​(java.util.function.Supplier<java.lang.String> shortMessage,
                                          java.util.function.Supplier<java.lang.String> details)
        Logs an exception that occurred somewhere in the app logic.
      • logMessageTrace

        default <T> void logMessageTrace​(MessageChannel.Message<T> event,
                                         java.util.function.Supplier<java.lang.String> details)
        Traces a message.