-
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
Address layering of navigation action in code actions #59856
Address layering of navigation action in code actions #59856
Conversation
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.
Nice approach; didn't realize we also had the navigation annotation too so makes sense all navigation is done in one place anyways.
|
||
public DocumentNavigationOperation(DocumentId documentId, int position = 0) | ||
public DocumentNavigationOperation(DocumentId documentId!!, int position = 0) |
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.
!!
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.
had to remove as well, was getting formatting warnings :'(
{ | ||
var navigationOperation = operations.OfType<DocumentNavigationOperation>().FirstOrDefault(); |
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.
Consider SingleOrDefault, since if we have more than one I'm suspicious about what happened there.
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 SingleOrDefault throws... and that worries me about somethign potentially throwing now taht just had wonky behavior before.
if (workspace.CanOpenDocuments) | ||
{ | ||
var navigationService = workspace.Services.GetService<IDocumentNavigationService>(); | ||
var threadingService = workspace.Services.GetService<IWorkspaceThreadingServiceProvider>(); |
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.
Can you delete IWorkspaceThreadingServiceProvider or did something else still use it too?
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.
unfortunately, unit testing and TS are still using it in exactly 2 locations.
No description provided.