Skip to content

Fix line number in the "Link to Crossdart" link #1174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 9, 2016

Conversation

astashov
Copy link
Contributor

@astashov astashov commented Jun 8, 2016

Hey @keertip, I'm really sorry, but there's one more thing I need to fix.
Hopefully, the last one :)

The "Link to Crossdart" used to point to the beginning of the comment section, and also was
off by 1 (I guess because LineNumberCache counts them from 0, but
www.crossdart.info starts from 1).

Now it points to the actual declaration.

It used to point to the beginning of the comment section, and also was
off by 1 (I guess because `LineNumberCache` counts them from 0, but
www.crossdart.info starts from 1).

Now it points to the actual declaration.
@astashov astashov force-pushed the fix-link-to-crossdart-line branch from 4ca1b7c to c341f5c Compare June 8, 2016 21:31
When there're inherited methods in a class, and they are inherited from
a class in other package (or SDK), we incorrectly built the link.

This fixes it, and now I try to infer the right path from `uri` and
`path` properties of `node.element.source`. If `uri` is not `dart:` or
`package:`, I just won't add the crossdart link (for safety).

I removed a test, because couldn't figure out how to make `package:`
`uri` in the tests - it's always `file:///` :(
@keertip
Copy link
Collaborator

keertip commented Jun 9, 2016

lgtm!

@keertip keertip merged commit 5b93362 into dart-lang:master Jun 9, 2016
@astashov
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants