(this is from my old blog)
A while ago, I was coding an animation widget for work and I needed to calculate a simple but still nontrivial formula and put the result as a constant in my code. Instead of opening an external calculator I decided to create a plugin for IntelliJ.
I wanted to be able to mark a mathematical formula, press CTRL+SHIFT+ALT+C and get the expression replaced with the result.
var duration = 15*60*1000;
…turns in to….
var duration = 90000;
Maybe not the most useful IntelliJ plugin, compared to others, but for me this was the perfect project to learn how to create a simple plugin for IntelliJ (which by the way it the best IDE in all categories!).
I think the result is a good example of how easy it is to develop plugins for IntelliJ.
You can download the plugin from http://plugins.intellij.net/plugin/?id=1494.
Email me if you’re interested in the source code.