Embracing the Messiness in Search of Epic Solutions

Tag: IntelliJ IDEA

  • GCP: Pushing Codebase from IntelliJ IDEA to VM Instance

    OBJECTIVE To push codebase from IntelliJ IDEA (or any JetBrains products) on a local machine to a VM instance in Google Cloud Platform. To run the codebase remotely. WHY DO THIS You want to leverage all the power of a modern IDE on your 4K screen. You do not want to use remote desktop tools… Read More…

  • Spring Boot: Restarting App using Dev Tools with IntelliJ IDEA

    Spring Boot provides spring-boot-devtools module that allows the app to “smartly” restart whenever the files on the classpath have changed. Because the rarely changed classes (ex: 3rd party JARs) are separated out into a different classloader from the app’s actively developed classes’ classloader, it allows Spring Boot to quickly restart the app compared to “cold… Read More…

  • IntelliJ IDEA: Configuring Default Project Settings

    PROBLEM When creating or checking out a project for the first time in IntelliJ IDEA, we may need to reconfigure the project settings. My biggest pain is IntelliJ IDEA will always use the wrong Maven version when I check out the project from the source control. SOLUTION The good news is there is a way… Read More…

  • IntelliJ IDEA 14.1: Better equals(), hashCode() and toString()

    PROBLEM Let’s assume we want to create the default equals(), hashCode() and toString() with the following bean:- Most IDEs, including older version of IntelliJ, have code generation features that would create something similar to this:- While it works, the generated code is usually crazy horrendous. SOLUTION With IntelliJ 14.x, it allows us to select templates… Read More…

  • IntelliJ IDEA: Generating Immutable Classes and Fields

    PROBLEM By default, IntelliJ IDEA generates mutable classes and fields. One of the steps to achieve immutability is to make all classes and fields to be final. SOLUTION Making Fields Final Go to Preferences… -> Code Style -> Java -> Code Generation tab Under Final Modifier, check both Make generated local variables final and Make… Read More…

  • IntelliJ : Karma Integration

    Overview Although we can run karma start karma.conf.js on the command line to start Karma test runner, JetBrains provides a great Karma-IntelliJ integration to run and display the JavaScript test results within IntelliJ. Prerequisites Install Karma Plugin in IntelliJ The first step is to install the Karma plugin created by JetBrains. Create Karma “Run” Configuration… Read More…