Save to file IntelliJ Run Configuration

I had to configure a run configuration so that I could run all JUnit Tests in Gragle Multi-Module Project.

Then I wanted to port this configuration from one IntelliJ instance to another.

1 Define the JUnit Run Configuration on the parent project

Define the JUnit Run Configuration on the parent project which runs all the tests in all the subProjects

2 Click on Store as project file

<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="ALL_Loyalty" type="JUnit" factoryName="JUnit">
    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
    <option name="ALTERNATIVE_JRE_PATH" value="temurin-17" />
    <option name="MAIN_CLASS_NAME" value="" />
    <option name="METHOD_NAME" value="" />
    <option name="TEST_OBJECT" value="pattern" />
    <option name="TEST_SEARCH_SCOPE">
      <value defaultName="wholeProject" />
    </option>
    <patterns>
      <pattern testClass=".*" />
    </patterns>
    <method v="2">
      <option name="Make" enabled="true" />
    </method>
  </configuration>
</component>

Re-ordering git commits with IntelliJ

Re-ordering git commits with IntelliJ’s Interactively Rebase I have managed to re-arrange/re-order commits (on a local branch)

https://augustl.com/blog/2019/using_rebase_fixup_in_intellij_idea/

  • First, select the earliest commit in the history that you want to operate on.
  • Click on Interatively Rebase from here

IntelliJ Docker Plugin, it’s magic!

IntelliJ Docker Plugin will blow you away. I’ve recently found out about it, and it is invaluable in helping me debug containers launched by AWS SAM which emulate AWS Lambda Functions.

  • install the plugin , in case it is not installed
  • go to Tools, Tool Windows, Services

It will auto-detect the running docker

Explore the running containers and you can see almost everything you want, Example:

  • you can event open a terminal on a running container (even though the terminal in not running in interactive mode)

IntelliJ IDEA Cheat Sheet

https://www.shortcutfoo.com/app/dojos/intellij-idea-win/cheatsheet

– here are all the keybindings you must know about IntelliJ

https://moduscreate.com/blog/12-intellij-idea-keyboard-shortcuts/

Here are some shortcuts I picked from Vlad Rentea’s refactoring kata

ALT + j / Successively press ⌃G – to get multi cursor selection
https://www.jetbrains.com/help/rider/Multicursor.html#column_selection

  • CTRL ALT M – Extract Method
  • CTRL ALT N – inline code

Also, Font Ligatures