logo资料库

Eclipse Rich Client Platform 2nd Edition RCP深入浅出.pdf

第1页 / 共553页
第2页 / 共553页
第3页 / 共553页
第4页 / 共553页
第5页 / 共553页
第6页 / 共553页
第7页 / 共553页
第8页 / 共553页
资料共553页,剩余部分请下载后查看
Contents
Foreword
Preface
Acknowledgments
About the Authors
Part I: Introduction
Chapter 1 Eclipse as a Rich Client Platform
1.1 Eclipse
1.2 The Eclipse Rich Client Platform
1.3 Eclipse RCP over the Years
1.4 Uses of RCP
1.5 Summary
1.6 Pointers
Chapter 2 Eclipse RCP Concepts
2.1 A Community of Plug-ins
2.2 Inside Plug-ins
2.3 Putting a System Together
2.4 OSGi Framework
2.5 Equinox
2.6 Standard Widget Toolkit (SWT)
2.7 JFace
2.8 UI Workbench
2.9 Summary
2.10 Pointers
Part II: RCP by Example
Chapter 3 Tutorial Introduction
3.1 What Is Hyperbola?
3.2 The Evolution of Hyperbola
3.3 Development Environment Installation
3.4 Sample Code
3.5 Target Platform Setup
3.6 Learning by Example
3.7 Summary
3.8 Pointers
Chapter 4 The Hyperbola Application
4.1 Hyperbola “Hello, World”
4.2 Tour of the Code
4.3 Running and Debugging
4.4 Summary
4.5 Pointers
Chapter 5 Starting the Hyperbola Prototype
5.1 Continuing from the Shell
5.2 Adding a Contacts View
5.3 The Chat Model
5.4 Filling in the Contacts View
5.5 Adding Images
5.6 Summary
5.7 Pointers
Chapter 6 Adding Actions
6.1 Adding to the Menus and Toolbar
6.2 Adding to the Status Line
6.3 System Tray Integration
6.4 Summary
6.5 Pointers
Chapter 7 Adding a Chat Editor
7.1 Views and Editors
7.2 Defining the Chat Editor
7.3 Checkpoint
7.4 Summary
7.5 Pointers
Chapter 8 Branding Hyperbola
8.1 Defining the Hyperbola Product
8.2 Window Images
8.3 Customizing the Launcher
8.4 Splash Screen
8.5 About Information
8.6 Summary
8.7 Pointers
Chapter 9 Packaging Hyperbola
9.1 Exporting Hyperbola
9.2 Exporting for Other Platforms
9.3 Summary
9.4 Pointers
Chapter 10 Messaging Support
10.1 Integrating a Third-Party Library
10.2 Refactoring the Model
10.3 Updating the UI
10.4 Chatting with Eliza
10.5 Summary
10.6 Pointers
Chapter 11 Adding a Login Dialog
11.1 Adding the Login Dialog
11.2 Remembering Login Settings
11.3 Adding Auto-login Preferences
11.4 Summary
11.5 Pointers
Chapter 12 Adding Key Bindings
12.1 Defining Commands
12.2 Checkpoint
12.3 Adding Key Bindings for Workbench Actions
12.4 Key Schemes
12.5 Keys Preference Page
12.6 Summary
12.7 Pointers
Chapter 13 Adding Help
13.1 Adding to the Target Platform
13.2 Configuring the Help Plug-ins
13.3 Add the Help Action
13.4 Adding Help Content
13.5 Help Content Structure
13.6 Infopops or F1 Help
13.7 Exporting Plug-ins with Help
13.8 Summary
13.9 Pointers
Chapter 14 Adding Software Management
14.1 Getting p2
14.2 Features
14.3 Defining Features
14.4 Branding Features
14.5 Updating Hyperbola
14.6 Customizing the p2 UI
14.7 Defining Categories
14.8 Automatic Updates
14.9 Summary
14.10 Pointers
Part III: The Workbench
Chapter 15 Workbench Advisors
15.1 Workbench Advisors
15.2 WorkbenchAdvisor
15.3 WorkbenchWindowAdvisor
15.4 ActionBarAdvisor
15.5 Workbench Overview
15.6 Summary
15.7 Pointers
Chapter 16 Perspectives, Views, and Editors
16.1 Perspectives
16.2 Views and Editors
16.3 Multiple Workbench Windows
16.4 Drag and Drop with Editors
16.5 Summary
16.6 Pointers
Chapter 17 Actions
17.1 Overview
17.2 Declarative Actions in Hyperbola
17.3 Standard Workbench Actions
17.4 Retargetable Actions
17.5 Consolidating Declarative Actions
17.6 Toolbar Action Tricks
17.7 Adding Contributions to the Status Line
17.8 Reporting Progress
17.9 Summary
Chapter 18 Commands
18.1 The Problem with Actions
18.2 Commands
18.3 Contributions
18.4 Handlers
18.5 Summary
18.6 Pointers
Chapter 19 Customizing Workbench Windows
19.1 Customization Defined
19.2 Customizing a Workbench Window
19.3 Custom Window Shapes
19.4 Summary
19.5 Pointers
Chapter 20 Customizing the Presentation of Views and Editors
20.1 Presentations
20.2 Sample Presentations
20.3 Writing a Presentation
20.4 Example Presentation
20.5 Summary
20.6 Pointers
Part IV: Development Processes
Chapter 21 Installing and Updating with p2
21.1 The Roles of p2
21.2 Architecture
21.3 Using the p2 API
21.4 Metadata Management
21.5 Repository Management
21.6 Installation Management
21.7 Summary
21.8 Pointers
Chapter 22 Dynamic Plug-ins
22.1 Making Hyperbola Dynamic
22.2 Dynamic Challenges
22.3 Dynamic Awareness
22.4 Dynamic Enablement
22.5 Summary
22.6 Pointers
Chapter 23 RCP Everywhere
23.1 Sample Code
23.2 The Scenario
23.3 Product Configurations
23.4 Hyperbola Product Configurations
23.5 Code Structure
23.6 Designing a Platform
23.7 RCP-Friendly Plug-ins
23.8 Summary
23.9 Pointers
Chapter 24 Building Hyperbola
24.1 What Is PDE Build?
24.2 Plug-in build.properties
24.3 Setting Up a Builder
24.4 Running the Builder
24.5 Tweaking the Build
24.6 Building Add-on Features
24.7 Assembling Multiple Configurations
24.8 Summary
Chapter 25 Testing
25.1 Making Hyperbola Testable
25.2 Unit Testing Hyperbola
25.3 User Interface Testing Hyperbola
25.4 Summary
25.5 Pointers
Chapter 26 The Last Mile
26.1 Archives
26.2 Native Installers
26.3 p2 Installer
26.4 Java Web Start (JNLP)
26.5 Initializing the Install
26.6 Preinitialized Configurations
26.7 Multiuser Install Scenarios
26.8 Summary
26.9 Pointers
Part V: Reference
Chapter 27 OSGi
27.1 OSGi and the Eclipse Runtime
27.2 The Shape of Plug-ins
27.3 Fragments
27.4 Version Numbering
27.5 Services
27.6 Bundle Lifecycle
27.7 Early Activation
27.8 Lazy Activation
27.9 Data Areas
27.10 Summary
27.11 Pointers
Chapter 28 Eclipse Databinding
28.1 Getting Started
28.2 Why Databinding?
28.3 Architecture
28.4 Observables
28.5 Properties
28.6 Bindings
28.7 Summary
28.8 Pointers
Chapter 29 Eclipse Ecosystem
29.1 Where to Find Plug-ins
29.2 Eclipse Platform Plug-ins
29.3 Product Introduction
29.4 Resources
29.5 Text Editing
29.6 Consoles
29.7 Variables
29.8 Outline and Property Views
29.9 Forms
29.10 Browser
29.11 The Common Navigator Framework
29.12 Declarative Services
29.13 Summary
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Z
ptgEclipse插件开发总群(QQ群):584434100
Eclipse Rich Client Platform Second Edition
The Eclipse Series Eric McAffer, Erich Gamma, John Wiegand, Series Editors Visit informit.com/series/eclipse for a complete list of available publications. Eclipse is a universal, multilanguage software development environment— an open, extensible, integrated development environment (IDE)—that can be used for anything. Eclipse represents one of the most exciting initiatives to come from the world of application development, and it has the support of leading companies and organizations in the technology sector. Eclipse is gaining widespread acceptance in both commercial and academic arenas. The Eclipse Series is the definitive collection of publications dedicated to the Eclipse platform. Books in this series bring you key technical information, critical insight, and the practical advice you need to build tools to support this revolutionary open-source platform. From the Library of Wow! eBook ptgEclipse插件开发总群(QQ群):584434100
Eclipse Rich Client Platform Second Edition Jeff McAffer Jean-Michel Lemieux Chris Aniszczyk Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City From the Library of Wow! eBook ptgEclipse插件开发总群(QQ群):584434100
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com For sales outside the United States please contact: International Sales international@pearson.com Visit us on the Web: informit.com/aw Library of Congress Cataloging-in-Publication Data McAffer, Jeff. Eclipse Rich Client Platform / Jeff McAffer, Jean-Michel Lemieux, Chris Aniszczyk.—2nd ed. p. cm. Includes index. ISBN 0-321-60378-8 (pbk. : alk. paper) 1. Computer software—Development. 2. Java (Computer program language) 3.Application software—Development. I. Lemieux, Jean-Michel. II. Aniszczyk, Chris. III. Title. QA76.76.D47M383 2010 005.13’3—dc22 Copyright © 2010 Pearson Education, Inc. All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to: 2010006689 Pearson Education, Inc. Rights and Contracts Department 501 Boylston Street, Suite 900 Boston, MA 02116 Fax: (617) 671-3447 ISBN-13: 978-0-321-60378-4 ISBN-10: 0-321-60378-8 Text printed in the United States on recycled paper at RR Donnelley in Crawfordsville, Indiana. First printing, May 2010 From the Library of Wow! eBook ptgEclipse插件开发总群(QQ群):584434100
Contents Foreword Preface Acknowledgments About the Authors Part I ❍ Introduction Chapter 1 Eclipse as a Rich Client Platform 1.1 Eclipse 1.2 The Eclipse Rich Client Platform 1.3 Eclipse RCP over the Years 1.4 Uses of RCP 1.4.1 IBM Lotus and Eclipse RCP 1.4.2 NASA and the Eclipse RCP 1.5 Summary 1.6 Pointers Chapter 2 Eclipse RCP Concepts 2.1 A Community of Plug-ins 2.2 Inside Plug-ins 2.3 Putting a System Together 2.4 OSGi Framework 2.5 Equinox 2.5.1 Applications xxi xxv xxix xxxi 1 3 5 5 6 7 7 10 12 13 15 15 18 19 20 21 22 v From the Library of Wow! eBook ptgEclipse插件开发总群(QQ群):584434100
vi Contents 2.5.2 Products 2.5.3 Extension Registry 2.6 Standard Widget Toolkit (SWT) 2.7 JFace 2.8 UI Workbench 2.8.1 Contribution-Based Extensibility 2.8.2 Perspectives, Views, and Editors 2.9 Summary 2.10 Pointers Part II ❍ RCP by Example Chapter 3 Tutorial Introduction 3.1 What Is Hyperbola? 3.2 The Evolution of Hyperbola 3.3 Development Environment Installation 3.4 Sample Code 3.4.1 Moving from Chapter to Chapter 3.4.2 Comparing 3.5 Target Platform Setup 3.5.1 The Predefined Target 3.5.2 Defining Target Platforms 3.6 Learning by Example 3.7 Summary 3.8 Pointers Chapter 4 The Hyperbola Application 4.1 Hyperbola “Hello, World” 4.2 Tour of the Code 4.2.1 Application 4.2.2 WorkbenchAdvisor 4.2.3 Perspective 4.2.4 WorkbenchWindowAdvisor 4.2.5 ActionBarAdvisor 4.2.6 Summary 22 23 25 25 25 26 26 27 27 29 31 31 32 33 34 35 35 36 37 38 42 44 44 45 45 51 51 53 53 54 55 55 From the Library of Wow! eBook ptgEclipse插件开发总群(QQ群):584434100
Contents vii 4.3 Running and Debugging 4.3.1 Debugging 4.3.2 Launch Configurations 4.4 Summary 4.5 Pointers Chapter 5 Starting the Hyperbola Prototype 5.1 Continuing from the Shell 5.1.1 Saving Window Location and Size 5.2 Adding a Contacts View 5.2.1 Adding the Contacts View to a Perspective 5.3 The Chat Model 5.4 Filling in the Contacts View 5.4.1 The ContactsView 5.4.2 Content Providers Overview 5.4.3 The Label Provider 5.5 Adding Images 5.6 Summary 5.7 Pointers Chapter 6 Adding Actions 6.1 Adding to the Menus and Toolbar 6.1.1 Create a Top-Level Menu 6.1.2 Menu Managers 6.1.3 The Add Contact Action 6.1.4 Adding the Add Contact Action 6.1.5 Customizable Toolbars 6.2 Adding to the Status Line 6.2.1 Status Line—A Shared Resource 6.3 System Tray Integration 6.3.1 Obtaining a Display 6.3.2 Creating the Tray Item 6.4 Summary 6.5 Pointers 55 56 60 62 62 63 64 65 65 67 70 72 72 74 77 78 81 82 83 84 85 87 88 91 93 93 95 96 97 98 100 101 From the Library of Wow! eBook ptgEclipse插件开发总群(QQ群):584434100
分享到:
收藏