-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Smart Rename: Provide additional context for renamed symbol #73873
Merged
Cosifne
merged 55 commits into
dotnet:main
from
AmadeusW:dev/amwieczo/getContextForRenamedSymbol
Jul 17, 2024
Merged
Changes from 52 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
3004167
work in progress on getting context and almost passing it to smart re…
AmadeusW 797896b
pass context to SmartRenameSession
AmadeusW f306f05
attempt to set PromptOverride through Lightup
AmadeusW dc2c255
reflection refinement
AmadeusW 3cba7f9
Fix CreatePropertySetter in LightupHelpers
Cosifne e03d4b8
Find definitions and references and add them to the context
AmadeusW 3516915
also capture snippet of surrounding method
AmadeusW 00a88ec
simplify
AmadeusW 04f32e4
fix GetRequiredLanguageService
AmadeusW 8b3f739
undo code cleanup artifacts
AmadeusW 14f4c21
use ImmutableArray throughout Roslyn's interfaces
AmadeusW 9a664db
fixup
AmadeusW 2eb5b30
refactor to get context only if smart rename is active
AmadeusW 6b3e0a4
revert the now unnecessary change
AmadeusW 3217dbe
restore CreateFunctionAccessor with 2 parameters
AmadeusW e6c0de8
Dont duplicate work of getting rename locations
AmadeusW 7b3c5d2
use interface in the method declarations
AmadeusW 0aced56
fix warning
AmadeusW 5f483e9
remove IInlineRenameSession from the API
AmadeusW 7d6f4ea
cleanup
AmadeusW fc7c0c7
refactor getting doccomments
AmadeusW 8e7719a
fixup
AmadeusW 5abd3f1
PR feedback
AmadeusW 13e1afb
Add IEditorInlineRenameService.IsRenameContextSupported
AmadeusW c13c161
revert unnecessary change
AmadeusW a342e0a
remove unnecessary changes
AmadeusW 1ff97d8
doc comments
AmadeusW d0ef8d8
expose TriggerDocument instead of creating a property that returns a …
AmadeusW 810ef6e
add feature flag to control whether we're getting context
AmadeusW 2fe72e4
Merge branch 'dev/amwieczo/getContextForRenamedSymbol' of https://git…
AmadeusW 3eed4a2
Merge branch 'main' into dev/amwieczo/getContextForRenamedSymbol
AmadeusW e6e6fec
improve event handler name
AmadeusW 31770e1
fix Correctness_Analyzers warnings
AmadeusW 02a5426
update Feature Flag look
AmadeusW 1bc796a
fix Freeing Twice assert
AmadeusW 064eb2e
add 'requires restart' to the FF name
AmadeusW 0c0c2ea
cleanup usings
AmadeusW 121c396
extract constants
AmadeusW f022adf
remove unused code
AmadeusW bbe2e44
NumberOfContextLines const
AmadeusW c30caf3
GetRenameContextCoreAsync doc comments
AmadeusW bf35972
pr feedback on CSharpEditorInlineRenameService
AmadeusW c8788ae
override fixes
AmadeusW 028dd58
enforce hard limits on amount of symbols we traverse
AmadeusW 8690915
Get context off UI thread, respond to property changed on UI thread
AmadeusW 171b026
undo unwanted file
AmadeusW f4bc198
Remove CSharpRenameContextHelper; improve the provided context
AmadeusW f3c9467
modifiers and doc comments
AmadeusW 6c06fa3
remove never taken branch
AmadeusW 15d2f2d
Merge branch 'main' into dev/amwieczo/getContextForRenamedSymbol
AmadeusW 1faf717
Remove IsRenameContextSupported
AmadeusW c3f3030
PR feedback to move TryGetSurroundingNodeSpanAsync to parent class
AmadeusW f14318a
use CompletesAsyncOperation pattern for SessionPropertyChanged
AmadeusW 3a33f76
Create IAsynchronousOperationListener in the constructor
AmadeusW 3705723
improve algorithm that provides context snippet
AmadeusW File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we really don't like doing this. it makes this work lang specific (it will only work for C#/VB).
Instead, we should make it so that whatever data is neeeded can be optionally returned by some non-lang-specific ILanguageService that JS/TS/XAML/F# can all implement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. this was already designed to let the other langs play. but we should at least expose this for C#/VB. Our policy is that we do not specialize for C# unless it's a C#-specific feature (like for a literal lang feature that VB doesn't have). Otherwise, we light up both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as there is practically nothing lang-specific here, that should be very easy to do (and we can help with that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well now I think it is because the copied
[CSharpRenameContextHelper.cs](https://github.com/dotnet/roslyn/pull/73873/files#diff-5d446a8c6ebf9f7cfce4e0ff445c83babf4e658cc97c3c989d81bc330dc5e41d)
only provide C# implementation and VB is not provided.