-
Notifications
You must be signed in to change notification settings - Fork 302
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
Introducing 'Peek Definition' commands #5751
Conversation
…troduced viewmodel.
…tring, and restored navigation functionality.
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.
Love the idea! I do not think we should be changing the can execute conditions to a virtual
method, however because we do want to preserve the hierarchy of parent's condition before checking the conditions required by the child. virtual
destroys that hierarchy.
Rubberduck.Core/UI/Command/MenuItems/ParentMenus/ProjectWindowContextParentMenu.cs
Show resolved
Hide resolved
Rubberduck.Core/UI/CodeExplorer/Commands/Abstract/CodeExplorerMoveToFolderCommandBase.cs
Show resolved
Hide resolved
Rubberduck.Core/UI/Command/ComCommands/PeekDefinitionCommand.cs
Outdated
Show resolved
Hide resolved
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.
I have some concerns about the protected
usages. I think those should be simply private
as well. I'm fine with renaming of EvaluateCanExecute
but as a note, I believe the reason SpecialEvaluateCanExecute
was used to avoid confusion with some EvalulateCanExecute
method that already exists in the base.
Rubberduck.Core/UI/CodeExplorer/Commands/CodeExplorerCommandBase.cs
Outdated
Show resolved
Hide resolved
Rubberduck.Core/UI/CodeExplorer/Commands/Abstract/CodeExplorerRefactoringCommandBase.cs
Outdated
Show resolved
Hide resolved
Rubberduck.Core/UI/CodeExplorer/Commands/AddComponentCommand.cs
Outdated
Show resolved
Hide resolved
Rubberduck.Core/UI/CodeExplorer/Commands/CodeExplorerExtractInterfaceCommand.cs
Outdated
Show resolved
Hide resolved
Rubberduck.Core/UI/CodeExplorer/Commands/CodeExplorerFindAllReferencesCommand.cs
Outdated
Show resolved
Hide resolved
Rubberduck.Core/UI/Command/ComCommands/FindAllReferencesCommand.cs
Outdated
Show resolved
Hide resolved
The ESC input binding isn't working, it may need to go on the actual parent |
Unless there are further review comments, this feature is ready to ship. |
Adds a Peek Definition command to the Code Explorer, code pane, and VBE Project Explorer context menus, and introduces a method in
ISelectedDeclarationProvider
to get theSelectedProjectExplorerModule
; derived a PE-specific Find all References command from the existing one, overridingOnExecute
to explicitly get the its target from the PE. This fixes a glitch with PE navigation commands where the command would acquire its target from the active code pane.Opportunistically, also fixes a bug that looks like it went under the radar: derived commands'edit; nope, this was actually a misguided refactoring that was undone in the PeekDefinitionCommand but forgotten in the other onesSpecialEvaluateCanExecute
logic wouldn't be invoked because the method wasn'tvirtual
and merely being shadowed, causing only the base method to run (and systematically returntrue
). This PR makes the derived methods properoverride
that do get invoked.