I started competing recently at HackerRank and I'd like to implement an intellij plugin to optimize my coding environment for upcoming contests. What I need is simple: open 3 custom files programmatically (input, expected and actual) when my solution fails a test case.
For better context here's the exact scenario I'm facing:
The problem with the above is that whenever a test fails I have to go find and open input, expected and actual manually and then lay them out side by side next to code using vertical splits so I can debug conveniently (see below)
Ideally I'd get to programmatically open all 3 files from my prewritten test case whenever a failure is detected and have them laid-out as in screenshot above. Would such a thing be possible with a custom written plugin, does IntelliJ allow to open files programmatically?
I have made something similar. A console filter which added hyperlinks for opening a Diff window, where I was comparing a xml/json from the console to a file.
It should be easy to customize it to make a 3-way diff, or even open it automatically instead of using console hyperlinks.
Or if you really want to open editors, then find usages of OpenFileDescriptor
in intellij-community and look into the following plugin: https://github.com/dkandalov/tab-shifter