Synopses & Reviews
You've probably heard the buzz about Eclipse, the powerful open source platform that gives Java developers a new way to approach development projects. It's like a shiny new car--no longer content to just admire Eclipse, you're now itching to get in and drive.Eclipse is to Java developers what Visual Studio is to .NET developers--it's an integrated development environment (IDE) that combines a code editor, compiler, debugger, text editor, graphical user interface (GUI) builder, and other components into a single, user-friendly application. It provides a solid foundation that enables Java developers to construct and run integrated software-development tools for web development, application design, modeling, performance, testing, and much more.As with any extensive programming tool, however, there's a lot to learn. And there s no better guy than well-known Java expert Steve Holzner to teach you. An award-winning and best-selling author who has been writing about Java topics since the language first appeared, Holzner delivers just the kind of targeted, practical, everyday knowledge you need to hone your mastery of Eclipse.Perfect as a companion to an Eclipse programming tutorial (such as Holzner's own Eclipse, O'Reilly, April 2004) or an ideal stand-alone for all those developers who either don't want or don't need the tutorial approach, the Eclipse Cookbook contains task-oriented recipes for more than 800 situations you may encounter while using this new Java platform--from deploying a web application automatically to reverse engineering compiled code, from re-naming all references to a class across multiple packages to initializing the SWT JNI libraries.Each recipe in the ever-popular and utterly practical problem-solution-discussion format for O'Reilly cookbooks contains a clear and thorough description of the problem, a brief but complete discussion of a solution, and in-action examples illustrating that solution. The Eclipse Cookbook will satiate Java programmers at all levels who are ready to go beyond tutorials--far beyond writing plug-ins and extensions--and actually use the powerful and convenient Eclipse day to day.
- Takes users beyond the tutorial and shows them how to use Eclipse to solve a wide range of common problems
- Written by an extremely popular Java author whose name recognition with the community will definitely help sell books
About the Author
Steve Holzner is an award-winning author who has been writing about Java topics since Java first appeared. He's a former PC Magazine contributing editor, and his many books have been translated into 18 languages around the world. His books sold more than 1.5 million copies, and many of his bestsellers have been on Java.Steve graduated from MIT and got his PhD at Cornell; he's been a very popular member of the faculty at both MIT and Cornell, teaching thousands of students over the years and earning an average student evaluation over 4.9 out of 5.0. He also runs his own software company and teaches week-long classes to corporate programmers on Java around the country.
Table of Contents
Preface; What's Inside; Conventions Used in This Book; What You'll Need; Using Code Examples; We'd Like to Hear from You; Chapter 1: Basic Skills; 1.1 Introduction; 1.2 Getting Eclipse; 1.3 Installing and Running Eclipse; 1.4 Understanding Your Workspace; 1.5 Running Multiple Eclipse Windows; 1.6 Creating a Java Project; 1.7 Managing Perspectives, Views, and Editors; 1.8 Mastering the Java Perspective; 1.9 Creating a Java Class; 1.10 Completing Code Automatically; 1.11 Running Your Code; 1.12 Running Code Snippets; 1.13 Fixing Syntax Errors Automatically; 1.14 Keeping Your Workspace Clear; 1.15 Recovering from Total Disaster; Chapter 2: Using Eclipse; 2.1 Introduction; 2.2 Showing/Hiding Views; 2.3 Moving a View or Toolbar; 2.4 Accessing Any Project File; 2.5 Tiling Editors; 2.6 Maximizing Views and Editors; 2.7 Going Back to the Previous Editor; 2.8 Going Back to the Previous Edit Location; 2.9 Linking Views to Editors; 2.10 Reordering View and Editor Tabs; 2.11 Navigating from an Editor to a View; 2.12 Creating a Key Binding; 2.13 Displaying More Resource Information with Icons; 2.14 Using a Different Workspace; 2.15 Creating a Task; 2.16 Creating a Bookmark; 2.17 Creating a Fast View; 2.18 Customizing Help; 2.19 Restoring Deleted Resources; 2.20 Customizing a Perspective; 2.21 Restoring a Perspective; 2.22 Creating a New Perspective; Chapter 3: Java Development; 3.1 Introduction; 3.2 Speeding Up the JDT Editor; 3.3 Creating a Java Project; 3.4 Creating Java Packages; 3.5 Creating a Java Class; 3.6 Creating a Java Method; 3.7 Overriding a Java Method; 3.8 Getting Method Parameter Hints; 3.9 Inserting Method Parameter Names; 3.10 Creating Getter/Setter Methods; 3.11 Creating Delegate Methods; 3.12 Surrounding Code with do/for/if/try/while Blocks; 3.13 Finding the Matching Brace; 3.14 Automatically Wrapping Strings; 3.15 Creating a Constructor; 3.16 Converting Constructors to Factory Methods; 3.17 Commenting Out a Section of Code; 3.18 Creating Working Sets; 3.19 Creating TODO Tasks; 3.20 Customizing Code Assist; Chapter 4: Refactoring, Building, and Launching; 4.1 Introduction; 4.2 Renaming Elements; 4.3 Moving Elements; 4.4 Extracting and Implementing Interfaces; 4.5 Searching Code; 4.6 Comparing Files; 4.7 Comparing Files Against Local History; 4.8 Restoring Elements and Files from Local History; 4.9 Selecting the Java Runtime for Builds; 4.10 Running Your Code; 4.11 Building Your Code; 4.12 Using .jar and .class Files; 4.13 Setting the Launch Configuration; Chapter 5: Testing and Debugging; 5.1 Introduction; 5.2 Installing JUnit; 5.3 Testing an Application with JUnit; 5.4 Starting a Debugging Session; 5.5 Setting a Breakpoint; 5.6 Stepping Through Your Code; 5.7 Running Until Encountering a Breakpoint; 5.8 Running to a Line of Code You Select; 5.9 Watching Expressions and Variables; 5.10 Setting a Hit Count for Breakpoints; 5.11 Configuring Breakpoint Conditions; 5.12 Creating Field, Method, and Exception Breakpoints; 5.13 Evaluating Expressions; 5.14 Assigning Values to Variables While Debugging; 5.15 Changing Code on the Fly; Chapter 6: Using Eclipse in Teams; 6.1 Introduction; 6.2 Getting a CVS Server; 6.3 Creating a CVS Repository; 6.4 Connecting Eclipse to a CVS Repository; 6.5 Storing an Eclipse Project in a CVS Repository; 6.6 Committing Files to the CVS Repository; 6.7 Visually Labeling Files Under Version Control; 6.8 Examining the CVS Repository; 6.9 Checking Projects Out of a CVS Repository; 6.10 Updating Your Code from a CVS Repository; 6.11 Synchronizing Your Code with the CVS Repository; 6.12 Creating Code Patches; 6.13 Naming Code Versions; 6.14 Creating CVS Branches; Chapter 7: Eclipse and Ant; 7.1 Introduction; 7.2 Connecting Ant to Eclipse; 7.3 Building an Eclipse Application Using Ant; 7.4 Catching Ant Build File Syntax Problems; 7.5 Using a Different Build File; 7.6 Using Your Own Version of Ant; 7.7 Setting Types and Global Properties; 7.8 Setting Ant Editor Options; 7.9 Setting Ant Arguments; 7.10 Using the Ant View; 7.11 Using Ant as an External Tool; Chapter 8: SWT: Text, Buttons, Lists, and Nonrectangular Windows; 8.1 Introduction; 8.2 Working with SWT Widgets; 8.3 Creating an SWT Application; 8.4 Adding the Required SWT JAR Files to the Build Path; 8.5 Launching an SWT Application; 8.6 Positioning Widgets and Using Layouts; 8.7 Creating Button and Text Widgets; 8.8 Handling SWT Widget Events; 8.9 Creating List Widgets; 8.10 Creating Composite Widgets; 8.11 Creating Nonrectangular Windows; 8.12 Multithreading SWT Applications; Chapter 9: SWT: Dialogs, Toolbars, Menus, and More; 9.1 Introduction; 9.2 Creating Message Boxes; 9.3 Creating Dialogs; 9.4 Creating Toolbars; 9.5 Embedding Buttons in Toolbars; 9.6 Handling Toolbar Events; 9.7 Embedding Combo Boxes, Text Widgets, and Menus in Toolbars; 9.8 Creating a Menu System; 9.9 Creating Text Menu Items; 9.10 Creating Image Menu Items; 9.11 Creating Radio Menu Items; 9.12 Creating Menu Item Accelerators and Mnemonics; 9.13 Enabling and Disabling Menu Items; 9.14 Creating Menu Separators; 9.15 Creating Tables; 9.16 Creating Table Columns; 9.17 Adding Check Marks to Table Items; 9.18 Enabling and Disabling Table Items; 9.19 Adding Images to Table Items; 9.20 Using Swing and AWT Inside SWT; Chapter 10: SWT: Coolbars, Tab Folders, Trees, and Browsers; 10.1 Introduction; 10.2 Creating SWT Tab Folders; 10.3 Creating SWT Coolbars; 10.4 Adding Items to Coolbars; 10.5 Adding Drop-Down Menus to Coolbars; 10.6 Creating SWT Trees; 10.7 Handling Tree Events; 10.8 Adding Checkboxes to Tree Items; 10.9 Adding Images to Tree Items; 10.10 Creating SWT Browser Widgets; Chapter 11: JSP, Servlets, and Eclipse; 11.1 Introduction; 11.2 Installing Tomcat; 11.3 Starting Tomcat; 11.4 Creating JSP Files; 11.5 Creating a Servlet; 11.6 Installing a Servlet in Tomcat; 11.7 Creating a Servlet in Place; 11.8 Editing web.xml in Place; 11.9 Avoiding Output Folder Scrubs; 11.10 Interfacing to JavaBeans; 11.11 Using a Tomcat Plug-in; 11.12 Creating WAR Files; Chapter 12: Creating Plug-ins: Extension Points, Actions, and Menus; 12.1 Introduction; 12.2 Installing a Plug-in; 12.3 Creating plugin.xml; 12.4 Creating a Menu-Based Plug-in Using Wizards; 12.5 Testing Plug-ins with the Run-time Workbench; 12.6 Deploying a Plug-in; 12.7 Writing a Plug-in from a Skeleton; 12.8 Responding to User Actions in a Plug-in; 12.9 Creating a Plug-in Menu from Scratch; 12.10 Creating Actions; 12.11 Coding a Plug-in Action; 12.12 Automatically Adding a Plug-in to a Perspective; Chapter 13: Creating Plug-ins: Wizards, Editors, and Views; 13.1 Introduction; 13.2 Creating a Plug-in That Supports Wizards and Editors; 13.3 Customizing a Wizard; 13.4 Customizing an Editor; 13.5 Creating a Plug-in That Supports Views; 13.6 Adding Items to a View; 13.7 Configuring a View's Actions; Colophon;