-
Notifications
You must be signed in to change notification settings - Fork 314
Close #2884 #2886
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
Close #2884 #2886
Conversation
return ((ICodeExplorerDeclarationViewModel) node)?.Declaration; | ||
} | ||
|
||
private string GetFolder(object parameter) |
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.
Nicely done 👍
|
||
protected override void ExecuteImpl(object parameter) | ||
{ | ||
var folderAnnotation = $"'@Folder(\"{GetFolder(parameter)}\")"; |
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.
Hmm.. Should we have a "default folder" setting? That way it wouldn't need to be duplicated in every module-creating command...
|
||
protected override void ExecuteImpl(object parameter) | ||
{ | ||
var folderAnnotation = $"'@Folder(\"{GetFolder(parameter)}\")"; |
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 need to figure out a way to have this work when the module is added via standard VBE commands too... somehow.
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.
Hooks should do it.
} | ||
|
||
return node == null ? null : ((ICodeExplorerDeclarationViewModel)node).Declaration; | ||
return ((ICodeExplorerDeclarationViewModel) node)?.Declaration; |
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.
Perhaps extract some ModuleMaker type that the commands would use for this? That way the relatively complex logic below would only be in one place?
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.
Makes sense.
I don't like how these three commands each implement an identical
GetDeclaration
andGetFolder
.