23_020059_bindex.qxd 10/8/04 1:23 PM Page 559

Index

importing types, 31 A inheriting constructors, 32 AbstractDecoratedTextEditor class, 359 Javadoc comments, 31 AbstractTextEditor class, 357–359 overriding methods, 32 accessibility options (SWT), 202–203 AWT components with SWT, 191 actions (JFace), 226–227, 367 embedded contents, 192 defining events, 192–196 attributes, 368–370 Azzurri Clay, 547 delegates, 371–372 enabling and disabling, 370–371 in the manifest, 368 B selection events, 370 Back function, 37, 53 global, 367 backing up workspaces, 2 implementing manually, 372 beans, 48 local, 367 generic, 48 active help systems, 382, 474–475 properties, 48–49 adapters, SWT events, 142 Beck, Kent, 540 Add Exception Breakpoint function, 117 bookmarks agile programming. See extreme programming bookmark manager, 366 annotations (JFace), 223–224 creating, 22 Ant, 388 breakpoints configuring, 388–389 managing, 117–118 editing scripts, 389–390 setting, 116 ANTLR, 547 Breakpoints View, 117–118 applications, exporting (Duke Speaks project), browser widget (SWT), 177 109–110 build.properties files (spell checker project), 493–495 architecture, platform BundleActivators (OSGi), 314 core runtime, 315 BusyIndicator class (SWT), 175 extension points, 314 buttons help system, 316 Duke Speaks project GUI, 94–95 OSGi, 314 SWT, 156 overview, 314, 316–317 RCP vs. IDE, 315 C resource management, 315 Call Hierarchy View, 27–28 team support, 316–317 CDT, 547 user interfaces, 316 COPYRIGHTEDcell MATERIAL editors AspectJ, 547 Jukebox project, 285–286, 299–300 associations, 54–55 overview, 217–218 Attrezzo per Xindice, 545 central code management attributes, 342 comparison functions, 135 audio players (FreeTTS), 75 conflict resolution, 133–134 automated testing, 538 CVS (Concurrent Versions System), 129–130 automatic code completion Export function, 135 Code Assistant, 28–30, 77–78 repositories, 130–131 comment out code, 31 sharing projects, 132 delegate methods, 32 Team group preferences, 135 encapsulating fields, 32 version management, 133 generating constructors, 33 23_020059_bindex.qxd 10/8/04 1:23 PM Page 560

Change Method Signature function

Change Method Signature function, 39 colors Cheat Sheets JFace, 206 internationalization, 404 SWT, 186–187 plug-ins, 383–384 column headers (Jukebox project), 285–286 CheckedTreeSelectionDialog class, 373 ColumnLayout layout manager, 346 classes, creating, 7–9, 76 ComboContentAssistSubjectAdapter class (JFace), 226 classfiles, compiler preferences, 15 combos (SWT), 165–166 clipboard (SWT), 198–199 command line options, 4–5 closing windows, 65 comment out code, 31 code, formatting, 15–16 Compare Editor, 133–134 Code Assistant Compare With function, 60 Duke Speaks project, 77–78 comparing resources, 43 overview, 28–30 compilation units code folding (Java Editor), 35–36 moving, 39 code generation templates. See templates renaming, 39 code organization compilers, preferences, 14–15 associations, 54–55 classfiles, 15 Find/Replace function, 62–63 JDK compliance, 15 importing files, 67–69 warnings and errors, 14–15 Java Browsing Perspective, 71 component events, processing, 353 navigation tools, 53 components Outline View, 57–58 VE (Visual Editor for Java), 47 context functions, 59–60 workbench, 351–352 representation, 58–59 composites (SWT), 155 packages, 55–57 Concurrent Versions System (CVS), 129–130 perspectives configuring configuring, 66–67 Ant, 388–389 defining, 65–66 debugger, 113–114 project properties, 69–71 perspectives, 66–67 resources, 52 plug-ins storing, 52–53 manifest, 329–332 synchronizing, 53 Plug-in Development perspective, 327–329 types, 52 Schema Editor, 341–343 Search function, 60–62 SDK extension points, 332–341 windows text processing (JFace), 223 closing, 65 conflicts, resolving, 133–134 docking, 63 constants, refactoring code, 42 FastView, 64 constructors maximizing, 65 generating, 33 minimizing, 65 inheriting, 32 opening, 65 ContainerGenerator class, 374 stacking, 64 containers, 322 workbench, 51–52 ContainerSelectionDialog class, 374 collaborative projects, 129–130 content assistants comparison functions, 135 Jukebox project, 304–307 conflict resolution, 133–134 overview, 224–225 CVS (Concurrent Versions System), 129–130 content pane (Duke Speaks project), 96 Export function, 135 ContentViewer class (JFace), 216 plug-ins, 316–317 context associations (help systems), 380–381 repositories, 130–131 context identifications (help systems), 381 sharing projects, 132 context-sensitive help, 26, 473–474 Team group preferences, 135 Control class (SWT), 146 version management, 133 ControlEditor class (SWT), 175 collapsible GUI elements, 346–348 Convert Anonymous Type to Nested Type function, 41

560 23_020059_bindex.qxd 10/8/04 1:23 PM Page 561

Disconnect function Index Convert Local Variable to Field function, 42 RCP (Rich Client Platform) applications, 507–508 Convert Nested Type to Top Level function, 41 spell checker project, 490 CoolBar class (SWT), 170 configuring Ant scripts, 492–495 Copy function, 60 feature, defining, 490–492 Correction Assistant installation, 498 Quick Assist, 34–35 language feature, defining, 495–497 QuickFix, 33–34 update site, defining, 497–498 Countour Generator (FreeTTS), 74 update sites, 398–399 Create a New Class Wizard, 7–8 adding, 400 cursors (SWT), 189–190 install handlers, 401 custom widgets (SWT), 174–176 installing features, 400 Cut function, 60 managing configuration, 400–401 CVS (Concurrent Versions System), 129–130 updating features, 400 zip files, 394 D description editor (Jukebox project), 300–301 data model separation (forms), 350 description editor dialog (Jukebox project), 302–303 data transfer code scanner, 303 JFace, drag and drop, 218 content assistant, 304–307 SWT SourceViewer, 307–311 clipboard, 198–199 description window (Jukebox projet), 275–278 drag and drop, 199 Deselect Working Set function, 53 debugger. See also troubleshooting development teams, 129–130 breakpoints comparison functions, 135 managing, 117–118 conflict resolution, 133–134 setting, 116 CVS (Concurrent Versions System), 129–130 configuring, 113–114 Export function, 135 controlling program execution, 115–116 plug-ins, 316–317 Debug Perspective, 114–115 repositories, 130–131 HotSwap, 117 sharing projects, 132 testing expressions, 117 Team group preferences, 135 variables, 116–117 version management, 133 debugging, 118-119. See also debugger dialogs Debug Perspective, 114–115 JFace, 206–207 Declarations function, 60 implementing, 210–213 declaring applications, 514 InputDialog class, 207–208 defining perspectives, 65–66 making persistent, 213–214 delegate methods, 32 MessageDialog class, 208–209 Delete function, 60 TitleAreaDialog class, 209–210 deployment Jukebox project customizing products, 394–396 description editor, 302–311 Eclipse runtime environment, 394 file-selection, 292–293 example files, 396–398 plug-ins, 372–373 features, 391 CheckedTreeSelectionDialog class, 373 creating, 391–392 ContainerGenerator class, 374 deploying, 393 ContainerSelectionDialog class, 374 fragments, 390 ElementListSelectionDialog class, 374 Hex Game project, 534 ElementTreeSelectionDialog class, 373 installation formats, 388, 394 ListSelectionDialog class, 374 internationalization, 401–402 NewFolderDialog class, 374 Cheat Sheets, 404 ResourceListSelectionDialog class, 374 help systems, 404 SaveAsDialog class, 374 national language resource bundles, 405 SWT, 152–153 text constants in manifest files, 403 message boxes, 154–155 text constants in programs, 402–403 predefined, 153–154 patches, 405 Disable function, 117 Disconnect function, 115

561 23_020059_bindex.qxd 10/8/04 1:23 PM Page 562

Display class (SWT)

Display class (SWT), 147–148 Eclipse 3, migrating to, 552–553 docking windows, 63 Eclipse Modeling Framework. See EMF documentation, 125–127, 343 Eclipse UI, 344 drag and drop actions, 367 JFace, 218 defining in the manifest, 368–372 Jukebox project, 286–288 global, 367 SWT, 199 implementing manually, 372 Duke Speaks project local, 367 animation events, 75–77 dialogs, 372–373 animator, 77–80 CheckedTreeSelectionDialog class, 373 Animator.java class, 78–80 ContainerGenerator class, 374 Code Assistant, 77–78 ContainerSelectionDialog class, 374 creating classes, 77 ElementListSelectionDialog class, 374 embedding into FreeTTS, 81–83 ElementTreeSelectionDialog class, 373 connecting to the Java audio system, 83–84 ListSelectionDialog class, 374 exporting, 109–110 NewFolderDialog class, 374 FreeTTS speech synthesizer, 74–75 ResourceListSelectionDialog class, 374 Player class source code, 106–109 SaveAsDialog class, 374 setup, 73–74 forms, 344–346 third-party software, 555 collapsible elements, 346–348 user interface, 84 data model separation, 350 animated face, 84–86 layouts, 346 buttons, 94–95 Master-Details-Block, 350 content pane, 96 resource management, 349 control panel, 87 text markup, 348–349 domain model, 87–91 help system, 379 events, 94 active help, 382 integrating, 95 Cheat Sheets, 383–384 labels, 94 context associations, 380–381 layouts, 93 context identifications, 381 PlayerPanel class source code, 97–106 deploying, 381–382 presentation, 91–92 dynamic help, 382 sliders, 93 table of contents, 379–380 text, 94 perspectives, defining, 377–379 VE (Visual Editor for Java), 92 preferences, 377 dynamic help systems, 382 property pages, 377 wizards, 374 E IWorkbenchWizard interface, 376 easysql, 545 newWizard extension point, 375–376 Eclipse WizardNewFileCreationPage class, 376–377 core classes, 318–320 workbench, 350–351 installing, 1–5 components, 351–352 migrating to new versions, 551–553 editors, 355–362 platform architecture event processing, 352–355 core runtime, 315 views, 362–366 extension points, 314 workbench page, 351 help system, 316 workbench window, 351 OSGi, 314 Eclipse Visual Editor for Java. See VE overview, 314, 316–317 Edit Active Working Set function, 53 RCP vs. IDE, 315 EditorPart class, 355 resource management, 315 editors, workbench, 355–356 team support, 316–317 AbstractTextEditor class, 357–359 user interfaces, 316 FormEditor class, 360–361 requirements, 1 keyboard shortcuts, 357 Welcome screen, 3 markers, 361–362

562 23_020059_bindex.qxd 10/8/04 1:23 PM Page 563

generic beans Index menus, 356 features, 25, 391 MultiEditor class, 360 creating, 391–392 saving files, 357 deploying, 393 status line, 357 disabling, 400 StatusTextEditor class, 359 installing, 400 TextEditor class, 360 spell checker project toolbars, 356 about.html file, 492 Eiffel for Eclipse, 547 about.ini file, 492 ElementListSelectionDialog class, 374 manifest, 491 ElementTreeSelectionDialog class, 373 project, creating, 490–491 embedded Ant. See Ant updating, 400 embedding external tools, 135–136 field editors (JFace), 232–233 EMF (Eclipse Modeling Framework), 45, 546 fields, encapsulating, 32 Enable function, 117 file associations, 54–55 Encapsulate function, 41–42 files, 323–324 encapsulating fields, 32 importing, 67–69 Error Log, 26 saving (workbench editor), 357 errors, 14–15. See also Problems view file-selection dialogs (Jukebox project), 292–293 event processing, 49–50 FillLayout class (SWT), 178–179 events Filters function, 53 Duke Speaks project GUI, 94 Find/Replace function, 62–63 SWT events package, 141 folders, 323 adapters, 142 FontRegistry class (JFace), 205–206 events, 142 fonts (SWT), 187–188 listeners, 141–142 formatting code, 15–16 overview, 143–145 FormEditor class, 360–361 SWT with Swing/AWT components, 192–196 FormLayout class (SWT), 182–184 workbench, 352–353 forms, 344–346 component events, 353 collapsible elements, 346–348 initialization, 354–355 data model separation, 350 selection events, 354 layouts, 346 sequence, 355 Master-Details-Block, 350 window events, 353 resource management, 349 executable prototypes, 538 text markup, 348–349 ExpandableComposite class, 346–347 FormText class, 348–349 exporting Forward function, 37, 53 applications (Duke Speaks project), 109–110 fragments, 390 preferences, 10 spell checker project expressions, testing, 117 help files, 489 Expressions view (scrapbooks), 24 Java-Properties plug-in, 490 extension points, 314, 514 manifest texts, 488 external tools, embedding, 135–136 program texts, 488 Extract/Inline Constant function, 42 project, creating, 487–488 Extract Interface function, 40 FreeTTS speech synthesizer, 67. See also Duke Speaks Extract Local Variable function, 41 project Extract Method function, 39 downloading, 67–68 extreme programming, 537 importing, 68–69 automated testing, 538 overview, 74–75 executable prototypes, 538 Programmer’s Guide, 75 restructuring code, 540–541 G F GEF, 545 factories, refactoring code, 40 Generalize Type function, 40 FastView, 64, 378 generating constructors, 33 Feature Patch, 405 generic beans, 48

563 23_020059_bindex.qxd 10/8/04 1:23 PM Page 564

global actions

global actions, 367 project, creating, 7 global welcome screen (RCP), 508–509 talking Hello World example, 67–71 Go Into function, 53 help systems, 26–27, 316 Go to Line... function, 37 Hex Game project, 516 GotoMarker, 362 internationalization, 404 Graphics Context class (SWT), 185–186 plug-ins, 379 graphics package (SWT), 185 active help, 382 colors, 186–187 context associations, 380–381 cursors, 189–190 context identifications, 381 fonts, 187–188 deploying, 381–382 Graphics Context class, 185–186 dynamic help, 382 images, 188–189 table of contents, 379–380 GridLayout class (SWT), 180–182 spell checker project, 473 groups (SWT), 156 active help, 474–475 GUI extension points, 334–338 context-sensitive help, 473–474 GUIs. See also JFace; SWT Java properties plug-in, 483–484 composing (with VE), 46–48 running the help action, 476–477 Duke Speaks project table of contents, 473 animated face, 84–86 Hex Game project buttons, 94–95 customizing, 515 content pane, 96 declaring the application, 514 control panel, 87 deployment, 534 domain model, 87–91 game engine, 527–531 events, 94 help system, 516 integrating, 95 HexView class, 521–527 labels, 94 IGame interface, 520–521 layouts, 93 IStatusListener interface, 520 PlayerPanel class source code, 97–106 manifest, 512–513, 516–517 presentation, 91–92 overview, 511–512 sliders, 93 perspective, defining, 515 text, 94 plug-ins required, 514 VE (Visual Editor for Java), 92 RcpApplication class, 517–518 Eclipse platform architecture, 316 RcpPerspective class, 519–520 Eclipse UI, 344 RcpWorkbenchAdvisor class, 518–519 actions, 367–372 setting up, 512 Cheat Sheets, 383–384 texting, 534 dialogs, 372–374 view, defining, 515 forms, 344–350 welcome screen, 515, 531–533 help system, 379–382 hierarchy perspectives, defining, 377–379 packages, 56–57 preferences, 377 viewers (JFace), 215–216 property pages, 377 HotSwap, 117 wizards, 374–377 hover infos, 27, 222 workbench, 350–366 Jukebox project I description window, 275–278 IAction interface (JFace), 226–227 Player module, 247–249 IContainer interface, 322 playlist viewer, 278–295 IDE (Integrated Development Environment), RCP com- parison, 315 H IEditorInput interface, 355 Hello World application IFile interface, 323–324 creating new classes, 7–9 IFolder interface, 323 launching, 9–10 ILabelProvider class (JFace), 216 perspectives, opening, 5–7 ImageRegistry class (JFace), 206 images (SWT), 188–189

564 23_020059_bindex.qxd 10/8/04 1:23 PM Page 565

JFace Index IMarker interface, 324–325 Java Editor importing code folding, 35–36 files, 67–69 syntax coloring, 36 preferences, 10 typing aids, 35 types, 31 Java properties plug-in Improve, 547 internationalization, 490 incremental backups, 2 spell checker project, 477 inheriting constructors, 32 help system, 483–484 INI files (Jukebox project), 261–268 JavaPropertiesPlugin class, 480–481 Inline method or local variable function, 41 JavaPropertiesPreferencePage class, 482–483 input dialogs (JFace), 207–208 Java-Properties tokenizer, 483–484 installation formats, 388, 394 manifest, 478, 479–480 installed JREs preferences, 12–13 preferences, 481–482 install handlers, 401 setup, 477 installing tokenizer extension, 478–479 Eclipse, 1–5 Java Speech API (JSAPI), 67. See also Duke Speaks VE (Visual Editor for Java), 45 project interfaces, creating, 76–77 JavaZoom sound modules, 238 internationalization, 401–402 JDK compliance, 15 Cheat Sheets, 404 JDWP (Java Debug Wire Protocols), 119 help systems, 404 JellySWT, 546 national language resource bundles, 405 JFace. See also Jukebox project spell checker project, 484 dialogs, 206–207 language fragment, creating, 487–490 implementing, 210–213 text constants in Java code, 484–486 InputDialog class, 207–208 text constants in manifest files, 487 making persistent, 213–214 text constants in manifest files, 403 MessageDialog class, 208–209 text constants in programs, 402–403 TitleAreaDialog class, 209–210 Introduce Parameter function, 39 IAction interface, 226–227 Intro View, 26 managers, 227 IPath interface, 319 MenuManager, 227–228 IPlatformRunnable interface (RCP), 503 StatusLineManager, 228 IProgressMonitor interface, 320 preferences, 230–231 IResourceChangeListener interface, 325–326 field editors, 232–233 IResource interface, 320–322 PreferenceConverter class, 231 IWorkbench object, 351 PreferencePage class, 232 IWorkbenchWizard interface, 376 preference page trees, 233–234 IWorkspaceRoot interface, 322 PreferenceStore class, 231 resource management J FontRegistry class, 205–206 J2SE 5.0, 541–542 ImageRegistry class, 206 JAR files (Duke Speaks project), 109–110 JFaceColors class, 206 Java 1.5, 541–542 JFaceResources class, 206 Java Beans. See beans text processing, 218 Java Beans view, 48 annotations, 223–224 Java Browsing Perspective, 71 ComboContentAssistSubjectAdapter class, 226 Java Build Path, editing, 74 configuring, 223 JavaCC, 547 content assistants, 224–225 Java classes, SDK extension points, 334 document model, 218–219 Java console, debugging, 118–119 ProjectionViewer class, 226 Java Debug Wire Protocols (JDWP), 119 scripts, 219–220 Javadoc TextContentAssistSubjectAdapter class, 226 comments, creating, 31 text formatters, 224 documentation, 125–127 text presentation, 225–226 Javadoc View, 27–28 TextViewer class, 220–223

565 23_020059_bindex.qxd 10/8/04 1:23 PM Page 566

JFace (continued)

viewers, 214 PlaylistLabelProvider class, 295–296 cell editors, 217–218 cell text, 297–299 ContentViewer class, 216 returning warning icons, 296–297 data transfer, 218 playlists, storing, 238 event model, 215 playlist viewer, 275–278 hierarchy, 215–216 file-selection dialogs, 292–293 ILabelProvider class, 216 menus, 293–295 StructuredViewer class, 216–217 nested grid layout, 289–290 TreeViewer class, 217 PlaylistViewer class, 281–288 windows, 206–207 PlaylistWindow class, 278–281 wizards, 228 toolbars, 290–292 Wizard class, 228–229 project installation, 238, 240–241 WizardDialog class, 230 third-party software, 555 WizardPage class, 229–230 UML class diagram, 239 WizardSelectionPage class, 230 JUnit, 120 JFaceColors class, 206 setup, 120–121 JFaceDbc, 545 test suites, 122–124 JFaceResources class, 206 Jigloo, 546 K JREs keyboard shortcuts, defining, 11–12, 357 adding, 12–13 KLEEN, 546 version 1.1, 13 JSAPI (Java Speech API), 67. See also Duke Speaks project L Jukebox project Label class (SWT), 161 deploying, 311 labels (Duke Speaks project), 94 description editor, 300–301 labels (SWT), 161 DescriptionEditorDialog class, 302–303 Last Edit Location function, 37 code scanner, 303 launching applications, 9–10 content assistant, 304–307 layout package (SWT), 177–178 SourceViewer, 307–311 FillLayout class, 178–179 description window, 275–278 FormLayout class, 182–184 design goals, 237–238 GridLayout class, 180–182 FileCellEditor class, 299–300 RowLayout class, 179–180 JARs needed, 240 StackLayout class, 184–185 Java Build Path, 240 layouts, 49 JavaZoom sound modules, 238 Duke Speaks project, 93 jlGui 2.2, 238 Eclipse UI, 346 Player class, 247–249 perspectives, 378 Player module, 241 Link with Editor function, 53 BasicPlayerListener interface, 260 listeners, SWT events, 141–142 graphics operations, 249–250 lists (SWT), 164 instrumentation, 251–258 ListSelectionDialog class, 374 layout, 241–242 local actions, 367 Player class source code, 243–247 local debugging. See debugger threads, 242–243 Local History functions, 43–44 window management, 258–260 long-running processes, managing, 326 playlist domain model, 261 accessing features, 270–271 M interface, 261–268 MagicDraw, 546 IPlayList implementation, 268–270 managers (JFace), 227 ISelectionProvider interface, 274–275 MenuManager, 227–228 IStructuredContentProvider interface, 273 spell checker project, 423–424 managing entries, 271–273 StatusLineManager, 228 switching playlists, 273–274 managing long-running processes, 326

566 23_020059_bindex.qxd 10/8/04 1:23 PM Page 567

org.eclipse.swt.widgets package Index markers, 324–325 Open in New Window function, 53 declaring, 361 Open Service Gateway Initiative (OSGi), 314 GotoMarker, 362 Open Super Implementation function, 37, 59 inheritance, 361–362 Open Type Hierarchy function, 37, 59 lifecycle, 362 org.eclipse.core.runtime package, 318–320 marking name occurrences, 63 org.eclipse.swt.accessibility package, 138 Master-Details-Block design pattern, 350 org.eclipse.swt.awt package, 138 maximizing views, 65 org.eclipse.swt.browser package, 138 maximizing windows, 65 org.eclipse.swt.custom package, 138 MenuManager (JFace), 227–228 org.eclipse.swt.dnd package, 139 menus org.eclipse.swt.events package, 139, 141 creating manually, 356 adapters, 142 Jukebox project, 293–295 events, 142 overview, 170–174 listeners, 141–142 message boxes overview, 143–145 overview, 208–209 org.eclipse.swt.graphics package, 139, 185 SWT, 154–155 colors, 186–187 methods cursors, 189–190 call hierarchies, viewing, 27–28 fonts, 187–188 delegate, 32 Graphics Context class, 185–186 overriding, 32 images, 188–189 refactoring code, 40–41 org.eclipse.swt.internal package, 139 migrating to new Eclipse versions, 551–553 org.eclipse.swt.layout package, 139, 177–178 minimizing views, 65 FillLayout class, 178–179 minimizing windows, 65 FormLayout class, 182–184 modifying types, 38–39 GridLayout class, 180–182 Monitor class (SWT), 152 RowLayout class, 179–180 monitoring long-running processes, 320 StackLayout class, 184–185 movable tool groups (SWT), 170 org.eclipse.swt.ole.win32 package, 139 Move function, 39 org.eclipse.swt.printing package, 139 MultiEditor class, 360 org.eclipse.swt.program package, 139 MyEclipse, 548 org.eclipse.swt.widgets package, 139, 145 browser widget, 177 N buttons, 156–157 name occurrences, marking, 63 combos, 165–166 national language resource bundles, deploying, 405 composites, 155 navigation tools, 36–37, 53 Control class, 146 Outline View, 57–58 custom widgets, 174–176 context functions, 59–60 dialogs, 152–153 representation, 58–59 message boxes, 154–155 Package Explorer, 56 predefined, 153–154 nested grid layout (Jukebox project), 289–290 Display class, 147–148 NewFolderDialog class, 374 groups, 156 newWizard extension point, 375–376 labels, 161 Next Annotation function, 37 lists, 164 NullProgressMonitor class, 320 menus, 170–174 Monitor class, 152 movable tool groups, 170 O overview, 146 Occurrences in File function, 60 ProgressBar class, 159 OLE, SWT support, 201 sashes, 167–168 Omondo, 546 scales, 158–159 Open Call HIerarchy function, 37 Scrollable class, 159 Open Call Hierarchy function, 59 Shell class, 148–150 Open Declaration function, 36–37 sliders, 158–159 opening windows, 65 tabbed folders, 168–169

