Skip to content
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

References #52

Merged
merged 10 commits into from
Oct 11, 2016
Merged

References #52

merged 10 commits into from
Oct 11, 2016

Conversation

felixfbecker
Copy link
Owner

@felixfbecker felixfbecker commented Oct 9, 2016

Closes #20

image

Adds support for textDocument/references. At index time in addition to definitions, also a map of FQN to array of referencing document URIs is kept.

Just like definition, it works very well for class-likes, functions and constants, but not so great for methods and properties where it is hard to infer the class. Variables and parameters also work surprisingly well.

ToDo

  • Tests for other symbols than classes

@codecov-io
Copy link

codecov-io commented Oct 9, 2016

Current coverage is 92.38% (diff: 96.58%)

Merging #52 into master will increase coverage by 1.04%

@@             master        #52   diff @@
==========================================
  Files            24         26     +2   
  Lines           508        591    +83   
  Methods          73         83    +10   
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            464        546    +82   
- Misses           44         45     +1   
  Partials          0          0          
Diff Coverage File Path
••••••••• 90% src/Server/TextDocument.php
••••••••• 95% src/PhpDocument.php
•••••••••• 100% new src/NodeVisitor/ReferencesCollector.php
•••••••••• 100% src/LanguageServer.php
•••••••••• 100% src/Project.php
•••••••••• 100% new src/NodeVisitor/VariableReferencesCollector.php

Powered by Codecov. Last update 66b5176...117feb1

@felixfbecker felixfbecker force-pushed the references branch 9 times, most recently from 3357f52 to 9369701 Compare October 11, 2016 19:26
@felixfbecker felixfbecker merged commit 6fe0118 into master Oct 11, 2016
@felixfbecker felixfbecker deleted the references branch October 11, 2016 23:45
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants