What’s new in version 2019.2
Several improvements come with version 2019.2. Many happen in the background, but there are also some new features in this version. Here is what’s new..
Reinstate support for IDE’s like PyCharm, CLion, WebStorm, …
In version 2019.2, the IntelliJ API changed quite a bit. In order to support not only IntelliJ IDEA, but other IDE’s as well, some code and the dependencies on IDEA classes needed to be fixed. As some of you might have experienced, I did not succeed doing so in the first version of 2019.2. However, last night, I published an updated version 2019.2.1 which should now be compatible with all of the main IntelliJ-based products.
To give you a glimpse behind the scenes why this is necessary at all: IntelliJ IDEA is full featured and supports many things that are not part of other IDE’s. For instance, the module-system that lets you bundle logical parts of your code might not be part of other IDE’s. To make the plugin work in, e.g. PyCharm, these dependencies must now be marked as optional which means that I had to analyse the plugin code and find out which of the features are problematic.
Since this was also new to me, it took some time to understand the exact workflow. With version 2019.2.1, everything should now be set-up and the plugin will be as usual available for all IntelliJ-based IDE’s.
Completion provider for static string arguments
One nice feature request was the support of defined string arguments. That means, if you have a function that takes strings as accessor to select certain actions, you can now use the new completion provider to insert them automatically. Here is an example
colorFunc[x_?NumericQ] := With[{xx = Mod[x, 1]}, Blend[{Red, Blue, Green}, x]];
colorFunc["Description"] := "A color-scheme of the 3 basic color red, green, and blue";
colorFunc["Colors"] := {Red, Blue, Green};
colorFunc["Panel"] := Panel[Row@Table[colorFunc[x], {x, 0, 1, .1}]]
When coding something like this, one might forget which strings were used to access certain information.
With the new smart completion, you can hit Ctrl
+Shift
+Space
inside the brackets of colorFunc
and you
will get a pop-up window that lets you insert available string arguments
At the moment, this feature is not particularly clever. It simply collects all string arguments from usages of the function.
Also, it uses only a basic insert handler, you it doesn’t work correctly, if you already opened the string quotes.
Best to use it, when you haven’t typed anything at the place where you want to insert the string.
Simply hit Ctrl
+Shift
+Space
and insert the argument.
Support for Wolfram Script files
Support for Wolfram Language Script was added. In detail this means, you can (a) create .wls
files and they are recognized
by the plugin and (b) the shebang which is part of shell-scripts is parsed as a comment:
Several fixes for creating files with template code
In the past, some users complained that the entry for new Wolfram files in the pop-up menu is near the bottom.
I have reworked this whole feature and now, when you go to your file tree and press Alt
+Insert
, you have the
Wolfram entry near the top.
Additionally, you can insert standard files like the PacletInfo.m
directly from the new menu
Finally, a bug that didn’t allow you to create .wl
files (they were created as .wl.m
files) is fixed now.
So when you create a Wolfram file, you have two choices:
- you can simply give the name without an extension and the plugin will append
.m
to files,.mt
to tests, and.wls
to Wolfram Script files - you specify one of valid extensions explicitly (
.m
,.wl
..mt
,.wlt
,.wls
)