QDox

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
    18/May/04 3:24 AM
    12 kB
    Piotr Kaminski
  2. patch2.txt
    20/Jun/04 8:39 PM
    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.
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.
Hide
Aslak Hellesoy added a comment -

I applied it. Looked ok to me.

Show
Aslak Hellesoy added a comment - I applied it. Looked ok to me.
Hide
Aslak Hellesoy 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 Hellesoy 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.
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.
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?
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?
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.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

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