Some useful features in Visual Studio are not supported by Elements:
1) Unable to use the formatter to format current document.
Just try “Edit->Advanced->Format Document” and there’s no effect. It seems the VS C# formatter won’t work for Elements.
2) Unable to set a shortcut for Refactor.Rename in context menu
I usually set F2 as the shortcut for Refactor.Rename, but it won’t work in Elements.
3) Unable to "Collapse to Definitions"
Just try “Edit->Outlining->Collapse to Definitions” and there’s no effect. This feature can collapse functions and properties in a smart way, which is really useful when I review complex codes.
The FormatDocument should work. I just tried it on the simple project and got the document formatted. Could you please give me more info or a testcase where it doesn’t work.
But this only takes effect in files of Microsoft C# project, not in RemObjects project. So I guess RO C# has its own formatter, then there are two issues:
The options of RO C# formatter are too few. In fact I’m not quite sure where the options of RO C# formatter in this UI are:
Try to format following codes by RO C# formatter, and you will see it does nothing for different open brace style:
static class Program
{
public static Int32 Main(string[] args){ // open brace on the same line
var t = new TestClass();
Console.WriteLine(t.test());
Console.ReadLine();
}
}
public class TestClass
{
public int test()
{ // open brace on the new line
return 2;
}
}
I think the best thing is we can format RO C# files with VS C# formatter.
Great to hear that!
For the formatter issue, I suggest you to consider intergrating the AStyle(http://astyle.sourceforge.net/) directly into your VS plugin, which is not perfect but much better than the current one.
Actually I’m using Sublime Text + AStyle to do major coding work on Elements, because the VS + AStyle can’t work well with Elements VS Plugin.