📜 ⬆️ ⬇️

Consulo: ~ 1000 kommitov, or as the autumn passed

For those who missed my posts:

Consulo is a fork of IntelliJ IDEA Community Edition, which has support for .NET (C # currently, and this sector still has a lot of emphasis), Java, Javascript (NodeJS), and more. The project has collected many open plug-ins in itself. At the same time, the code remained open.

Despite the fact that many of my friends already use it with might and main in the Unity3D production under Mac OS, I still cannot boast a stable release.
')
Below, I will tell you how my autumn went, and how these three months of regular work affected the .NET + C # plugins, and much more.

New resolving


I will begin, perhaps, with the most voluminous task of those that stood before me - I needed to completely rewrite the syntactic search (namesplays, classes, methods, fields in .cs files, etc.).

Pull request


Before the census of the algorithm, working with small modules went smoothly, but if the program grew to 10 or more classes, then the responsiveness of the IDE became a big problem. I even had to introduce the ability to optionally disable the search, because otherwise Consulo constantly crashed users with a weak PC configuration.

It was a difficult step, because I needed to rethink the existing search algorithm and rewrite it taking into account all weaknesses. The first iterations cannot be called successful, but in the end I managed to bring the new algorithm to the mind and successfully managed this pull request.

Special thanks I want to express to Denis Shevchenko from pragmatix-corp.com, who helped me in testing the plugin.

Generic & Lambdas


My headache. After the implementation of the new search, I took on the lyabmdy, which, for example, LINQ . However, in order to implement lambda and LINQ, I needed to solve the problems of finding the Generic Type . In the process, I implemented basic inference for generic parameters - and lambdas somewhere in 50% of cases earned. To date, the lambda problem has not been completed ( issue 157 ), the implementation of which is expected to solve all remaining problems.



Code Style


From the very beginning of the work on the C # plugin, I did not pay any attention to this issue, as I got used to the “hardcore”, which displays the code as follows:



At the request of several people, I paid attention to this and added the initial settings of the C # code style as a result, and now the default code in the IDE looks like this:



LINQ


I put this task to the farthest corner, for I once decided that this is not a priority task. It was so until yesterday. It was like this:



Somehow not really, right?

And I thought so. And I decided to still pay attention to this, and after one day of coding, everything looks much better.



And what else?


I didn’t describe many things, this is entering support for Covariance + Contravariance, rewriting the search for methods, altering the type system, a bunch of edits to many subsystems of .NET + C # plug-ins.

Also, I didn’t write about how I tried to correct task 140 , in the end I broke everything, I had to roll back and transfer everything to PR 149 .

What's next?


And then we have - the most interesting.

Nuget


The ability to download and automatically add NuGet libraries via packages.config has been added. So far, they are being downloaded only from nuget.org and there is no visual browsing of libraries, but this will fix some of the problems when they are used from the repository.

image

Unity3d


Yes Unity3D. I finally decided to look this way. What was done


Java as .NET app (IKVM.NET)


I am also looking this way, trying to bring implementation to mind. Now works static and dynamic compilation of Java code. In this part of the search. But that ends the good news. There are problems in stability, IKVM.NET plugin can easily put Consulo on the blades (or user: D). The plans are to support the debugger .NET in Java code (we are waiting for a fresh build of Mono for Windows).

The end?


Only the end of the article. I will continue to do what I did. The plans - to bring to mind, what is already there.

Even though I do everything myself, I have a lot of "holes" in places where my hands simply do not want to.

If someone has a desire to help me with the site, with writing plug-ins (Java language, but also people who know C # are required to write Microsoft Debugger), or with testing, write me in Habr dialogs, or by mail

Thank.

PS:
C # is not the end, but only the beginning

Source: https://habr.com/ru/post/244571/


All Articles