Consulo: Code Coverage, Unity3D and other changes

    For those who missed my posts: Consulo is a fork of IntelliJ IDEA Community Edition, which has .NET support (C # at the moment, and there is a lot of emphasis on this sector), Java.

    In this mini-article, I will share with you what I managed to do in the last 2 months.


    Code Coverage (with OpenCover)

    Starting in January, support for code coverage appeared (using OpenCover for the Microsoft .NET Framework). Allows you to see the coverage of the code both during normal application launch, and for NUnit tests. Code coverage uses OpenCover, which alas does not work on Mono. About Mono Coverage is unclear. Coverage of the code works at the simplest level; amendments to the platform are needed, which are so far only in plans.

    NUnit with Mono Debugger

    Mono Debugger and NUnit test support were added a long time ago. But, due to a bug, running NUnit under Mono was not possible. After fixing this bug, Mono Debugger support was also added during the launch of the tests.
    There is no debugger for Microsoft .NET yet. Accordingly, the debugging of tests does not work yet.


    Message methods

    In Unity, there are methods like Messages, which, in fact, do not overload anything, but when executed, they are called by the Unity engine itself, through reflection. At the same time, you can accidentally rename the method, and the code will compile quietly, but the method will stop working. To avoid this, a “highlight” marker was added opposite the method. When you hover over that, you can see a brief description.

    Adding methods via completion

    Support was also added for adding these methods through completion. It is possible to add two kinds of methods: parameterless and / or full signature.

    New import mode

    Previously, there was no support for importing Unity projects. In fact, we created the project on top of the unity project and added everything manually. There were also problems with the fact that the project did not have all the necessary libraries. Now, a new project import system has been implemented - it understands the structure of the Unity project much better, and the problem with importing Unity SDK libraries (or plugins) has been solved. So far, the old and new “import” methods coexist together, but, in the near future, the old method will be deleted.

    K Runtime (ASP .NET vNext)

    Recently, I became interested in the ASP .NET 5 framework, which resulted in basic support for “K” projects. Support was added for determining the SDK runtime, dependencies, analysis of C # files, launch. Alas, at the moment, Nuget support is very modest and you have to hardcode dependencies so that the code analysis goes right. But, for the most part, this is still an experiment. It is still a long way to fully support the ASP.NET platform, and I don’t think they are seriously working on it at the moment.
    Anticipating questions: No, implementation of support for Razor templates is not planned yet.

    C #

    Static Vs Instance

    Previously, completion did not understand where to use the Static & Instance methods, and it was possible to write ala String.GetHashCode () - and the code was not highlighted by an error, but it did not compile.
    Now completion correctly defines the context of the element. Checks CS0120 & CS0176 have also been added which are responsible for validating these calls. But these fixes created an interesting bug 208 , which has not yet been fixed.

    Code Style

    In January, CodeStyle support was redesigned. Many familiar options have appeared in Wrapping & Spacing.

    Expected Type System

    Now completion knows what type it expects and sorts the necessary elements higher. Also, this correction concerns attributes; when entering text inside '[]', all attributes go to the beginning of the list.

    Plan for the future

    No matter how funny it may sound, but I will continue to do what I did. The main problem now is that, at the moment, I simply do not have testers or people who want to help me either with the code, or at least with the site. I have no designer, and therefore I can’t come up with a decent style for the site or splash. You have to do everything yourself and, at the same time, still have time to work somehow.

    Also popular now: