CommunityTrisha Gee

Trisha Gee

Lead Java Advocate

IntelliJ IDEA 2021.1

Playlist

IntelliJ IDEA 2021.1
Tips to get you productive with the new or improved features in IntelliJ IDEA 2021.1
Working with Maven

Tutorial

Working with Maven
Understand how IntelliJ IDEA integrates with Maven.
Introduction

Part of tutorial

Introduction
Introduction to working with Maven and Maven projects in IntelliJ IDEA
Creating a Maven project

Part of tutorial

Creating a Maven project
Start by creating a brand-new project that uses Maven as the build tool
The Maven Tool Window

Part of tutorial

The Maven Tool Window
The Maven Tool Window gives you access to goals, dependencies, and more.
Importing a Maven project

Part of tutorial

Importing a Maven project
IntelliJ IDEA understands projects that use Maven and can import them with minimal configuration
Shortcuts

Part of tutorial

Shortcuts
Shortcuts used in the tutorial
Understanding Dependencies

Part of tutorial

Understanding Dependencies
Adding and visualising dependencies
Opening Tool Windows

Tip

Opening Tool Windows
Quickly open IntelliJ IDEA's tool windows without using the mouse, and easily find items in the window.
Writing Tests with Spock

Tutorial

Writing Tests with Spock
Learn about the Spock testing framework by creating a project that uses Spock to unit test Java code
A Simple Assertion

Part of tutorial

A Simple Assertion
Writing our first Spock test
Data Pipes

Part of tutorial

Data Pipes
Often we want to test the same set of criteria with different sets of data. Data pipes is one mechanism to do this.
Creating a Project for Spock

Part of tutorial

Creating a Project for Spock
Start by creating a new Java project which will be the basis for the rest of this tutorial.
Expecting Exceptions

Part of tutorial

Expecting Exceptions
Tests don't check just the happy paths, sometimes we want to say we're expecting a specific Exception.
Given, When and Then

Part of tutorial

Given, When and Then
See how Spock tests are usually structured.
Helper Methods

Part of tutorial

Helper Methods
Sometimes we need to move test code into a separate method. In this section, we look at some tips for this.
Data Tables

Part of tutorial

Data Tables
Data tables offer the same functionality as data pipes, but this syntax can sometimes be more readable for more complex sets of data.
Groovy Tips for Java Developers

Part of tutorial

Groovy Tips for Java Developers
Groovy's syntax and functionality might be unusual for Java developers to begin with, but it can be very helpful for testing.
Introduction

Part of tutorial

Introduction
Introduction to the tutorial and links to further reading.
Label Flexibility

Part of tutorial

Label Flexibility
Spock supports a range of different test labels to help you write the most readable tests
Setup and Teardown

Part of tutorial

Setup and Teardown
See how to set up, or clean up, test classes and methods in Spock.
Mocks

Part of tutorial

Mocks
Mocks are a useful testing tool. We can provide "empty" objects, so we don't have to initialise the whole application to test a section, and we can use mocks to check our code is making the calls we expect.
Setting up the Dependencies

Part of tutorial

Setting up the Dependencies
Add Spock framework dependencies to the project
Specifications as Documentation

Part of tutorial

Specifications as Documentation
Spock tests don't just tell the computer how to test the application, they can help developers understand what the application is supposed to do.
Shortcuts used

Part of tutorial

Shortcuts used
Finally, let's summarise the shortcuts we've learnt and see links to further information.
Verify All

Part of tutorial

Verify All
Test frameworks often stop the test at the first failure. Find out how to run all conditions to see which pass and which fail.
With

Part of tutorial

With
Sometimes we want to check more than one value on an object. We can use `with` to do this.
Spock IntelliJ IDEA Plugin

Part of tutorial

Spock IntelliJ IDEA Plugin
Add the Spock plugin to IntelliJ IDEA to get some extra help in the IDE.
Stubs

Part of tutorial

Stubs
Stub objects allow us to state from a test what values get injected into our application code. They can provide simple interfaces, so we don't have to initialise the whole application to test a section.
Running Gradle tasks

Part of tutorial

Running Gradle tasks
There are several convenient ways to run Gradle tasks from IntelliJ IDEA.
Working with Gradle

Tutorial

Working with Gradle
Understand how IntelliJ IDEA integrates with Gradle.
Gradle Settings

Part of tutorial

Gradle Settings
Where to change IntelliJ IDEA's settings fo Gradle.
Creating a Gradle project

Part of tutorial

Creating a Gradle project
Start by creating a brand-new project that uses Gradle as the build tool.
Group ID and version number

Part of tutorial

Group ID and version number
How to set up or change a project's group ID and version number.
Gradle dependencies

Part of tutorial

Gradle dependencies
Add or update dependencies in your build.gradle file.
The Gradle Tool Window

Part of tutorial

The Gradle Tool Window
How to find the Gradle tool window.
Introduction

Part of tutorial

Introduction
Introduction to working with Gradle and Gradle projects in IntelliJ IDEA
Gradle Wrapper

Part of tutorial

Gradle Wrapper
Useful information for working with projects that use the Gradle Wrapper.
Opening a Gradle project

Part of tutorial

Opening a Gradle project
What you need to know to get started with an existing Gradle project
Shortcuts

Part of tutorial

Shortcuts
Shortcuts used in the tutorial
Source set directories

Part of tutorial

Source set directories
Understand how IntelliJ IDEA deals with Gradle's source set directories
Syncing and reloading

Part of tutorial

Syncing and reloading
Sometimes you may need to encourage IntelliJ IDEA to reload any changes from the Gradle configuration.
The build.gradle file

Part of tutorial

The build.gradle file
See how IntelliJ IDEA makes it easier to work with Gradle's configuration file.
Setting an abbreviation

Part of tutorial

Setting an abbreviation
Use a unique abbreviation to quickly navigate to the Gradle tool window
Tour of a Gradle project

Part of tutorial

Tour of a Gradle project
Take a look around a standard Gradle project to understand it better.
Change your code font weight

Tip

Change your code font weight
We spend hours looking at our code. We can make this as pleasant as possible.
Prevent a package depending upon another

Tip

Prevent a package depending upon another
Enforce architecture rules, such as data access layers not depending upon UI layers.
Profile your application

Tip

Profile your application
See how your application is performing with the built-in profiler
Run your code with Docker, SSH or WSL

Tip

Run your code with Docker, SSH or WSL
Set a Run Target to change where your code runs
Tips for working with JetBrains Space

Tip

Tips for working with JetBrains Space
Space is an all-in-one collaboration tool, including chat, code repository, code review, issue tracking, and much more.
Code Reviews with Space

Tip

Code Reviews with Space
Perform code reviews without leaving the IDE.
Generate UML diagrams for your Kotlin code

Tip

Generate UML diagrams for your Kotlin code
JVM developers working with Kotlin code can create UML diagrams for their Kotlin classes, just like they could with Java classes
Use a lightweight inspection profile on commit

Tip

Use a lightweight inspection profile on commit
Fully customise the checks you must perform before you commit your changes to version control
Create a correct parent Sealed Class

Tip

Create a correct parent Sealed Class
Sealed types are a new idea for Java developers, let IntelliJ IDEA guide you in how to use them
Create a correct child Sealed Class

Tip

Create a correct child Sealed Class
Sealed types are a new idea for Java developers, let IntelliJ IDEA guide you in how to create child classes
Evaluate JSON Path expressions

Tip

Evaluate JSON Path expressions
Use IntelliJ IDEA to check if your JSON Path expression are correct.
Preview HTML updates in real time

Tip

Preview HTML updates in real time
See what your changes look like as you make them
Use new methods on the Streams API

Tip

Use new methods on the Streams API
Inspections can show us new features from Java 16
Turn on Preview Features to try new Java features

Tip

Turn on Preview Features to try new Java features
The latest versions of Java contain "Preview Features", features that are fully functional but require developer feedback. Try them out in IntelliJ IDEA.
Convert from Record

Tip

Convert from Record
Use quick intentions to convert a record to a class
Create Record

Tip

Create Record
Create a new Java record class
Convert class to record

Tip

Convert class to record
Use inspections to convert classes to Java 16 records
Identify and fix deprecated calls

Tip

Identify and fix deprecated calls
IntelliJ IDEA will warn you if you're using deprecated methods, and they will be shown with a strikethrough if they're marked for removal
Use Pattern Matching for instanceof

Tip

Use Pattern Matching for instanceof
Inspections can guide us to use new Java features
Java 16

Playlist

Java 16
Get up to speed on Java 16 with our top tips.
Trisha Gee

Author

Trisha Gee
Lead Java Advocate