IntelliJ IDEA in Action
Duane K. Fields, Stephen Saunders, Eugene Belyaev
  • March 2006
  • ISBN 9781932394443
  • 450 pages

An absolute winner! A must for IDEA developer's shelf!

Mark Monster, Software Developer, BT

The purpose of this most excellent book is to get you up and running quickly. Perhaps more importantly, this book shows you how to use IDEA's multitude of powerful software development tools to their fullest advantage!
—John R. Vacca, Author and IT Consultant

If you work with IntelliJ IDEA™, you know its unique power and have already seen a jump in your productivity. But because IntelliJ IDEA is a rich system you, like many others, are probably using just a small subset of its features. You can overcome this syndrome and see your productivity take another leap forward—all you need is this book.

For new users, IntelliJ IDEA in Action is a logically organized and clearly expressed introduction to a big subject. For veterans, it is also an invaluable guide to the expert techniques they need to know to draw a lot more power out of this incredible tool. You get a broad overview and deep understanding of the features in IntelliJ IDEA.

Table of Contents show full



about this book

1. Getting started with IDEA

1.1. Installing and running IDEA

1.1.1. Downloading the latest version

1.1.2. Installing IDEA

1.1.3. Running IDEA for the first time

1.2. Reviewing the IDEA interface

1.2.1. The main IDEA workspace

1.2.2. The main menu bar

1.2.3. The IDEA toolbar

1.2.4. The source code editor

1.2.5. The tool windows

1.3. Implementing "Hello, World"

1.3.1. Creating a project

1.3.2. Making a Java class

1.3.3. Building the project

1.3.4. Running the project

1.4. The plot thickens

1.4.1. Welcome to ACME Incorporated

1.4.2. Starting the ACME project

1.5. Summary

2. Introducing the IDEA editor

2.1. Exploring the IDEA interface

2.1.1. Hanging out in the gutter

2.1.2. Using the marker bar

2.1.3. Using the editor tabs

2.1.4. Exploring the status bar

2.1.5. Exploring the tool windows

2.2. Using the IDEA editor

2.2.1. Writing the first ACME classes and interfaces

2.2.2. Opening files into the editor

2.2.3. Saving your work

2.2.4. Printing your file

2.2.5. Navigating in the editor

2.2.6. Making text selections

2.2.7. Using IDEA’s undo and redo mechanism

2.2.8. Cutting, copying, and pasting

2.2.9. Searching for and replacing text

2.3. Summary

3. Using the IDEA editor

3.1. What makes IDEA the intelligent editor?

3.2. Using code folding

3.3. Navigating through your Java code

3.3.1. Navigating between methods

3.3.2. Navigating to a symbol’s declaration

3.3.3. Navigating to a symbol by name

3.3.4. Navigating with the structure view pop-up

3.3.5. Navigating to an overridden/implemented or overriding/implementing method

3.4. Analyzing your Java code in real-time

3.4.1. How IDEA alerts you to problems in your code

3.4.2. Monitoring the status of the current document

3.4.3. Navigating between problems in the current file

3.4.4. Controlling the reparse delay

3.4.5. Configuring IDEA’s warning levels

3.5. Getting help from the JavaDoc and API references

3.5.1. Viewing method parameters

3.5.2. Viewing the JavaDoc

3.5.3. Creating JavaDoc comments

3.5.4. Generating your project’s JavaDoc reference

3.6. Code completion

3.6.1. Using IDEA’s code-completion features to do your work for you

3.6.2. Completing brackets, braces, parentheses, and quotation marks with smart completion

3.6.3. Commenting out code

3.6.4. Reformatting code

3.6.5. Customizing IDEA’s code completion settings

3.7. Using IDEA’s code-generation tools

3.7.1. Generating constructors

3.7.2. Generating accessor and mutator methods

3.7.3. Generating hashCode and equals methods

3.7.4. Overriding methods in your superclass

3.7.5. Implementing methods of an interface

3.7.6. Creating delegation methods

3.7.7. Enclosing a block of code

3.7.8. Customizing code generated by IDEA

3.8. Programming by intention

3.8.1. What are intention actions?

3.8.2. Why and when IDEA suggests intention actions

3.8.3. Using intention actions to fix errors

3.8.4. Using intention actions for code completion

3.8.5. Choosing an intention action to execute

3.8.6. Disabling intention alerts

3.8.7. Exploring some common intention actions

3.9. Continuing the ACME project

3.10. Summary

4. Managing projects

4.1. Understanding IDEA’s project strategy

4.1.1. Examining the IDEA project hierarchy

4.1.2. Selecting different types of modules

4.1.3. Selecting a project structure

4.2. Working with projects

4.2.1. Creating a new project

4.2.2. Managing project settings

4.2.3. Working with project files

4.3. Working with modules

4.3.1. Managing project modules

4.3.2. Creating a Java module with the module wizard

4.3.3. Managing Java module settings

4.4. Working with libraries

4.4.1. Understanding library basics

4.4.2. Adding libraries to the project

4.4.3. Migrating projects from IDEA 3.x

4.4.4. Sharing projects with others

4.4.5. Using path variables

4.5. Using the Project tool window

4.5.1. Understanding the Project and Packages views

4.5.2. Configuring the Project window

4.6. Summary

5. Building and running applications

5.1. Building a project

5.1.1. How IDEA builds your project

5.1.2. Setting up a compiler

5.1.3. Building an application under IDEA

5.1.4. Reviewing the results of the build

5.2. Extending IDEA’s build system with Ant

5.2.1. Introducing Ant

5.2.2. Improving your build process with Ant

5.2.3. Working with Ant build files

5.2.4. Executing Ant targets

5.2.5. Following Ant’s progress in the Messages window

5.2.6. Controlling Ant’s behavior

5.3. Running your project

5.3.1. Managing Run/Debug configuration profiles

5.3.2. Executing a Run configuration

5.3.3. Using the Run window console

5.4. Expanding the ACME project

5.4.1. Adding a library to the ACME project

5.4.2. Improving and running the ACME project

5.5. Summary

6. Debugging applications

6.1. Introducing the debugging process

6.1.1. Finding and fixing bugs with a debugger

6.1.2. Preparing your code for debugging

6.1.3. Debugging your source code

6.2. Working with breakpoints

6.2.1. Managing breakpoints

6.2.2. Working with line number breakpoints

6.2.3. Working with method breakpoints

6.2.4. Working with exception breakpoints

6.2.5. Working with field watchpoints

6.2.6. Setting conditional breakpoints

6.2.7. Configuring breakpoint actions

6.3. Debugging an application

6.3.1. Executing an application under the debugger

6.3.2. Debugging an application on a remote server

6.3.3. Stepping through the program

6.3.4. Working with threads

6.4. Viewing runtime data in the debugger

6.4.1. Understanding the Java call stack

6.4.2. Inspecting a stack frame

6.4.3. Working with watches

6.4.4. Altering your program while debugging

6.5. Configuring the debugger

6.5.1. Managing display preferences

6.5.2. Limiting the scope of debugging

6.5.3. Customizing the data display view

6.5.4. Improving the speed of the debugger

6.6. Improving the quality of the ACME project

6.7. Summary

7. Testing applications with JUnit

7.1. Testing applications with JUnit

7.1.1. Understanding the JUnit philosophy

7.1.2. Exploring the JUnit API

7.2. Adding test cases to your project

7.2.1. Creating a test case from a file template

7.2.2. Adding the JUnit library to your Classpath

7.3. Running test cases in IDEA

7.3.1. Creating a Run/Debug configuration for your test

7.3.2. Running your unit test configuration

7.4. Working with IDEA’s JUnit test runner

7.4.1. Exploring the JUnit tool window

7.4.2. Monitoring testing progress

7.4.3. Managing the testing session

7.4.4. Analyzing test results

7.5. Improving the quality of the ACME project

7.6. Summary

8. Using version control

8.1. Configuring your project for version control

8.1.1. Understanding version control basics

8.1.2. Enabling version control support in IDEA

8.1.3. Configuring IDEA to use CVS

8.1.4. Configuring other types of version control systems

8.2. Working with files under CVS

8.2.1. Retrieving files from the repository

8.2.2. Working with files under CVS control

8.2.3. Committing your changes

8.2.4. Working with branches and tags

8.2.5. Viewing change history

8.3. Using IDEA’s Local History

8.3.1. Understanding IDEA’s Local History

8.3.2. How IDEA tracks your changes

8.3.3. Exploring your Local History

8.4. Summary

9. Analyzing and refactoring applications

9.1. Analyzing your code

9.1.1. Tracking down dependencies

9.1.2. Exploring code with the Structure view

9.1.3. Exploring the code hierarchy

9.2. Locating potential problems with the code inspector

9.2.1. Launching the inspector

9.2.2. Specifying inspections to perform

9.2.3. Viewing the inspection results

9.3. Other advanced code analysis features

9.3.1. Using Structural Search and Replace

9.3.2. Analyzing dependencies

9.3.3. Locating duplicate code

9.4. Improving code design through refactoring

9.4.1. Performing a refactoring

9.4.2. Renaming code symbols to improve readability

9.4.3. Refactoring to improve class or package organization

9.4.4. Working with fields, variables, and constants

9.4.5. Refactoring method calls to improve usability

9.4.6. Restructuring class hierarchies

9.4.7. Migrating source code to new package or class names

9.5. Summary

10. Developing Swing applications

10.1. Understanding the GUI Designer

10.1.1. The GUI-building process

10.1.2. Working with the user interface

10.2. Working with forms

10.2.1. Creating a new form

10.2.2. Placing components into the workspace

10.2.3. Setting component properties

10.2.4. Laying out a form

10.3. Designing an ACME GUI

10.3.1. Creating a new GUI form in IDEA

10.3.2. Manually creating the basic layout

10.3.3. Applying the grid layout

10.3.4. Setting component properties

10.3.5. Touching up the final interface

10.4. Understanding properties

10.4.1. Spanning rows and columns

10.4.2. Setting an anchor point (cell alignment)

10.4.3. Using spacers to control layout

10.4.4. Controlling the grid spacing

10.4.5. Setting container margins

10.4.6. Setting sizing policies

10.4.7. Setting fill policies

10.4.8. Adding borders

10.5. Adding functionality to forms

10.5.1. Binding forms and their components

10.5.2. Creating a constructor

10.5.3. Generating getter/setter methods for fields bound to data

10.5.4. Invoking your form

10.6. Adding functionality to the ACME GUI

10.6.1. Binding the ACME GUI to a form class

10.6.2. Creating a constructor

10.6.3. Implementing the Convert functionality

10.6.4. Providing an entry point

10.7. Building and running your form

10.7.1. Generating the GUI to binary or source

10.7.2. Including the forms library

10.7.3. Compiling with Ant

10.8. Summary

11. Developing J2EE applications

11.1. Working with web applications

11.1.1. Understanding web modules

11.1.2. Creating a new web module

11.1.3. Configuring a web module

11.1.4. Using the J2EE tab of the Project tool window

11.1.5. Working with servlets and filters

11.1.6. Working with JavaServer Pages

11.1.7. Implementing an ACME web application

11.2. Working with EJBs

11.2.1. Working with EJB modules

11.2.2. Working with J2EE application modules

11.3. Understanding application server integration

11.3.1. Integrating IDEA with Tomcat

11.3.2. Integrating IDEA with WebLogic

11.3.3. Integrating IDEA with generic application servers

11.3.4. Installing Tomcat to support the ACME web application

11.4. Running and debugging web applications

11.4.1. Running your web application

11.4.2. Running the ACME web application on Tomcat

11.4.3. Debugging your web application

11.5. Working with web content (IDEA 5.0 and higher)

11.5.1. Supported file types and content

11.5.2. Basic editor features

11.5.3. Coding assistance for web content

11.5.4. Navigating through web content files

11.5.5. Refactoring web content

11.6. Summary

12. Customizing IDEA

12.1. Configuring IDEA’s options and settings

12.1.1. Customizing the interface

12.2. Customizing your code style

12.2.1. How IDEA uses your code style

12.2.2. Variable naming and general formatting

12.2.3. Controlling indentation and braces

12.2.4. Controlling whitespace

12.2.5. Customizing import statements

12.2.6. Controlling line wraps

12.2.7. Adherence to a code standard—made easy

12.3. Customizing your color scheme

12.3.1. How IDEA uses color schemes

12.3.2. Editor properties

12.3.3. Changing font settings

12.4. Customizing keyboard shortcuts

12.4.1. Using keyboard shortcuts

12.4.2. Navigating the interface with the keyboard

12.4.3. Selecting a keymap

12.4.4. Creating a new keymap

12.4.5. Defining keyboard shortcuts

12.4.6. Defining mouse shortcuts

12.4.7. Defining quick lists

12.5. Working with non-Java file types

12.5.1. Modifying file types settings

12.5.2. Registering file extensions

12.5.3. Creating a custom file type

12.6. Using file templates

12.6.1. Creating a new file from a template

12.6.2. Working with template includes

12.7. Increasing the amount of memory allocated to IDEA

12.8. Summary

13. Extending IDEA

13.1. Working with bookmarks

13.1.1. Placing and using numbered bookmarks

13.1.2. Placing and using anonymous bookmarks

13.1.3. Managing your bookmarks collection

13.2. Working with ToDo lists

13.2.1. Creating custom ToDo list items

13.2.2. Using ToDo filters

13.3. The IDEA Commander

13.3.1. Working with the IDEA Commander

13.3.2. File operations

13.4. Integrating external tools with IDEA

13.4.1. Managing the tool list

13.4.2. Accessing external tools from within IDEA

13.4.3. Reacting to the results of external tools

13.5. Using IDEA’s open APIs

13.6. Summary

Appendix A: Getting help with IDEA


About the book

The book takes you through a sample project—from using the editor for entering and editing code, to building, running and debugging, and testing your application. The journey then continues into the far corners of the system. Along the way, the authors carefully explain IntelliJ IDEA's features and show you fun tricks and productivity-enhancing techniques that are the result of their combined years of experience.

What's inside

  • Intelligent editing of Java - JSP - XML - HTML - custom file types
  • How to add plugins - customize and extend IntelliJ IDEA - fine tune your code - inspect and analyze - refactor - develop Swing and J2EE applications

About the authors

Duane K. Fields is a software developer and manager. He co-authored Manning's best-selling Web Development with JavaServer Pages. Stephen Saunders is a software engineer with experience in knowledge management, financial services, and data management. Eugene Belyaev is the cofounder, president, and chief technology officer of JetBrains, the company that created IDEA.

combo $44.95 pBook + PDF
eBook $35.99 PDF only

FREE domestic shipping on three or more pBooks

... straightforward and very clear.

Mark Woon, Software Developer, Stanford University entertaining read with excellent examples. Even a seasoned IDEA user will find it helpful.

Sean Garagan, Technical Director, Versata, Inc.