I love this plugin. i was using it with vs 2010 and it worked perfectly, but with vs 2013. It crashes my visual studio again and again. and corrupts my .aspx page (html). i don't know why.?? Please resolve this issue.
I'm glad you love the plugin, and sorry that you're encountering a difficulty. If you can open an issue on GitHub with some more details (e.g. code sample before and after) then I can look into it further.
Some of the internal code details aren't available with the current VS API, but the new Roslyn compiler in VS14 will provide a lot more information that will make those kind of cleanups possible in the future. If you have specific requests check out the Roslyn list in the backlog: https://trello.com/b/VVxVhbQv/backlog
I've also added a new card to the backlog for reorganizing selected files, great idea: https://trello.com/c/cAOyUtUR
I may have missed something here but I have not found it. I always like to know what changes are going to be made before anything goes making them. So being able to scan the solution then review the suggested changes would be a must for me.
as a test I created a simple VS2013 MFC application with various classes and code then ran CodeMaid Clean up All Code. The result was then not able to be compiled a CodeMaid removed the EOF character from the end of the .rc2 file, so I would be very fearful of running this on larger projects.
Thanks for the constructive criticism, that is very helpful.
For that specific item with the .rc2 EOF indicator not being on a separate line, Issue #18 opened and resolved for the next minor release. There is a "Remove end of file trailing new line" option that could be disabled in the interim.
I've also placed a card in the backlog to investigate adding integration tests that would iterate across all the different project templates and invoke CodeMaid actions upon them. https://trello.com/c/Sqv2bIWC
First its awesome and second its awesome, very light weight and incredible. But for some reasons it doesn't work on solution level clean-up all. I have mix projects in solution, ASP.NET MVC, Web API, Silverlight, WCF, Windows Service etc.. and total around 50+ projects excluding unit test projects :)... if it work at solution level then save more time for me and save me 50+ individual project level clicks...
VS2013 had a known issue with solution level cleanups being disabled. They fixed it recently with Update 2. If that doesn't do the trick a shortcut is you can multi-select projects and do cleanup on several at once. Also feel free to open a BitBucket issue and we can figure it out if it wasn't the VS update.
Great addin, almost exactly what I was looking for.
I had a couple suggestions in specific for the CodeSpade tool.
1. When you press the hotkey to bring up the code spade, it'd be VERY nice if it could come up with the code element that the cursor is currently in highlighted in the tree. That would help enormously with "seeing" where you currently are in the code.
2. Given the code spade tool, it'd be +really+ nice to have a couple extra commands to jump to the "next" method and "previous" method, given the current cursor location. VS has a next and prev method command, but they only work with VB as far as I can tell.
Still, awesome tool, and very handy.
Is the code up on Github or something? I'd be happy to look into whipping up a pull request for these things.
Wonderful, glad you like it. :)
Yep, open source as you found - contributions welcome! I recommend checking out http://www.codemaid.net/contribute/ for some basic details.
Our backlog is on Trello: https://trello.com/b/VVxVhbQv/backlog Your first suggestion does exist https://trello.com/c/j7DTRXsy but the second one is new so please suggest it there.
Some tips specifically for extending Spade:
- SpadeToolWindow inherits from ToolWindowPane to integrate into VS
- SpadeViewModel is instantiated by SpadeToolWindow and backs SpadeView
- SpadeView is the WPF visual. It does have more code behind than I would like, primarily to perform a lot of custom mouse/key/drag and drop operations to drive the TreeView based control.
Hope it helps and feel free to reach out with questions. These discussion boards on VSG aren't usually the easiest - Trello is preferred.
I like the extension, but I noticed a strange cleaning-up that I don't know how to disable. If I have in my .h file in a cpp project the following simple code:
/* Copyright (C) ...
* Proprietary and confidential
* Written by ...
class TStarter ...
then cleaning up adds one space in the TStarter comment:
this has to do with the copyright section at the top, because if I remove it, there is no problem.
I installed CodeMaid 0.8.1 under fresh installed Visual Studio 2015 but the menu "Clean Up Code" is greyed or inactive. The file is in the solution of course. And auto clean up on save seems doesn't work as well. But spade and other things are working properly.
If Spade is able to load a document, then cleaning should(tm) work and be enabled as they share some common underlying infrastructure.
You could try enabling diagnostics mode (CodeMaid->Options->Diagnostics mode) and then see what messages are posted to the Output tool window in Visual Studio.
If that doesn't point out something obvious, please open an issue on GitHub so we can look into it further: https://github.com/codecadwallader/codemaid/issues
I think this is a great tool, and special thanks to taking time to write it.
If I run CodeMaid becomes
I.e. it looses indentation of the parameters,
How can I disable it?
Hi Sumonto -
Thanks for your kind comments.
I wasn't able to reproduce this, but I suspect it could be a similar issue to the other one you posted (see next reply to consolidate).
Hope it helps,
Thanks for your reply, however I could not find an option under
"Tools->Options->Text Editor->C/C++->Formatting->Spacing" to disable "
To disable "function param indentation" issue?
Is there any way you could help me more.
Is there a way to just sort methods alphabetically regardless of access or type? I tried looking into Formatting but I need to either go with access before type or type before access. I want to ignore both type and access and just sort the entire thing by name.
Currently no, I don't think there's a configuration that would match your request. You may make a feature request on the Trello backlog (https://trello.com/b/VVxVhbQv/backlog) or the code is open source if you would like to look to add it (https://github.com/codecadwallader/codemaid)
Is there a way to leave the variable declaration indentation un-touched.
ShortType1 st1 = 0;
LongLongType longtype = 0;
ShortType1 st1 = 0;
LongLongType longtype = 0;
Is there a way to disable this?
CodeMaid invokes Visual Studio's native formatting, and then extends upon it. The removal of spaces in variable declarations is done by Visual Studio's formatting, and you can see the same behavior if you invoke Edit->Advanced->Format Document. You can tell CodeMaid not to invoke Visual Studio's native formatting at CodeMaid->Options->Visual Studio->"Run format document", but you would lose several other cleanup actions in the process. You can also look for additional Visual Studio configuration options under Tools->Options->Text Editor->C/C++->Formatting->Spacing.
Thanks, I really appreciate hearing that. :)
It should be possible. I don't think there is an existing card in the backlog for that feature, would you like to add one? https://trello.com/b/VVxVhbQv/backlog
There is a card in our backlog to support Python here: https://trello.com/c/RcqeuQEi
Please feel free to vote/comment on it. The card also includes a link to the pull request showing how PHP support was added as an example for what it would take to add support for Python.
I'm using VS Premium 2013, Update 5 and CodeMaid v 0.8.0. Selecting the "Find In Solution Explorer" results in the exception message, "The Command to execute is not enabled." How do I enable the Command?
Are you sure the currently active document exists within the solution?
If you are still having issues, please open an issue on GitHub (https://github.com/codecadwallader/codemaid/issues), including information about what type of file you are trying to find (e.g. C#, VB, etc.)
When opening large classes, say with 5k lines in it, spade may take more than a minute to load.
Is it expected behavior? Most of the time, when opening a class you may need to user visual studio, but it hangs for that amount of time. Perhaps, if Spade would load asynchronouslly on background, might imnprove performance in this case.
Additionally, it might check the cache first, and then load async. It will take about the same time to load, but will definitely avoind disrupting work. If you need to use it as soon as opening a class, you may just wait for it.
Spade does load asynchronously in the background. Please check your settings at CodeMaid->Options->"Load models asynchronously". This setting is on by default, but if it has been turned off then you would see the behavior you described.
If you are still having an issue, please open an issue on GitHub here with more details (e.g. VS version, configuration settings): https://github.com/codecadwallader/codemaid/issues