Not sure exactly when it happened, but it was quite recently. Also not sure if this is a coderush change, or coderush reacting to something in my code. Take the example below
Visual BasicNamespace Invoicing.Agreements
Public Class ServiceGroupController
Inherits Base.BaseController
Private WithEvents _view As PeelPorts.DependencyInjection.Views.IView
Public Sub New(context As Context.ISaturnContext, view As PeelPorts.DependencyInjection.Views.IView)
MyBase.New(context, view)
_view = view
End Sub
Public Function Init() As Invoicing.Agreements.ServiceGroupController
Return Me
End Function
Public Overrides Sub Run()
MyBase.Run()
End Sub
End Class
End Namespace
This is generated by a custom item template in visual studio. Typically as soon as I create an item with this template, I move it to the relevant namespace (already done in the example above) then I replace the base view type in the definition of _view with the actual view interface. In the example above, this became:
Private WithEvents _view As ViewInterfaces.Invoicing.Agreements.IServiceGroupingView
With my cursor on the type definition I'd then invoke the refactoring menu and select the remove type qualifier refactoring. This no longer works (I'm not presented with that option any more). Even if I manually import the namespace, at which point coderush sees what I've done and greys out the namespace in the declaration, it still doesn't offer me the refactoring.
It seems to be related to the assembly in which the interface is defined. I can select interfaces defined in any of the other assemblies in the solution and it works perfectly. I've examined working and non working expressions in the source tree window but can't see any relevant differences. Can you think of anything that might affect an entire assembly to cause this behaviour?
Kev
Hi Kevin,
We are concerned to hear that you have a problem with our product. I have tried to reproduce this behavior with your sample locally but without success.
Are you using the new Visual Basic syntax in your project? It can be the cause of the problem. CodeRush Classic does not support the latest versions of Visual Basic and CSharp. If you are using the latest language syntax, I suggest that you install CodeRush for Roslyn (Preview).
To determine the cause of this problem, we need to see log files. Please collect and send these files to us. Refer to the following article for more information:
How to collect diagnostic logs?
I'm looking forward to your reply.
Thanks Andrew, I suspected you might need more info. Yes, we are using some new language features, but not in the ViewInterfaces assembly (this is purely interfaces). I will collect some logs and attach them as soon as I get a chance.
With regards to Coderush for Roslyn, it's still not there yet, for us. I gave it another trial with the previous release, but there is still too much missing to switch to it yet, and the release notes for the current version don't include anything we were waiting for. It would help if you had a roadmap available showing the priority in which you will be migrating the remaining missing features? I also experienced some performance issues when trialling it, but these may have been down to not completely removing the original coderush, just unloading it
At the moment, we do not have a public road map for porting features to CodeRush for Roslyn. May I ask you to specify what features you believe are currently missing in CodeRush for Roslyn, so that I can check whether or not we have them in our backlog and adjust their priority?
Hi Andrew,
I'll switch back to it for a few days and keep some notes, then get back to you
It will be great!
I'm looking forward to your reply.
I was going to wait and send you a comprehensive list, but the irony of the third refactoring I found was too much to wait on :-)
Here are some missing refactorings I've encountered so far:
Move type to namespace
Rename (I know it's still there, but I'm condition to expect it on the refactor menu)
Remove Type Qualifier. Partially there - coderush will offer to simplify an expression but only to remove namespaces that are already imported. For example, It will offer to simplify System.Data.Entity.ModelConfiguration.Conventions.Iconvention by removing System from the start of it. It won't offer to convert it to Iconvention with a suitable imports statement.
Given this thread was about problems with Remove Type Qualifier, that last one was particularly striking!
One other thing I'm missing so far is Ctrl-Click to jump to definition
I'll carry on testing though, and see if any more pop up
Another issue I'm seeing is performance. This is a strange one. 20 minutes ago the IDE was flying along. Now it is struggling - typed characters are lagging before they appear on screen. The only thing I can think of that preceded this was opening a very large entity framework 6 model in the designer. This wasn't a gradual change, it was a step change
More information: another way this exhibits itself is by cursoring down through a file. I'm finding the cursor keeps up with the keyboard for five or six lines, then stops, and after a second or so catches up again. Closing and opening the solution will resolve the problem. Visual studio memory usage isn't particularly high at the point, at around 1.1MB
Another killer omission for me - Tab to next reference doesn't work
Hi Kevin,
Thank you for sharing your experience with us.
Tab to Next Reference is not working properly
A performance issue after a 20 minute work
Coming back to the first problem with the Remove Type Qualifier, would you please share log files with us?
A quick question for you - should pressing "c" to embed the current selection in a try catch block work in Roslyn? Just pressed it now, but it simply replaces the selection with the "c". I can use the Embed options from the refactor menu to do it, so it would seem a bit weird if the keymapping hadn't been kept from the old coderush?
Forget that, found it and it wasn't enabled
Hi Kevin,
I'm happy to hear that you found the solution.
Would you please send us the log files which we requested in our previous reply so that we can address the initial problem you reported?
Hi,
Just re-enabled original coderush and disabled coderush for roslyn. I'm not sure what's changed, but I am no longer able to reproduce the issue. Where it was failing before it is now working.
Hi Kevin,
If I understood you correctly, in the previous reply, you wrote that you found the "c" shortcut and that it was disabled.
Have you had a chance to check if enabling this shortcut makes the feature work again?
Hi Eugene,
Sorry, this is probably quite a confusing thread. The logs were requested to deal with the original issue, that the "Remove Type Qualifier" refactoring was not being offered using original coderush in a number of instances in one of our projects. The thread has meandered a bit since then, but that's what I'm responding too in my last message.
Hi Kevin,
Thank you for the clarification, I understand you.
Please contact us in case of further questions.
Hello Kevin,We implemented the Move Type to Namespace refactoring. It is included in our latest 16.2.5 update. You are welcome to try it.