Community Trisha Gee

Trisha Gee

Lead Java Advocate

playlist

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

tutorial

Working with Maven
Understand how IntelliJ IDEA integrates with Maven.

Part of tutorial

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

Part of tutorial

Shortcuts
Shortcuts used in the tutorial

Part of tutorial

Understanding Dependencies
Adding and visualising dependencies

Part of tutorial

Introduction
Introduction to working with Maven and Maven projects in IntelliJ IDEA

Part of tutorial

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

Part of tutorial

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

tip

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

tutorial

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

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.

Part of tutorial

A Simple Assertion
Writing our first Spock test

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.

Part of tutorial

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

Part of tutorial

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

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.

Part of tutorial

Introduction
Introduction to the tutorial and links to further reading.

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.

Part of tutorial

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

Part of tutorial

Setting up the Dependencies
Add Spock framework dependencies to the project

Part of tutorial

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

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.

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.

Part of tutorial

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

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.

Part of tutorial

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

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.

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.

Part of tutorial

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

Part of tutorial

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

tutorial

Working with Gradle
Understand how IntelliJ IDEA integrates with Gradle.

Part of tutorial

Creating a Gradle project
Start by creating a brand-new project that uses Gradle as the build tool.

Part of tutorial

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

Part of tutorial

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

Part of tutorial

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

Part of tutorial

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

Part of tutorial

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

Part of tutorial

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

Part of tutorial

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

Part of tutorial

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

Part of tutorial

Shortcuts
Shortcuts used in the tutorial

Part of tutorial

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

Part of tutorial

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

Part of tutorial

Tour of a Gradle project
Take a look around a standard Gradle project to understand it better.

Part of tutorial

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

tip

Change your code font weight
We spend hours looking at our code. We can make this as pleasant as possible.

tip

Profile your application
See how your application is performing with the built-in profiler

tip

Run your code with Docker, SSH or WSL
Set a Run Target to change where your code runs

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.

tip

Code Reviews with Space
Perform code reviews without leaving the IDE.

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

tip

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

tip

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

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

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

tip

Evaluate JSON Path expressions
Use IntelliJ IDEA to check if your JSON Path expression are correct.

tip

Preview HTML updates in real time
See what your changes look like as you make them

tip

Use new methods on the Streams API
Inspections can show us new features from Java 16

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.

playlist

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

tip

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

tip

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

tip

Create Record
Create a new Java record class

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

tip

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

author

Trisha Gee
Lead Java Advocate