QDox
  1. QDox
  2. QDOX-52

Provide line numbers for all entities

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.6
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      2

      Description

      My current project would benefit from knowing what line of the source file an entity is located on. This is already given for tags, but I'd like it for classes, fields and methods as well. I'll attach a sample patch that more-or-less solves the problem, but is sometimes off by one and doesn't udpate the unit tests. I am not sufficiently familiar with the parser generator to figure out how to improve things.

      1. patch.txt
        12 kB
        Piotr Kaminski
      2. patch2.txt
        11 kB
        Piotr Kaminski

        Activity

        Hide
        Piotr Kaminski added a comment -

        Here's a patch that ought to be looked over by somebody who knows more than me about the parser.

        Show
        Piotr Kaminski added a comment - Here's a patch that ought to be looked over by somebody who knows more than me about the parser.
        Piotr Kaminski made changes -
        Field Original Value New Value
        Attachment patch.txt [ 12136 ]
        Hide
        Mike Williams added a comment -

        Thanks Piotr; sounds like a good idea. I've added it to the plan for 1.5.

        Show
        Mike Williams added a comment - Thanks Piotr; sounds like a good idea. I've added it to the plan for 1.5.
        Mike Williams made changes -
        Summary Provide line numbers for entities Provide line numbers for all entities
        Fix Version/s 1.5 [ 10650 ]
        Assignee Mike Williams [ mdub ]
        Hide
        Aslak Hellesøy added a comment -

        I applied it. Looked ok to me.

        Show
        Aslak Hellesøy added a comment - I applied it. Looked ok to me.
        Aslak Hellesøy made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Mike Williams [ mdub ] Aslak Hellesoy [ rinkrank ]
        Hide
        Aslak Hellesøy added a comment -

        I had to roll back the changes to the parser, as it seemed to break it. I discovered this while running QDox over some sources, and haven't yet a testcase.

        Show
        Aslak Hellesøy added a comment - I had to roll back the changes to the parser, as it seemed to break it. I discovered this while running QDox over some sources, and haven't yet a testcase.
        Aslak Hellesøy made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Aslak Hellesøy made changes -
        Fix Version/s 1.6 [ 10814 ]
        Fix Version/s 1.5 [ 10650 ]
        Piotr Kaminski made changes -
        Attachment patch2.txt [ 12327 ]
        Piotr Kaminski made changes -
        Comment [ 20875 ]
        Hide
        Piotr Kaminski added a comment -

        Sorry, I noticed the problem with the original patch a while ago but forgot to update the issue. Here's a slightly improved patch that parses all the files I've thrown at it thus far. Could still use review from a parser guru, of course.

        Show
        Piotr Kaminski added a comment - Sorry, I noticed the problem with the original patch a while ago but forgot to update the issue. Here's a slightly improved patch that parses all the files I've thrown at it thus far. Could still use review from a parser guru, of course.
        Piotr Kaminski made changes -
        Attachment patch2.txt [ 12328 ]
        Piotr Kaminski made changes -
        Attachment patch2.txt [ 12327 ]
        Hide
        Mike Williams added a comment -

        I've applied Piotr's updated patch (I did it a few days ago, actually), and things look fine to me. It appears to be generating sensible line-numbers.

        Aslak, can you check to see whether the parsing problems you encountered re-occur?

        Show
        Mike Williams added a comment - I've applied Piotr's updated patch (I did it a few days ago, actually), and things look fine to me. It appears to be generating sensible line-numbers. Aslak, can you check to see whether the parsing problems you encountered re-occur?
        Mike Williams made changes -
        Assignee Aslak Hellesoy [ rinkrank ] Mike Williams [ mdub ]
        Hide
        Mike Williams added a comment -

        I'm marking this resolved.

        Aslak, can you scream (again) if it's still causing a problem?

        Piotr, can you confirm that we've applied your patch correctly?

        Show
        Mike Williams added a comment - I'm marking this resolved. Aslak, can you scream (again) if it's still causing a problem? Piotr, can you confirm that we've applied your patch correctly?
        Mike Williams made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Hide
        Piotr Kaminski added a comment -

        The QDox from CVS now works with my app, so looks like the patch got applied correctly. Thanks!

        Show
        Piotr Kaminski added a comment - The QDox from CVS now works with my app, so looks like the patch got applied correctly. Thanks!
        Hide
        Mike Williams added a comment -

        Thanks Piotr.

        Show
        Mike Williams added a comment - Thanks Piotr.
        Mike Williams made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mike Williams
            Reporter:
            Piotr Kaminski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 hours
              2h
              Remaining:
              Remaining Estimate - 2 hours
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified