Hi,
I had a few custom plugins I'd written for the original coderush. Just trying to set them up in coderush for roslyn. Is this supported yet? If so, can you walk me through it? There doesn't seem to be an eqivalent of the plugin manager screen? I opened the extensions folder from the coderush support menu , and copied my plugins into, then restarted visual studio. I tried to add a keyboard shortcut to trigger one of the plugins, but it wasn't available in the commands menu. Will I need to recompile the pluhins? Change them in some way for Roslyn?
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Kevin,
We keep discussing the possibility of creating plugins in CodeRush for Roslyn, but we do not provide such a capability yet.
In CodeRush Classic, we had our own parser to parse a solution and we kept parsed data in our own structures. Plugins created for CodeRush Classic operated with this data.
CodeRush for Roslyn does not operate with its own structures - it works on top of the Roslyn engine and uses the Roslyn structures.
For this reason, we think that if we add the plugins support to CodeRush for Roslyn, the plugins will operate with the Rolsyn data too. As a result, the plugins structures will significantly differ from the structures used in CodeRush Classic.
We apologize for the inconvenience this might have caused you, but now I cannot give you any suggestion on how you can port plugins to CodeRush for Roslyn.
Hi Eugene,
That's disappointing. I have a few plugins that took advantage of this feature in coderush for a simple way to extend visual studio and help with common editing tasks.I hope you can come up with something. It's a shame to see a useful feature disappear in what should be an upgrade to coderush :-(
Hi Kevin,
I understand your disappointment. As I said, we are looking for the best way to provide our customers with the capability to extend CodeRush for Roslyn. We even have the first results in this direction - CodeRush for Roslyn now has the capability to determine its plugins analyzing the Visual Studio extensions folder. But honestly, now I cannot say that we have a strong and convenient API which we can show.
Kevin, would you please give us information on what features you have in the plugins. We will be glad to discuss how we can help you.
Hi Eugene,
There are two I currently use (well, used) quite frequently.
The first was basically a cut down version of the organise members functionallity built into coderush - as far as I can see, that only works in C#, and we have a mix of VB and C# projects. It would be great if you supported VB with that.
The second tidies up code after VS generates interface members. Since VS 2015, when you generate a class that implements an interface it generates method bodies which raise NotImplemented exceptions. If you're just using those classes for data transfer then often all you want is a bunch of auto-implemented properties. The plugin took the VS generated code and converted them to these properties. Coderush's refactoring won't do this because they aren't simple databacked properties. Basically VS produces a bunch of these:
Public Property Container As String Implements IAclEdiBookingView.ISummary.Container Get Throw New NotImplementedException End Get Set(value As String) Throw New NotImplementedException End Set End Property
whe n all I want is a bunch of these:
Public Property Container As String Implements IAclEdiBookingView.ISummary.Container
Ther e are a few more, but I use them pretty infrequently
Kevin
Hi Kevin,
Have you had a chance to try the Organize Members feature in CodeRush for Roslyn?
It works both in VB and C# projects and it is even more powerful in combination with Code CleanUp.
If it does not contain the expected functionality, we will be more than happy to improve this feature and include your ideas in future updates.
As an example, this video illustrates how to use the Code Cleanup and Organize Members features to sort members alphabetically and place them into regions.
Regarding the second plugin - please give us some time. We will think what we can do here. I will contact you when we prepare a good solution or suggestion for you.
You're right, Eugene, (well obviously you are, lol) it does work. I'm not sure what was happening when I tried it. That excellent, anyway, as it offers far more functionallity than my plugin did. As for the other, it would be much appreciated. We use simple DTO objects based on interfaces a lot, and it's a real pain going through the properties one by one after the code is generated.
Right, I'm off to have a good play with organize members now ;-)
It looks like Code Cleanup handles the second plugin? I let visual studio implement an interface for me, and it produced a property that threw a not implemented exception. Code cleanup turned it into an auto property. I then tried the refactor menu on the property and it gave me the convert to auto option, which again, did what I wanted.I've just taken another look and it even has a convert all method on the refactoring menu. Guess I'd not tried it since moving to coderush for roslyn.
So it looks like you've sorted both of my missing features :-)
Hi Kevin,
Thank you for the update. You've found a solution for the second question faster than I prepared a suggestion for you.
You are right - you can convert the properties to auto-implemented using two ways: you can enable the "Make properties auto-implemented" option in Code CleanUp and you can use the "Convert to auto-implemented property (convert all)" refactoring menu item. Both of these ways should produce the result you need.
Please contact us if you face any difficulties using our product. The information you share is very important to us.
I've just installed the September patch to VS2015 update 3, and code cleanup is no long converting the properties mentioned above to auto-implemented
So lets say you have a class like this one:
Public Class CRTest Public Property ExemptionCertificate As String Get Throw New NotImplementedException() End Get Set(value As String) Throw New NotImplementedException() End Set End Property End Class
Convert to auto-implemented is enabled in code cleanup, but it doesn't do anything with the property in the above example. A regular property with a backing variable is correctly transformed. If I explicitly invoke the convert to auto implemented property refactoring on it then it does work, but since my prime use for this is to fix a bunch of properties created when implementing an interface, this would be a tedious way to handle it.
Also relevant, I suspect: If I add the single backed property I described above, and invoke the refactoring menu, I don't get the "all" variant of the refactoring. If add a second backed property and invoke the menu I *do* get the "all" variant. Looks like the NotImplementedException properties are now being excluded from whatever filter you are applying to detect if there are single or multiple candidate properties
Hello,
I've created a separate ticket on your behalf (Code Cleanup is no longer converting non-implemented properties to autoimplemented). It has been placed in our processing queue and will be answered shortly.