Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-248

Move Parser.JUSTIFY_* over to Sink interface

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1
    • 1.1
    • Core, Sink API
    • None
    • Patch

    Description

      While implementing a Maven report plugin, I called Sink.tableRows(int[], boolean). Searching for the constants required to specify the cell justifications, I ended up importing Parser from doxia-core...

      I am not convinced that this design is appropriate. Sure, parsers will usually require access to these constants but this can be generalized to every client that communicates with a sink, in particular a Maven report generator which is completely unrelated to parsing. IMHO, these constants play just the same role as the SinkEventAttributes and as such should be part of doxia-sink-api to make the Sink API self-contained.

      I am well aware that this will break compilation of code that migrates from Doxia alpha to beta but that should be legal for an alpha. At runtime, the change won't cause troubles since the compiler must inline constants and as such there is no effective dependency in the bytecode on the old constants in Parser.

      Attachments

        1. table-cell-justify.patch
          20 kB
          Benjamin Bentmann

        Activity

          People

            ltheussl Lukas Theussl
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: