Closed bdaniel7 closed 3 years ago
Ad1. I need to check that, can you provide a sample solution? Ad2. "Implement Clone metho" - I don't provide such functionality. You probably confused MappingGenerator with something else.
Ad2. In the project wiki there is a paragraph
I added this project https://github.com/bdaniel7/MappingGeneratorTest
So if there is a ":" right after the class name, like when derived or implementing an interface, the Implement clone method menu doesn't appear. If there is a space between class name and ":", the menu appears.
And Initialize with local values menu appears but doesn't generate anything, Initialize with sample values menu appears and generates the dummy values.
Oh, sorry. I totally forgot that I implemented this clone-related feature 😄
Thanks for a sample solution, I will check that later and I will let you know.
I don't see any problem with "Implement clone" options, works fine in any "space" configuration.
Tested on Rider 2020.2.1
You can also trigger this action directly on the clone method signature:
"Initialize with local values" - this action is using only local variables and method parameters. It's not using enclosing type members. This is the current behavior.
Ok, I'm getting the menu when I have the cursor on the class name. Previously I had the cursor just at the end of class name. But when I try to invoke the action, the IDE freezes. I have to close it from Task Manager. I'm using Rider 2020.2.4
How large is your solution and how complex is the cloned class?
Some classes have around 750 lines, including curly braces and empty lines. Other classes have 45 or 75 lines, with just 2 to 10 properties. And some IEquatable<> implementation.
does it hang on that sample solution too?
Nope.
So I guess this is due to solution size. This problem is already reported here https://github.com/cezarypiatek/MappingGenerator/issues/115
I tried to profile MappinGenerator several times but I wasn't able to find anything suspicions. Without real example I'm not able to diagnose this problem.
There are a few async operations which are run synchronously, I need to rewrite it and we will see if that can help.
Alright, in the meantime I will try a workaround.
@bdaniel7 might I ask you to test it once again using v1.19.452?
First, the compilation for the entire solution became waaay slower - when using dotnet watch run
.
Even when just a file is modified.
Which makes the CPU and the fans go crazy...
Then, I got all kinds of warnings that I didn't get before, and that I had to disable with
Thanks for quick reply. It's my mistake, the analyzers were referenced incorrectly, should be fixed in v1.19.454
I'm closing this issue. The case with performance can be tracked here #115
Thanks for this life saving nuget! :))
I'm using the nuget version with Rider. And in some situations it works, in some, it doesn't. I use Alt + Enter.
It's ok.
It should display the Initialize with local variables and use the properties of the class.
Also, it doesn't show the Implement Clone method when I select/set the cursor on the class name.