567 23_020059_bindex.qxd 10/8/04 1:23 PM Page 568

org.eclipse.swt.widgets package (continued)

tables, 161–164 perspectives text fields, 159–160 configuring, 66–67 toolbars, 169–170 defining, 65–66, 377–378 trees, 166–167 Action Sets, 378–379 Widget class, 146 FastViews, 378 org.eclipse.swt package, 138 layout, 378 organizing code Hex Game project, 515 associations, 54–55 opening, 5–7 Find/Replace function, 62–63 workbench components, 352 importing files, 67–69 Phraser (FreeTTS), 74 Java Browsing Perspective, 71 PitchMark Generator (FreeTTS), 75 navigation tools, 53 Platform class, 318 Outline View, 57–58 Player module (Jukebox project), 241 context functions, 59–60 BasicPlayerListener interface, 260 representation, 58–59 graphics operations, 249–250 packages, 55–57 GUI, creating, 247–249 perspectives instrumentation, 251–258 configuring, 66–67 layout, 241–242 defining, 65–66 Player class source code, 243–247 project properties, 69–71 threads, 242–243 resources, 52 window management, 258–260 storing, 52–53 playlist domain model (Jukebox project), 261 synchronizing, 53 accessing features, 270–271 types, 52 interface, 261–268 Search function, 60–62 IPlayList implementation, 268–270 windows ISelectionProvider interface, 274–275 closing, 65 IStructuredContentProvider interface, 273 docking, 63 managing entries, 271–273 FastView, 64 switching playlists, 273–274 maximizing, 65 playlist viewer (Jukebox project), 278 minimizing, 65 file-selection dialogs, 292–293 opening, 65 menus, 293–295 stacking, 64 nested grid layout, 289–290 workbench, 51–52 PlaylistViewer class, 281–288 OSGi (Open Service Gateway Initiative), 314 PlaylistWindow class, 278–281 Outline View, 57–58, 365–366 toolbars, 290–292 context functions, 59–60 Plugin class, 318–319 representation, 58–59 Plug-in Development perspective, 327–329 outputting to printers (SWT), 196–198 Plug-in Registry, 25 overriding methods, 32 plug-ins. See also Hex Game project; spell checker project P actions, 367 Package Explorer, 55–57 defining in the manifest, 368–372 packages global, 367 hierarchy, 56–57 implementing manually, 372 organizing, 55–57 local, 367 PageBookView class, 364–365 ANTLR, 547 parsing (Jukebox project), 261–268 AspectJ, 547 Paste function, 60 Attrezzo per Xindice, 545 patches, 405 Azzurri Clay, 547 Path class, 319 CDT, 547 Pause Generator (FreeTTS), 74 Cheat Sheets, 383–384 PDA platforms (SWT), 202 dialogs, 372–373 persistency, workbench views, 363 CheckedTreeSelectionDialog class, 373 persistent dialogs (JFace), 213–214 ContainerGenerator class, 374

568 23_020059_bindex.qxd 10/8/04 1:23 PM Page 569

preference page trees (JFace) Index ContainerSelectionDialog class, 374 Extensions page, 331–332 ElementListSelectionDialog class, 374 Overview page, 331 ElementTreeSelectionDialog class, 373 Runtime page, 331 ListSelectionDialog class, 374 workbench components, 352 NewFolderDialog class, 374 migrating to new Eclipse versions, 552 ResourceListSelectionDialog class, 374 MyEclipse, 548 SaveAsDialog class, 374 Omondo, 546 easysql, 545 perspectives, defining, 377–379 Eclipse platform architecture Plug-in Development perspective, 327–329 core runtime, 315 preferences, 377 extension points, 314 Profiler, 548 help system, 316 property pages, 377 OSGi, 314 Rational, 548 overview, 314, 316–317 RCP (Rich Client Platform), 502–503 RCP vs. IDE, 315 Schema Editor, 341–343 resource management, 315 SDK extension points, 332 team support, 316–317 GUI extension points, 334–338 user interfaces, 316 Java classes, 334 Eclipse UI, 344 schema-based, 333 Eiffel for Eclipse, 547 templates, 338–341 EMF (Eclipse Modeling Framework), 546 Slime UML, 547 features, 391 SpellChecker for Eclipse, 549 creating, 391–392 SWT-Designer, 546 deploying, 393 Sysdeo Eclipse Tomcat Launcher, 548 disabling, 400 Systinet WASP Server for Java, 548 installing, 400 Team Repository Providers, 547 updating, 400 TimeStorm 2.0, 549 forms, 344–346 Together Edition for Eclipse, 548 collapsible elements, 346–348 Transcoder, 547 data model separation, 350 W4Eclipse, 546 layouts, 346 wizards, 374 Master-Details-Block, 350 IWorkbenchWizard interface, 376 resource management, 349 newWizard extension point, 375–376 text markup, 348–349 WizardNewFileCreationPage class, 376–377 fragments, 390 workbench, 350–351 GEF, 545 components, 351–352 help system, 379 editors, 355–362 active help, 382 event processing, 352–355 context associations, 380–381 views, 362–366 context identifications, 381 workbench page, 351 deploying, 381–382 workbench window, 351 dynamic help, 382 X-Men, 548 table of contents, 379–380 XML Buddy, 548 Improve, 547 xored WebStudio, 547 installation formats, 388 Pocket PC platforms (SWT), 202 JavaCC, 547 PopupList class (SWT), 175 JellySWT, 546 PreferenceConverter class (JFace), 231 JFaceDbc, 545 PreferenceDialog class (JFace), 234 Jigloo, 546 PreferenceManager class (JFace), 234 KLEEN, 546 PreferenceNode class, 234 MagicDraw, 546 PreferencePage class (JFace), 232 manifest, 329–330 preference page trees (JFace), 233–234 Build page, 332 PreferenceDialog class, 234 Dependencies page, 331 PreferenceManager class, 234 Extension Points page, 332 PreferenceNode class, 234

569 23_020059_bindex.qxd 10/8/04 1:23 PM Page 570

preferences

preferences refactoring code, 38 compiler, 14–15 constants, 42 formatting code, 15–16 factories, 40 importing and exporting, 10 methods, 39–40 installed JREs, 12–13 modifying types, 38–39 JFace, 230–231 types and classes, 40–41 field editors, 232–233 variables, 41 PreferenceConverter class, 231 source code navigation, 36–37 PreferencePage class, 232 system information file, 25–26 preference page trees, 233–234 Undo function, 42–43 PreferenceStore class, 231 products plug-ins, 377 customizing, 394–396, 508 templates, 16–18 deployment VE (Visual Editor for Java), 46 Eclipse runtime environment, 394 workbench, 11–12 example files, 396–398 Preferences class, 319 features, 391, 391–392, 393 Preferences dialog, 10–11 fragments, 390 PreferenceStore class (JFace), 231 installation formats, 388, 394 Previous Annotation function, 37 update sites, 398–401 printer output (SWT), 196–198 zip files, 394 Problems Filter, 20–21 internationalization, 401–402 Problems view, 19–21 Cheat Sheets, 404 processes, long-running help systems, 404 managing, 326 national language resource bundles, 405 monitoring, 320 text constants in manifest files, 403 processing events, 352–353 text constants in programs, 402–403 component events, 353 patches, 405 initialization, 354–355 Profiler, 548 selection events, 354 programming style sequence, 355 agile programming, 537 window events, 353 automated testing, 538 productivity tools executable prototypes, 538 automatic code completion extreme programming, 537 Code Assistant, 28–30, 77–78 Java 1.5, 541–542 comment out code, 31 making refinements, 539–540 delegate methods, 32 restructuring code, 540–541 encapsulating fields, 32 reusing components, 541 generating constructors, 33 ProgressBar class (SWT), 159 importing types, 31 ProgressMonitorWrapper class, 320 inheriting constructors, 32 ProjectionViewer class (JFace), 226 Javadoc comments, 31 projects, 322–323 overriding methods, 32 creating, 7 Correction Assistant natures, 322 Quick Assist, 34–35 properties, 69–71 QuickFix, 33–34 properties help system, 26–27 beans, 48–49 Javadoc View, 27–28 projects, 69–71 Java Editor Swing components, 49 code folding, 35–36 property pages, 377 syntax coloring, 36 Property View, 366 typing aids, 35 Pull up function, 39 Local History functions, 43–44 Redo function, 42–43

570 23_020059_bindex.qxd 10/8/04 1:23 PM Page 571

speech synthesizers Index projects, 322–323 Q reacting to changes in, 325–326 Quick Assist, 34–35 replacing with older versions, 43 QuickFix, 33–34 restoring, 43 storing, 52–53 R synchronizing, 53 Rational, 548 types, 52 RCP (Rich Client Platform), 501–502. See also Hex workspace root, 322 Game project Restore from Local History function, 60 deploying applications, 507–508 restoring resources, 43 global welcome screen, 508–509 Resume function, 115 IDE comparison, 315 Rich Client Platform. See RCP IPlatformRunnable interface, 503 rich clients, 501 plug-ins, 502–503 RowLayout class (SWT), 179–180 product customization, 508 Run Configurations, 9 testing applications, 507 Run icon, 9 WorkbenchAdvisor class, 503–504 application hooks, 504–505 S event loop hooks, 506 sashes (SWT), 167–168 information providers, 506–507 SashForm class (SWT), 175 welcome screen hook, 506 SaveAsDialog class, 374 window hooks, 505–506 saving files (workbench editor), 357 Read Access function, 60 scales (SWT), 156 Redo function, 42–43 schema-based extension points, 333 Refactor function, 60 Schema Editor, 341–343 refactoring code, 38, 540–541 scrapbooks, 22–24 constants, 42 Scrollable class (SWT), 159 factories, 40 SDK extension points, 332 methods, 39–40 GUI extension points, 334–338 modifying types, 38–39 Java classes, 334 types and classes, 40–41 schema-based, 333 variables, 41 templates, 338–341 References function, 60 Search function, 60–62 remote debugging, 119 Search View, 61–62 Remove All Terminated Launches function, 115 Section class, 347–348 Rename function, 39 Segmenter (FreeTTS), 74 Replace With function, 60 selection events, processing, 354 repositories, 130–131 Select Working Set function, 53 ResourceListSelectionDialog class, 374 serializing (Jukebox project), 261–268 resource management Shell class (SWT), 148–150 Eclipse platform architecture, 315 shortcuts, defining, 11–12 Eclipse UI forms, 349 Show in Package Explorer function, 37 JFace sliders FontRegistry class, 205–206 Duke Speaks project, 93 ImageRegistry class, 206 SWT, 156 JFaceColors class, 206 Slime UML, 547 JFaceResources class, 206 Sort function, 53 SWT, 200–201 source code navigation, 36–37 Resource Navigator, 51–52 SourceViewer class (JFace), 223 ResourceNavigator class, 363–364 speech synthesizers. See also Duke Speaks project resources, 52, 320–322 FreeTTS, 67 comparing, 43 downloading, 67–68 containers, 322 importing, 68–69 files, 323–324 Programmer’s Guide, 75 folders, 323 FreeTTS speech synthesizer, 74–75 Java Speech API (JSAPI), 67 571 23_020059_bindex.qxd 10/8/04 1:23 PM Page 572

speech synthesizers (continued)

JSAPI (Java Speech API), 67 manifest, 478, 479–480 Via Voice, 73 preferences, 481–482 SpellChecker for Eclipse, 549 setup, 477–478 spell checker project tokenizer extension, 478–479 analyzing documents, 463 plug-in configuration, 412 Check Spelling action, 424 imported files, 413–419 CheckSpellingActionDelegate class, 431–438 manifest, 413–419 disposal, 430–431 setup, 410–411 document management, 428–429 SpellCheckerPlugin class, 419–421 getInstance() method, 426–427 dictionary URL, 421–422 selection provider, 427–428 initializing preferences, 422–423 SpellCheckingTarget class, 425–426 manager, 423–424 text replacement, 429–430 third-party software, 555 configuring, 463 stacking windows, 64 DefaultSpellCheckerPreferencePage class, 469 StackLayout class (SWT), 184–185 domain model, 464–465 . See SWT GUI, 466 status line, accessing, 357 preferences, 463–464 StatusLineManager (JFace), 228 reading from PreferenceStore, 471–472 StatusTextEditor class, 359 ShortIntegerFieldEditor class, 470–471 Step Into function, 115 SpellCheckerPreferencePage class, 466–469 Step Over function, 116 core classes, 409 Step Return function, 116 correction window Step with Filters function, 116 actions (JFace), 449–450 StructuredViewer class (JFace), 216–217 managing images, 450–452 StyledText class (SWT), 175 SepellCorrectionView class, 439–449 SubProgressMonitor class, 320 deploying, 490 Suspend function, 115 configuring Ant scripts, 492–495 Swing components feature, defining, 490–492 properties, 49 installation, 498 with SWT, 191 language feature, defining, 495–497 embedded contents, 192 update site, defining, 497–498 events, 192–196 engine, 408 SWT. See also Jukebox project engine/interface interaction, 452 accessibility options, 202–203 creating engines, 459–460 advantages, 140 managers (JFace), 453–454 data transfer, 198 managing engines, 458–459 clipboard, 198–199 operations, 462–463 drag and drop, 199 plug-in selection, 454–457 disadvantages, 140 processing spelling errors, 461–462 events package, 141 running the engine, 457–458 adapters, 142 help system, 473 events, 142 active help, 474–475 listeners, 141–142 context-sensitive help, 473–474 overview, 143–145 running the help action, 476–477 example program, 150–151 table of contents, 473 graphics package, 185 internationalization, 484 colors, 186–187 language fragment, creating, 487–490 cursors, 189–190 text constants in Java code, 484–486 fonts, 187–188 text constants in manifest files, 487 Graphics Context class, 185–186 Java properties plug-in, 477 images, 188–189 help system, 483–484 layouts package, 177–178 JavaPropertiesPlugin class, 480–481 FillLayout class, 178–179 JavaPropertiesPreferencePage class, 482–483 FormLayout class, 182–184 Java-Properties tokenizer, 483–484 GridLayout class, 180–182

572 23_020059_bindex.qxd 10/8/04 1:23 PM Page 573

TextViewer class (JFace) Index RowLayout class, 179–180 talking Hello World example, 67–71 StackLayout class, 184–185 tasks, creating, 21–22 package overview, 138–139 Tasks View, 366 Pocket PC platforms, 202 team development, 129–130 printer output, 196–198 comparison functions, 135 resource management, 200–201 conflict resolution, 133–134 run configuration, 151–152 CVS (Concurrent Versions System), 129–130 with Swing/AWT components, 191 Export function, 135 embedded contents, 192 plug-ins, 316–317 events, 192–196 repositories, 130–131 SWT package, 141 sharing projects, 132 widgets package, 145 Team group preferences, 135 browser widget, 177 version management, 133 buttons, 156–157 Team Repository Providers, 547 combos, 165–166 Team Synchronizing Perspective, 133 composites, 155 templates Control class, 146 automatic code completion, 29–30 custom widgets, 174–176 preferences, 16–18 dialogs, 152–155 SDK extension points, 338–341 Display class, 147–148 Terminate function, 115 groups, 156 testing expressions, 117 labels, 161 test suites (JUnit) lists, 164 creating, 122–124 menus, 170–174 running, 124 Monitor class, 152 text, Duke Speaks project GUI, 94 movable tool groups, 170 Text class (SWT), 159–160 overview, 146 text constants, internationalizing, 402–403 ProgressBar class, 159 TextContentAssistSubjectAdapter class (JFace), 226 sashes, 167–168 TextEditor class, 360 scales, 158–159 text fields (SWT), 159–160 Scrollable class, 159 text formatters (JFace), 224 Shell class, 148–150 text markup, 348–349 sliders, 158–159 text presentation (JFace), 225–226 tabbed folders, 168–169 text processing (JFace), 218 tables, 161–164 annotations, 223–224 text fields, 159–160 ComboContentAssistSubjectAdapter class, 226 toolbars, 169–170 configuring, 223 trees, 166–167 content assistants, 224–225 Widget class, 146 document model, 218–219 Windows32 support (OLE), 201 ProjectionViewer class, 226 SWT-Designer, 546 scrips, 219–220 Synchronize function, 133 TextContentAssistSubjectAdapter class, 226 synchronizing resources, 53 text formatters, 224 syntax coloring (Java Editor), 36 text presentation, 225–226 Sysdeo Eclipse Tomcat Launcher, 548 TextViewer class, 220–223 system information file, 25–26 hover infos, 222 Systinet WASP Server for Java, 548 operations, 222–223 selection, 221 T SourceViewer class, 223 tabbed folders (SWT), 168–169 text presentation, 223 TableEditor class (SWT), 176 viewport, 221 tables (SWT), 161–164 visible text region, 221 TableTree class (SWT), 176 TextViewer class (JFace), 220–223 TableTreeEditor class (SWT), 176 hover infos, 222 TableWrapLayout layout manager, 346 operations, 222–223 selection, 221

573 23_020059_bindex.qxd 10/8/04 1:23 PM Page 574

TextViewer class (JFace) (continued)

SourceViewer class, 223 beans, 48 text presentation, 223 generic, 48 viewport, 221 properties, 48–49 visible text region, 221 composing GUIs with, 46–48 thin clients, 501 Duke Speaks project, 92 TimeStorm 2.0, 549 event processing, 49–50 Together Edition for Eclipse, 548 installing, 45 Toggle Method Breakpoint function, 60 invoking, 46 Toggle Watchpoint function, 60 layouts, 49 Tokenizer (FreeTTS), 74 maximizing views, 46 toolbars preferences, 46 creating manually, 356 version 1.1 JREs, 13 Jukebox project, 290–292 version management, 133 overview, 169–170 Via Voice, 73 workbench views, 363 viewers (JFace), 214 Transcoder, 547 cell editors, 217–218 TreeEditor class (SWT), 176 ContentViewer class, 216 trees (SWT), 166–167 data transfer, 218 tree structures, organizing elements into, 342–343 event model, 215 TreeViewer class (JFace), 217 hierarchy, 215–216 troubleshooting. See also debugging ILabelProvider class, 216 Correction Assistant StructuredViewer class, 216–217 Quick Assist, 34–35 TreeViewer class, 217 QuickFix, 33–34 views help system, 26–27 Hex Game project, 515 Type Hierarchy Browser, 56–57 maximizing, 65 types minimizing, 65 modifying types, 38–39 workbench, 362–363 moving, 38 bookmark manager, 366 refactoring code, 40–41 Outline View, 365–366 renaming, 39 PageBookView class, 364–365 typing aids (Java Editor), 35 persistency, 363 Property View, 366 U ResourceNavigator class, 363–364 Undo function, 42–43 Tasks View, 366 Update Manager, 398–399 toolbars, 363 Update Manager Log, 26 Visual Editor for Java. See VE update sites adding, 400 W install handlers, 401 W4Eclipse, 546 installing features, 400 warnings, 14–15. See also Problems view managing configuration, 400–401 Widget class (SWT), 146 spell checker project, 497–498 widgets package (SWT), 145 Update Manager, 398–399 browser widget, 177 updating features, 400 buttons, 156–157 Up To function, 53 combos, 165–166 Use Supertype function, 41 composites, 155 Utterance Processor (FreeTTS), 75 Control class, 146 custom widgets, 174–176 V dialogs, 152–153 variables message boxes, 154–155 debugger, 116–117 predefined, 153–154 refactoring code, 41 Display class, 147–148 Variables View, 116 groups, 156 VE (Visual Editor for Java), 45 labels, 161 lists, 164 574 23_020059_bindex.qxd 10/8/04 1:23 PM Page 575

xored WebStudio Index menus, 170–174 StatusTextEditor class, 359 Monitor class, 152 TextEditor class, 360 movable tool groups, 170 toolbars, 356 overview, 146 event processing, 352–353 ProgressBar class, 159 component events, 353 sashes, 167–168 initialization, 354–355 scales, 158–159 selection events, 354 Scrollable class, 159 sequence, 355 Shell class, 148–150 window events, 353 sliders, 158–159 views, 362–363 tabbed folders, 168–169 bookmark manager, 366 tables, 161–164 Outline View, 365–366 text fields, 159–160 PageBookView class, 364–365 toolbars, 169–170 persistency, 363 trees, 166–167 Property View, 366 Widget class, 146 ResourceNavigator class, 363–364 window events, processing, 353 Tasks View, 366 windows toolbars, 363 closing, 65 wizards, 374 docking, 63 IWorkbenchWizard interface, 376 FastView, 64 newWizard extension point, 375–376 JFace, 206–207 WizardNewFileCreationPage class, 376–377 managing (Jukebox project), 258–260 workbench page, 351 maximizing, 65 workbench window, 351 minimizing, 65 WorkbenchAdvisor class, 503–504 opening, 65 application hooks, 503–504 stacking, 64 event loop hooks, 506 workbench, 351 information providers, 506–507 Windows32, SWT support, 201 welcome screen hook, 506 Wizard class (JFace), 228–229 window hooks, 503–504 WizardDialog class (JFace), 230 workbench preferences, 11–12 WizardNewFileCreationPage class, 376–377 workspace, 320 WizardPage class (JFace), 229–230 backing up, 2 wizards long-running processes, managing, 326 JFace, 228 markers, 324–325 Wizard class, 228–229 resources, 320–322 WizardDialog class, 230 containers, 322 WizardPage class, 229–230 files, 323–324 WizardSelectionPage class, 230 folders, 323 plug-ins, 374 projects, 322–323 IWorkbenchWizard interface, 376 reacting to changes in, 325–326 newWizard extension point, 375–376 workspace root, 322 WizardNewFileCreationPage class, 376–377 selecting location, 2 WizardSelectionPage class (JFace), 230 Write Access function, 60 workbench, 51–52, 350–351 components, 351–352 X editors, 355–356 X-Men, 548 AbstractTextEditor class, 357–359 XML Buddy, 548 FormEditor class, 360–361 xored WebStudio, 547 keyboard shortcuts, 357 markers, 361–362 menus, 356 MultiEditor class, 360 saving files, 357 status line, 357

575 23_020059_bindex.qxd 10/8/04 1:23 PM Page 576