Book Image

IntelliJ IDEA Essentials

By : Jaroslaw Krochmalski
Book Image

IntelliJ IDEA Essentials

By: Jaroslaw Krochmalski

Overview of this book

Table of Contents (17 chapters)
IntelliJ IDEA Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The first version of IntelliJ IDEA was released in January 2001. It is a mature, integrated development environment (IDE), designed to help you in the coding process, and supports a large number of different frameworks, tools, and targets. It works with multiple programming languages. It now includes full support for Java 8 and Java EE 7.

The key objective of IntelliJ IDEA is to increase and assist developer productivity. Whether you develop in Java, Scala, or PHP, or make the frontend using HTML and JavaScript, IntelliJ IDEA's smart and relevant suggestions and code completion, on-the-fly code analysis, and respectable refactoring tools will support you in every step.

When you are migrating from NetBeans or Eclipse, you will quickly see that IntelliJ IDEA is different because it understands the context. The IDE knows where you are in the editor and reacts accordingly; you will be surprised at how smart IntelliJ IDEA behaves.

This tool is a generic workhorse rather than a strict Java IDE. In this book, you will learn how to make IntelliJ IDEA work for you and get your job done in the most efficient and pleasant way.

What this books covers

Although the book describes the latest version of IntelliJ IDEA - 14, most of the concepts will also work on the previous revision of the IDE.

Chapter 1, Get to Know Your IDE, Fast, is a very concise note on editions comparison, requirements and installing IntelliJ IDEA in Windows, OSX, and Linux. This chapter guides you through the main workspace and show you ways to customize it for different tasks, presenting briefly the most useful plugins, IDE settings, and configuration tips.

Chapter 2, Off We Go—To the Code, describes the process of setting up a new project or importing an existing one. The chapter explains terminology differences with NetBeans and Eclipse and presents the concept of modules and artifacts.

Chapter 3, The Editor, describes the core of IntelliJ IDEA—the editor. In this chapter, you use state-of-the-art code completion, templates, and other great IntelliJ IDEA features. This chapter shows how to set up the editor and gives you some productivity tips.

Chapter 4, Make It Better—Refactoring, presents the powerful refactoring toolset of IntelliJ IDEA. You are guided through the most useful refactoring techniques.

Chapter 5, Make It Happen—Running Your Project, covers configuring the runtime environment for your project. We also talk about adding run configurations, either on the server or standalone. This chapter focusses not only on Java, but on other technologies such as Node.js as well.

Chapter 6, Building Your Project, focusses on building a project. You use IntelliJ IDEA's own build system, and Maven and Gradle integration as well.

Chapter 7, Red or Green? Test Your Code, is all about unit testing in IntelliJ IDEA. We focus on setting IntelliJ IDEA up specifically to run tests. You create JUnit and TestNG run configurations and then run and debug the tests. Then, you are given a brief overview of the test runner windows, useful settings, and option suggestions.

Chapter 8, Squash'em – The Debugger, focusses on the IntelliJ IDEA debugger. You get familiar with the debugger tool window and debugger options. We look under the hood—evaluating expressions, using watches, conditional breakpoints, and other debugger features. We also talk briefly about remote debugging.

Chapter 9, Working with Your Team, This chapter is all about version control, and managing change lists and tasks. There is a brief description on how to set up VCS integration, with the main focus on Git. This chapter describes integration with popular bug trackers, such as JIRA and YouTRACK.

Chapter 10, Not Enough? Extend It, describes briefly the plugin architecture of IntelliJ IDEA. We talk about possibilities and develop a simple plugin, so that you have knowledge of how to extend the IDE. You are also presented with useful links and resources to develop your knowledge even further.

What you need for this book

You will need a Mac or PC, running OS X, MS Windows, or Linux, to be able to set up and run IntelliJ IDEA. To learn the presented features, you will also need the tool itself, of course. You can use the free 30-day trial of Ultimate Edition or use the Community Edition, which is available free of charge. We will flag the differences and let you know what features are not available in the free version of the IDE. You can read how to get it in Chapter 1, Get to Know Your IDE, Fast.

Who this book is for

This book is a fast-paced introduction to IntelliJ IDEA and is aimed at users who want to learn the essentials of the new IDE in a nimble and efficient way.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "If you keep getting OutOfMemoryError in PermGen space exceptions, try to change the -XX:MaxPermSize setting."

A block of code is set as follows:

private boolean isValid(int a) {
  return a > 15 && a < 100;
}

Any command-line input or output is written as follows:

git clone git://git.jetbrains.org/idea/community.git idea

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "To do this, first download the IntelliJ Configuration Server plugin, using the Plugins page of the Settings dialog box."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.