Preface

This book will help you find the answers about Eclipse, today’s premier Java Integrated Development Environment (IDE). Eclipse is a great tool, but it’s also a complicated one, and not everyone has the time to spend days trying to unravel it. That’s where this book comes in; it unravels Eclipse for you.

Eclipse has long been needed in the Java world. There have been Java IDEs before, but not like this one. And if you’ve just been using the Java command-line compiler, javac, there’s no comparison at all; Eclipse will revolutionize your programming. Eclipse is terrific because it’s built to handle the details for you—syntax checking, error handling, adding imports as needed, targeting builds, commenting out blocks of code with a click, putting .jar files on the build path, refactoring, even reformatting your code. Eclipse makes it all happen for you. However, actually making it happen in Eclipse is up to you, and there’s a steep learning curve.

This book reduces that learning curve. Got a problem? Just look up the appropriate recipe to find out how to solve it. Want to go back to the previously edited location? See Chapter 2. Want to extract an interface from your code with a few clicks? See Chapter 4. Want to create getter and setter methods with a few more mouse clicks? Check out Chapter 3. How about connecting Eclipse to a CVS repository? Take a look at Chapter 6.

This book lays out Eclipse, from the basics through the advanced. It’s designed specifically to bring you up to speed on nearly any Eclipse question without wasting time. Eclipse is where the action is in Java today, and this book is all about mastering Eclipse.

What’s Inside

This book is Eclipse from cover to cover. We will solve hundreds of Eclipse problems, and discuss dozens of issues, from installing all the way to reinstalling if some catastrophe occurs. And we’re going to take a look at what Eclipse 3.0, now in beta form, has to offer as well. Here’s an overview of what’s inside the book:

Chapter 1

This chapter covers the basics—all you need to use Eclipse and handle routine tasks, including getting and installing Eclipse.

Chapter 2

This chapter is all about the Eclipse workbench and what it offers. Covered are items such as editors, views, perspectives, and how to work with them in depth.

Chapter 3

Eclipse excels at Java development, and this chapter starts our Java development. Here we’ll use the Java Development Tools (JDT) to create and work with Java projects, classes, methods, code, and so on.

Chapter 4

Refactoring handles the task when you need to rename or move elements in your code and update every occurrence throughout that code. This chapter covers refactoring and many advanced Java tasks. It also covers building projects and launching them, including setting launch configurations.

Chapter 5

Where would an IDE be without debugging? The Eclipse debugger is first rate, and you’ll get the story in this chapter, including breakpoints, breakpoint hit counters, watchpoints, changing your code on the fly, and a great deal more.

Chapter 6

Eclipse also is built to be used in teams, and this chapter covers how to use Eclipse with a Concurrent Versions System (CVS) server so that code can be shared. You’ll see how to connect Eclipse to a CVS server, how to store Eclipse projects in a CVS repository, how to check your files and projects, and more.

Chapter 7

Ant is the best build tool for Java, and Eclipse comes with Ant support already built in. This chapter covers how to create Ant build files, how to execute them, and what you can do with Ant in Eclipse.

Chapter 8

The Standard Widget Toolkit (SWT) comes built into Eclipse and is an extensive GUI API designed to replace Java’s AWT and Swing. This first chapter of SWT coverage includes the basics on SWT as well as getting started with basic widgets such as buttons, lists, and composites, and how to create nonrectangular windows.

Chapter 9

This chapter on SWT covers more SWT widgets, including advanced widgets such as dialogs, toolbars, menus, and tables. You’ll also learn how to embed AWT/Swing windows in SWT applications.

Chapter 10

This final chapter on SWT covers more SWT widgets: coolbars, tab folders, trees, and browsers.

Chapter 11

Eclipse and web development are natural partners, and this chapter covers developing web applications with Eclipse, including JSP, JavaBeans, and servlets. You’ll also learn how to create deployment packages for web applications.

Chapter 12

This and the next chapter illustrate how to create your own Eclipse plug-ins. In this chapter, you’ll get the details on extension points, actions, and creating plug-in menus.

Chapter 13

This chapter concludes our focus on plug-ins; here, we’ll create plug-ins that display wizards, views, and editors in Eclipse.

Get Eclipse Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.