QDox
  1. QDox
  2. QDOX-41

Let tags know about the field/method/class/ctor instead of the source

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4
    • Component/s: Java API
    • Labels:
      None
    • Number of attachments :
      1

      Description

      This patch adds more knowledge to the AbstractJavaEntity (field/method/class/ctor) where it occurs instead of the JavaSource object.

      This opens up for more fine grained knowledge about where a tag occurs.

      The reason why I want to add this is in order for XDoclet2 to be able to provide more detailed error reporting during tag validation. With this in place, XDoclet2 will be able to say:

      "The @foo tag is not allowed on methods, you put it on a method on line 123 in file /some/path/SomeFile.java".

      I haven't verified whether this has any impact on performance, but I don't see why it should.

      I also think it will cause neglectable BWC issues (even though some of the API has changed), because the API that has changed is fairly internal. The modified parts of the API is also fairly recent (post 1.3).

      Since this is a fairly big change (although low risk IMHO), I'm submitting it here for people to review it before I commit.

      1. patch.diff
        18 kB
        Aslak Hellesøy

        Activity

        Hide
        Aslak Hellesøy added a comment -

        El patch

        Show
        Aslak Hellesøy added a comment - El patch
        Aslak Hellesøy made changes -
        Field Original Value New Value
        Attachment patch.diff [ 11227 ]
        Hide
        Mike Williams added a comment -

        Adding more location info sounds like a good idea. Go for it.

        Nitpick: I'd prefer args of type JavaClassParent to be named "parent" rather than "source", if they might not be JavaSources. And perhaps "context" would be better than "owner" in DocletTag?

        Looks like your patch also removes code from JavaDocBuilder that deals with "encoding". How come?

        Show
        Mike Williams added a comment - Adding more location info sounds like a good idea. Go for it. Nitpick: I'd prefer args of type JavaClassParent to be named "parent" rather than "source", if they might not be JavaSources. And perhaps "context" would be better than "owner" in DocletTag? Looks like your patch also removes code from JavaDocBuilder that deals with "encoding". How come?
        Hide
        Aslak Hellesøy added a comment -

        Applied

        Nitpicks: done
        Encoding: i only removed unused code. The active encoding logic is intact.

        Show
        Aslak Hellesøy added a comment - Applied Nitpicks: done Encoding: i only removed unused code. The active encoding logic is intact.
        Aslak Hellesøy made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.4 [ 10304 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Aslak Hellesøy
            Reporter:
            Aslak Hellesøy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: