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.
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
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
Introduction

Part of tutorial

Introduction
Introduction to working with Maven and Maven projects in IntelliJ IDEA
The Maven Tool Window

Part of tutorial

The Maven Tool Window
The Maven Tool Window gives you access to goals, dependencies, and more.
Understanding Dependencies

Part of tutorial

Understanding Dependencies
Adding and visualising dependencies
Shortcuts

Part of tutorial

Shortcuts
Shortcuts used in the tutorial
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
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.
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.
Given, When and Then

Part of tutorial

Given, When and Then
See how Spock tests are usually structured.
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.
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.
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.
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
Setting up the Dependencies

Part of tutorial

Setting up the Dependencies
Add Spock framework dependencies to the project
Shortcuts used

Part of tutorial

Shortcuts used
Finally, let's summarise the shortcuts we've learnt and see links to further information.
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.
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.
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.
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.
With

Part of tutorial

With
Sometimes we want to check more than one value on an object. We can use `with` to do this.
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.
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.
The Gradle Tool Window

Part of tutorial

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

Part of tutorial

Gradle dependencies
Add or update dependencies in your build.gradle file.
Gradle Settings

Part of tutorial

Gradle Settings
Where to change IntelliJ IDEA's settings fo Gradle.
Gradle Wrapper

Part of tutorial

Gradle Wrapper
Useful information for working with projects that use the Gradle Wrapper.
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.
Opening a Gradle project

Part of tutorial

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

Part of tutorial

Setting an abbreviation
Use a unique abbreviation to quickly navigate to the Gradle tool window
Introduction

Part of tutorial

Introduction
Introduction to working with Gradle and Gradle projects in IntelliJ IDEA
Source set directories

Part of tutorial

Source set directories
Understand how IntelliJ IDEA deals with Gradle's source set directories
Shortcuts

Part of tutorial

Shortcuts
Shortcuts used in the tutorial
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.
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
Convert class to record

tip

Convert class to record
Use inspections to convert classes to Java 16 records
Create Record

tip

Create Record
Create a new Java record class
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