Skip to content

abstract code in FindReferences from concrete way of creating result reference entry to seamlessly reuse the same code for gotoImplementation#14637

Merged
vladima merged 2 commits into
masterfrom
vladima/gotoImpl
Mar 16, 2017
Merged

abstract code in FindReferences from concrete way of creating result reference entry to seamlessly reuse the same code for gotoImplementation#14637
vladima merged 2 commits into
masterfrom
vladima/gotoImpl

Conversation

@vladima
Copy link
Copy Markdown
Contributor

@vladima vladima commented Mar 13, 2017

GotoImplementation in Roslyn requires us to return more data that we used to so now we use FindReferences directly since this code used to create ReferenceEntry type as a result. This PR allows to parameterize FindReferences with the way how to create result value so the same code in FindReferences can be used to return data for gotoImplementation and findReferences requests

…reference entry to seamlessly reuse the same code for gotoImplementation
@vladima
Copy link
Copy Markdown
Contributor Author

vladima commented Mar 14, 2017

NOTE: the change in findReferences.ts is fairly large but pretty systemic:

  • all places that used to create ReferenceEntry now to through the factory to make sure that result object will have the expected shape
  • instead of passing TypeChecker + CancellationToken as is we now pass FindReferencesContext<T> that exposed TypeChecker and CancellationToken as properties and also carries a type parameter that indicates the result type of references

@vladima vladima merged commit 5953426 into master Mar 16, 2017
@vladima vladima deleted the vladima/gotoImpl branch March 16, 2017 22:53
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants