Eclipse Cookbook
暫譯: Eclipse 食譜

Steve Holzner

  • 出版商: O'Reilly
  • 出版日期: 2004-07-27
  • 售價: $1,740
  • 貴賓價: 9.5$1,653
  • 語言: 英文
  • 頁數: 366
  • 裝訂: Paperback
  • ISBN: 0596007108
  • ISBN-13: 9780596007102
  • 相關分類: Java 相關技術
  • 已過版

買這商品的人也買了...

商品描述

Description:

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.

 

Table of Contents:

Preface

1. Basic Skills

      1.1 Getting Eclipse

      1.2 Installing and Running Eclipse

      1.3 Understanding Your Workspace

      1.4 Running Multiple Eclipse Windows

      1.5 Creating a Java Project

      1.6 Managing Perspectives, Views, and Editors

      1.7 Mastering the Java Perspective

      1.8 Creating a Java Class

      1.9 Completing Code Automatically

      1.10 Running Your Code

      1.11 Running Code Snippets

      1.12 Fixing Syntax Errors Automatically

      1.13 Keeping Your Workspace Clear

      1.14 Recovering from Total Disaster

2. Using Eclipse

      2.1 Showing/Hiding Views

      2.2 Moving a View or Toolbar

      2.3 Accessing Any Project File

      2.4 Tiling Editors

      2.5 Maximizing Views and Editors

      2.6 Going Back to the Previous Editor

      2.7 Going Back to the Previous Edit Location

      2.8 Linking Views to Editors

      2.9 Reordering View and Editor Tabs

      2.10 Navigating from an Editor to a View

      2.11 Creating a Key Binding

      2.12 Displaying More Resource Information with Icons

      2.13 Using a Different Workspace

      2.14 Creating a Task

      2.15 Creating a Bookmark

      2.16 Creating a Fast View

      2.17 Customizing Help

      2.18 Restoring Deleted Resources

      2.19 Customizing a Perspective

      2.20 Restoring a Perspective

      2.21 Creating a New Perspective

3. Java Development

      3.1 Speeding Up the JDT Editor

      3.2 Creating a Java Project

      3.3 Creating Java Packages

      3.4 Creating a Java Class

      3.5 Creating a Java Method

      3.6 Overriding a Java Method

      3.7 Getting Method Parameter Hints

      3.8 Inserting Method Parameter Names

      3.9 Creating Getter/Setter Methods

      3.10 Creating Delegate Methods

      3.11 Surrounding Code with do/for/if/try/while Blocks

      3.12 Finding the Matching Brace

      3.13 Automatically Wrapping Strings

      3.14 Creating a Constructor

      3.15 Converting Constructors to Factory Methods

      3.16 Commenting Out a Section of Code

      3.17 Creating Working Sets

      3.18 Creating TODO Tasks

      3.19 Customizing Code Assist

4. Refactoring, Building, and Launching

      4.1 Renaming Elements

      4.2 Moving Elements

      4.3 Extracting and Implementing Interfaces

      4.4 Searching Code

      4.5 Comparing Files

      4.6 Comparing Files Against Local History

      4.7 Restoring Elements and Files from Local History

      4.8 Selecting the Java Runtime for Builds

      4.9 Running Your Code

      4.10 Building Your Code

      4.11 Using .jar and .class Files

      4.12 Setting the Launch Configuration

5. Testing and Debugging

      5.1 Installing JUnit

      5.2 Testing an Application with JUnit

      5.3 Starting a Debugging Session

      5.4 Setting a Breakpoint

      5.5 Stepping Through Your Code

      5.6 Running Until Encountering a Breakpoint

      5.7 Running to a Line of Code You Select

      5.8 Watching Expressions and Variables

      5.9 Setting a Hit Count for Breakpoints

      5.10 Configuring Breakpoint Conditions

      5.11 Creating Field, Method, and Exception Breakpoints
      5.12 Evaluating Expressions

      5.13 Assigning Values to Variables While Debugging

      5.14 Changing Code on the Fly

6. Using Eclipse in Teams

      6.1 Getting a CVS Server

      6.2 Creating a CVS Repository

      6.3 Connecting Eclipse to a CVS Repository

      6.4 Storing an Eclipse Project in a CVS Repository

      6.5 Committing Files to the CVS Repository

      6.6 Visually Labeling Files Under Version Control

      6.7 Examining the CVS Repository

      6.8 Checking Projects Out of a CVS Repository

      6.9 Updating Your Code from a CVS Repository

      6.10 Synchronizing Your Code with the CVS Repository

      6.11 Creating Code Patches

      6.12 Naming Code Versions

      6.13 Creating CVS Branches

7. Eclipse and Ant

      7.1 Connecting Ant to Eclipse

      7.2 Building an Eclipse Application Using Ant

      7.3 Catching Ant Build File Syntax Problems

      7.4 Using a Different Build File

      7.5 Using Your Own Version of Ant

      7.6 Setting Types and Global Properties

      7.7 Setting Ant Editor Options

      7.8 Setting Ant Arguments

      7.9 Using the Ant View

      7.10 Using Ant as an External Tool

8. SWT: Text, Buttons, Lists, and Nonrectangular Windows

      8.1 Working with SWT Widgets

      8.2 Creating an SWT Application

      8.3 Adding the Required SWT JAR Files to the Build Path
      8.4 Launching an SWT Application

      8.5 Positioning Widgets and Using Layouts

      8.6 Creating Button and Text Widgets

      8.7 Handling SWT Widget Events

      8.8 Creating List Widgets

      8.9 Creating Composite Widgets

      8.10 Creating Nonrectangular Windows

      8.11 Multithreading SWT Applications

9. SWT: Dialogs, Toolbars, Menus, and More

      9.1 Creating Message Boxes

      9.2 Creating Dialogs

      9.3 Creating Toolbars

      9.4 Embedding Buttons in Toolbars

      9.5 Handling Toolbar Events

      9.6 Embedding Combo Boxes, Text Widgets, and Menus in Toolbars

      9.7 Creating a Menu System

      9.8 Creating Text Menu Items

      9.9 Creating Image Menu Items

      9.10 Creating Radio Menu Items

      9.11 Creating Menu Item Accelerators and Mnemonics

      9.12 Enabling and Disabling Menu Items

      9.13 Creating Menu Separators

      9.14 Creating Tables

      9.15 Creating Table Columns

      9.16 Adding Check Marks to Table Items

      9.17 Enabling and Disabling Table Items

      9.18 Adding Images to Table Items

      9.19 Using Swing and AWT Inside SWT

10. SWT: Coolbars, Tab Folders, Trees, and Browsers

      10.1 Creating SWT Tab Folders

      10.2 Creating SWT Coolbars

      10.3 Adding Items to Coolbars

      10.4 Adding Drop-Down Menus to Coolbars

      10.5 Creating SWT Trees

      10.6 Handling Tree Events

      10.7 Adding Checkboxes to Tree Items

      10.8 Adding Images to Tree Items

      10.9 Creating SWT Browser Widgets

11. JSP, Servlets, and Eclipse

      11.1 Installing Tomcat

      11.2 Starting Tomcat

      11.3 Creating JSP Files

      11.4 Creating a Servlet

      11.5 Installing a Servlet in Tomcat

      11.6 Creating a Servlet in Place

      11.7 Editing web.xml in Place

      11.8 Avoiding Output Folder Scrubs

      11.9 Interfacing to JavaBeans

      11.10 Using a Tomcat Plug-in

      11.11 Creating WAR Files

12. Creating Plug-ins: Extension Points, Actions, and Menus

      12.1 Installing a Plug-in

      12.2 Creating plugin.xml

      12.3 Creating a Menu-Based Plug-in Using Wizards

      12.4 Testing Plug-ins with the Run-time Workbench

      12.5 Deploying a Plug-in

      12.6 Writing a Plug-in from a Skeleton

      12.7 Responding to User Actions in a Plug-in

      12.8 Creating a Plug-in Menu from Scratch

      12.9 Creating Actions

      12.10 Coding a Plug-in Action

      12.11 Automatically Adding a Plug-in to a Perspective

13. Creating Plug-ins: Wizards, Editors, and Views

      13.1 Creating a Plug-in That Supports Wizards and Editors

      13.2 Customizing a Wizard

      13.3 Customizing an Editor

      13.4 Creating a Plug-in That Supports Views

      13.5 Adding Items to a View

      13.6 Configuring a View's Actions

Index

商品描述(中文翻譯)

描述:

您可能聽過 Eclipse 的熱潮,這是一個強大的開源平台,為 Java 開發者提供了一種全新的開發專案方式。它就像一輛閃亮的新車——不再滿足於僅僅欣賞 Eclipse,您現在渴望進入並駕駛它。

Eclipse 對於 Java 開發者來說,就如同 Visual Studio 對於 .NET 開發者一樣——它是一個集成開發環境 (IDE),將代碼編輯器、編譯器、除錯器、文本編輯器、圖形用戶界面 (GUI) 構建器及其他組件整合成一個單一的、用戶友好的應用程式。它提供了一個堅實的基礎,使 Java 開發者能夠構建和運行集成的軟體開發工具,用於網頁開發、應用程式設計、建模、性能測試等多種用途。

然而,與任何大型編程工具一樣,這裡有很多東西需要學習。而且,沒有比知名 Java 專家 Steve Holzner 更適合的人來教您了。Holzner 是一位獲獎的暢銷書作者,自從 Java 語言首次出現以來,他就一直在撰寫有關 Java 的主題,提供您精確、實用的日常知識,幫助您精進對 Eclipse 的掌握。

作為 Eclipse 編程教程(例如 Holzner 自己的《Eclipse》,O'Reilly,2004 年 4 月)的完美伴侶,或是對於那些不想或不需要教程方法的開發者來說,Eclipse Cookbook 包含了超過 800 種您在使用這個新 Java 平台時可能遇到的情境的任務導向食譜——從自動部署網頁應用程式到反向工程編譯代碼,從在多個包中重新命名所有對類的引用到初始化 SWT JNI 庫。

每個食譜都採用 O'Reilly 食譜書中廣受歡迎且極具實用性的問題-解決-討論格式,包含對問題的清晰且徹底的描述、對解決方案的簡短但完整的討論,以及展示該解決方案的實際範例。《Eclipse Cookbook》將滿足所有層級的 Java 程式設計師,他們準備超越教程——遠不止於編寫插件和擴展——並實際上在日常工作中使用強大且方便的 Eclipse。

目錄:

前言

1. 基本技能
1.1 獲取 Eclipse
1.2 安裝和運行 Eclipse
1.3 理解您的工作區
1.4 運行多個 Eclipse 窗口
1.5 創建 Java 專案
1.6 管理視角、視圖和編輯器
1.7 精通 Java 視角
1.8 創建 Java 類
1.9 自動完成代碼
1.10 運行您的代碼
1.11 運行代碼片段
1.12 自動修正語法錯誤
1.13 保持工作區清晰
1.14 從全面災難中恢復

2. 使用 Eclipse
2.1 顯示/隱藏視圖
2.2 移動視圖或工具列
2.3 訪問任何專案文件
2.4 瓦片編輯器
2.5 最大化視圖和編輯器
2.6 返回到前一個編輯器
2.7 返回到前一個編輯位置
2.8 將視圖鏈接到編輯器
2.9 重新排序視圖和編輯器標籤
2.10 從編輯器導航到視圖
2.11 創建鍵綁定
2.12 使用圖標顯示更多資源信息
2.13 使用不同的工作區
2.14 創建任務
2.15 創建書籤
2.16 創建快速視圖
2.17 自定義幫助
2.18 恢復已刪除的資源
2.19 自定義視角
2.20 恢復視角
2.21 創建新視角

3. Java 開發
3.1 加速 JDT 編輯器
3.2 創建 Java 專案
3.3 創建 Java 包
3.4 創建 Java 類
3.5 創建 Java 方法
3.6 重寫 Java 方法
3.7 獲取方法參數提示
3.8 插入方法參數名稱
3.9 創建 Getter/Setter 方法
3.10 創建委託方法
3.11 用 do/for/if/try/while 區塊包圍代碼
3.12 找到匹配的括號
3.13 自動包裝字符串
3.14 創建構造函數
3.15 將構造函數轉換為工廠方法
3.16 將代碼區塊註解掉
3.17 創建工作集
3.18 創建 TODO 任務
3.19 自定義代碼輔助

4. 重構、構建和啟動
4.1 重命名元素
4.2 移動元素
4.3 提取和實現介面
4.4 搜索代碼
4.5 比較文件
4.6 將文件與本地歷史記錄進行比較
4.7 從本地歷史記錄中恢復元素和文件
4.8 為構建選擇 Java 運行時
4.9 運行您的代碼
4.10 構建您的代碼
4.11 使用 .jar 和 .class 文件
4.12 設定啟動配置

5. 測試和除錯
5.1 安裝 JUnit
5.2 使用 JUnit 測試應用程式
5.3 開始除錯會話
5.4 設定斷點
5.5 單步執行您的代碼
5.6 運行直到遇到斷點
5.7 運行到您選擇的代碼行
5.8 監視表達式和變數
5.9 設定斷點的命中計數
5.10 配置斷點條件
5.11 創建字段、方法和異常斷點
5.12 評估表達式
5.13 在除錯時為變數賦值
5.14 動態更改代碼

6. 在團隊中使用 Eclipse
6.1 獲取 CVS 伺服器
6.2 創建 CVS 儲存庫
6.3 將 Eclipse 連接到 CVS 儲存庫
6.4 將 Eclipse 專案存儲在 CVS 儲存庫中
6.5 將文件提交到 CVS 儲存庫
6.6 直觀標記版本控制下的文件
6.7 檢查 CVS 儲存庫
6.8 從 CVS 儲存庫檢出專案
6.9 從 CVS 儲存庫更新您的代碼
6.10 與 CVS 儲存庫同步您的代碼
6.11 創建代碼補丁
6.12 命名代碼版本
6.13 創建 CVS 分支

7. Eclipse 和 Ant
7.1 將 Ant 連接到 Eclipse
7.2 使用 Ant 構建 Eclipse 應用程式
7.3 捕捉 Ant 構建文件語法問題
7.4 使用不同的構建文件
7.5 使用您自己的 Ant 版本
7.6 設定類型和全局屬性
7.7 設定 Ant 編輯器選項
7.8 設定 Ant 參數
7.9 使用 Ant 視圖
7.10 將 Ant 作為外部工具使用

8. SWT:文本、按鈕、列表和不規則窗口
8.1 使用 SWT 小部件
8.2 創建 SWT 應用程式
8.3 將所需的 SWT JAR 文件添加到構建路徑
8.4 啟動 SWT 應用程式
8.5 定位小部件並使用佈局
8.6 創建按鈕和文本小部件
8.7 處理 SWT 小部件事件
8.8 創建列表小部件
8.9 創建複合小部件
8.10 創建不規則窗口
8.11 多線程 SWT 應用程式

9. SWT:對話框、工具列、菜單等
9.1 創建消息框
9.2 創建對話框
9.3 創建工具列
9.4 在工具列中嵌入按鈕
9.5 處理工具列事件
9.6 在工具列中嵌入下拉框、文本小部件和菜單
9.7 創建菜單系統
9.8 創建文本菜單項
9.9 創建圖像菜單項
9.10 創建單選菜單項
9.11 創建菜單項加速鍵和助記符
9.12 啟用和禁用菜單項
9.13 創建菜單分隔符
9.14 創建表格
9.15 創建表格列
9.16 為表格項添加勾選標記
9.17 啟用和禁用表格項
9.18 為表格項添加圖像
9.19 在 SWT 中使用 Swing 和 AWT

10. SWT:Coolbars、標籤頁、樹和瀏覽器
10.1 創建 SWT 標籤頁
10.2 創建 SWT Coolbars
10.3 向 Coolbars 添加項目
10.4 向 Coolbars 添加下拉菜單
10.5 創建 SWT 樹
10.6 處理樹事件
10.7 向樹項添加複選框
10.8 添加圖像