Practical Eclipse Rich Client Platform Projects
Practical Eclipse Rich Client Platform Projects Practical Eclipse Rich Client Platform Projects Practical Eclipse Rich Client Platform ProjectsPractical Eclipse Rich Client Platform ProjectsCopyright@ 2009 by vladimir SilvaAll rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,electronic or mechanical, including photocopying, recording, or by any information storage or retrievalsystem, without the prior written permission of the copyright owner and the publisherISBN-13(pbk):978-1-4302-1827-2ISBN-13( electronic):978-1-4302-1828-9Printed and bound in the united states of america 987654321Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrenceof a trademarked name we use the names only in an editorial fashion and to the benefit of the trademarkowner, with no intention of infringement of the trademarkJavaTM and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc, in theUS and other countries. apress, Inc, is not affiliated with Sun microsystems, Inc, and this book was writ-ten without endorsement from Sun microsystems, IncLead editor: Tom WelshTechnical reviewer: Sumit palEditorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell,Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann,Ben renow-Clarke, Dominic shakeshaft, Matt Wade, Tom welshProject Managers: Douglas Sulenta, Susannah Davidson PfalzerSenior copy editor: Marilyn SmithAssociate Production Director: Kari Brooks-CoponyProduction editor: ellie fountainCompositorMolly SharpProofreader: Linda seifertIndexer: Broccoli Information ManagementArtist: Kinetic Publishing Services, LLCCover Designer: Kurt KramesManufacturing Director: Tom DebolskiDistributed to the book trade worldwide by Springer-Verlag New York, Inc, 233 Spring Street, 6th Floor,New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-nyospringer-sbm com,orvisithttp://www.springeronline.comFor information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600BerkeleyCa94705.Phone510-549-5930,fax510-549-5939,e-mailinfo@apress.com,orvisithttp://wwapress. Com.Apress and friends of ed books may be purchased in bulk for academic, corporate, or promotional useeBook versions and licenses are also available for most titles. For more information, reference our SpecialBulksales-ebooklicensingwebpageathttp://www.apress.com/info/bulksales.The information in this book is distributed on an"as is"basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liabilityto any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this workThesourcecodeforthisbookisavailabletoreadersathttp://www.apress.comContents at a GlanceAbout the authorAbout the technical reviewerIntroductionCHAPTER 1 Foundations of Eclipse rcpCHAPTER 2 Plug-ins: A First Glimpse21CHAPTER 3 RCP Basics53chaPter 4 User Interface ConceptsCHAPTER 5 Forms apl and presentation framework.107CHAPTER 6 Help Support.141CHAPTER 7 2D Graphics with GEF and Zest173CHaPTeR 8 3D Graphics for RCP With OpenGL.209CHAPTER 9rofessional Reports with the Business Intelligence andReport ToolkitCHAPTER 10 Automated Updates...291INDEX325ⅲiContentsAbout the authorAbout the technical reviewerIntroductionCHAPTER 1 Foundations of Eclipse rcpBenefits of EclipseHoW Is RCP Different from the eclipse Workbench?Eclipse rCP architectureEquinox OSGiCore platform122334Standard Widget ToolkitJFaceThe Eclipse workbenchHands-on Exercise: Getting Your Feet Wet with the OSGi ConsoleStarting a New Plug-in Project3456669Creating the Plug-inTesting the Plug-in12Using OSGi Console commands15Using Logging ServicesSummar.....19CHAPTER 2 Plug-ins: A First Glimpse21Introducing the Eclipse Plug-in Model..21The Plug-in Class and Bundle contextManifests23Plug-in Fragments and Features24Adding Extension Points24PerspectivesViewsView actionsEditorsPop-up MenusCommand..35CONTENTSHands-on Exercise: Fun with a Web browser plug-inAdding a Perspective Extension PointAdding a Perspective Factory40Adding views and content41Testing the Plug-inEnhancing the Web Browser49SummaryCHAPTER 3 RCP Basics53Components of an RCP Application53Extension Points for an RCP applicationOSGi Manifest... 59Plug-in ManifestAdvisor classes61Plug-in clas63Defining and branding ProductsUsing Features..67Product Testing and Packaging67Hands-on EXercise: An RCP Application for the Web Browser Plug-in.68Adding an Application EXtension Point...68Changing the Default Perspective70Modifying Advisor classes70Adding Menu and Toolbar EXtension Points72Adding Commands, Key bindings, and HandlersCreating the Product Configuration FileSummaryCHAPTER 4 User Interface ConceptsHierarchical Navigation with the Common Navigator Framework....77CNF BasicsUsing cnf Within RCPConcurrency Infrastructure83Jobs apl basics84Using the Concurrency InfrastructureHands-on Exercise: A cNf File System NavigatorCreating an RCP Project Template93Adding CNF EXtension PointsImplementation Classes96Summary.106CONTENTSCHAPTER 5 Forms apl and presentation framework.....107Forms apl basics...107Common controlsForm look and feel111Custom Layouts115Complex controlsComplex Forms124Managed Forms124Master/Details Form...125Multipage editorsHands-on EXercise: A Web Look for the Mail Template127Customizing the Workbench WindowCustomizing the Window Contents.129Modifying the Navigation View.132Modifying the Mail view134Summary138CHAPTER 6 Help Support.141Configuring a Product to Use the Help System...141Adding the Dependency Plug-ins.∴..142Updating the Menu Bar......,...........142Adding Help Content.144Help System EXtension PointsTOC File.147Index fileInternationalization.,....150Adding Context Help Support150Product Plug-in Modifications.151Help Plug-in Modificationatomizing the Help systemHands-on Exercise: create an infocenter from custom documentation 156Splitting the Documentation into Topic HTML/XHTML Files...156Creating the Help Contents Plug157Creating the Infocenter Plug-in.158Adding a Product Configuration File to the Infocenter Plug-in.. 159Adding a toc to the help Contents Plug-in160Adding a Help Menu to the Infocenter Plug-in.162Adding Help System Dependencies to the Product Configuration..163Testing the Infocenter Plug164CONTENTSDeploying the Infocenter Plug-inStarting the Infocenter from the command linCustomizing the Infocenter168SummarCHAPTER 7 2D Graphics with GEF and Zest...173Draw2d--The Big Picture.173Using GEFDisplaying FiguresExploring the GEF Shapes Example......176Adding editPolicies185Adding a Palette.187Using Zest190Zest Components.191Zest Layouts193Hands-on EXercise: Build Your Own Advanced 2D Graphics Editor..195Creating the rcP Product196Building a Zest plug-in.......200Testing the Final productSummary207CHaPTEr 8 3D Graphics for RCP with OpenGL209OpengL and swt209The Device-Independent PackageOpengL Bindings for SWT.211Creating OpenGL Scenes with JOGL and SWT211Setting Up for the openGL Scenes212Creating the Wire Cubes scene...220Creating the 3D Chart Scene.228Rotating and Moving the Scene236Refreshing the Scene241Putting the Scene into an RCP ViewHands-on Exercise: Build a Powerful 3D Earth Navigatsr.241....242WWJ Basics242Setting Up the Earth Navigator Project245Creating the earth Navigator view248Flying to a location Within a globeFinding Latitude and Longitude with the Yahoo Geocoding APL.251Creating the Layer Navigator View with Geocoding.256Summary258CONTENTSIXCHAPTER 9 Professional Reports with the Business Intelligenceand Report ToolkitUsing the Report Designer Within the Eclipse IDE.261Installing bIRT Using the Software Updates Manager.262Report Anatomy263Getting Your Feet Wet with the Report Designer263Using birt Within a servlet containerDeploying the BIRT Runtime................269Using the Report viewer Servlet270Using the JSP Tag Library272Using the Report Engine API.275Configuring and Creating a Report Engine276What Kinds of Operations Can Be done with the report engine?..277Hands-on Exercise: Report generation from the oSGi consoleExtending the oSGi console283Generating the ReportRunning the Report Generator Plug-inSummary290CHAPTER 10 Automated Updates.291Updating and Installing Software the Eclipse Way.291Defining and Configuring a Product292Grouping Plug-ins in Features295Grouping Plug-ins Within FragmentsBuilding an Update Site Project.296Software Update Ul Tools....296Using the Software Updates and Add-ons Dialog297Installing Software from the Command Line298Product Build automation with the Headless build System300Build Configuration302Build PhasesHands-on Exercise: Automated Updates and builds for RCP.305Creating a Feature....305Creating an Update site306Testing and PublishingBuilding the Product Headless.....314Building the Product Headless from a cvs Repository.318Summary323INDEX325About the authorVLADIMIR SILVA was born in Quito, Ecuador. He received a System's analyst degree from thePolytechnic Institute of the Army in 1994. In the same year, he came to the United States as anexchange student pursuing a Master's degree in Computer Science at Middle Tennessee StateUniversity After graduation, he joined IBM's Web-Ahead technology think tank His interestsinclude grid computing, neural nets, and artificial intelligence. Vladimir also holds numerousIT certifications, including Oracle Certified Professional(OCP), Microsoft Certified SolutionDeveloper(MCSD), and Microsoft Certified Professional (MCP)
下载地址
用户评论