comparison man/oo-browser.texi @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 49a24b4fd526
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 \input psfig
2 \input texinfo @c -*-texinfo-*-
3
4 @c
5 @c SUMMARY: The OO-Browser User Manual for V2
6 @c USAGE: Hardcopy man from TeX; Info man from 'texinfo-format-buffer'.
7 @c
8 @c AUTHOR: Bob Weiner
9 @c ORG: Motorola Inc., PPG
10 @c ORIG-DATE: 10-Apr-90
11 @c LAST-MOD: 2-May-96 at 23:36:02 by Harri Pasanen
12 @c
13 @c DESCRIPTION:
14 @c DESCRIP-END.
15
16 @c %**start of header (This is for running Texinfo on a region.)
17 @setfilename ../info/oo-browser.info
18 @settitle The OO-Browser User Manual
19 @c %**end of header (This is for running Texinfo on a region.)
20 @synindex vr fn
21
22 @iftex
23 @finalout
24 @end iftex
25
26 @titlepage
27 @sp 4
28 @center @titlefont{The OO-Browser User Manual}
29 @sp 1
30 @center The Multi-language Object-Oriented Code Browser
31 @sp 5
32 @center Bob Weiner
33 @center Motorola Inc.
34 @center E-mail: <oo-browser@@hub.ucsb.edu> (This is a mailing list.)
35 @sp 2
36 @center Edition 2.9.12
37 @sp 2
38 @center May 1996
39
40 @page
41 @vskip 0pt plus 1filll
42 Copyright @copyright{} 1989-1995 Free Software Foundation, Inc.
43
44 All trademarks referenced herein are trademarks of their respective
45 holders.
46 @setchapternewpage on
47 @end titlepage
48 @page
49
50 @node Top, Introduction, (dir), (dir)
51 @c node-name, next, previous, up
52 @unnumbered Preface
53
54 @ifinfo
55 @noindent
56 Copyright @copyright{} 1989-1996 Free Software Foundation, Inc.
57
58 All trademarks referenced herein are trademarks of their respective holders.
59
60 @end ifinfo
61 This edition of the OO-Browser User Manual is for use with any version
62 2.9.12 or greater of the OO-Browser. The OO-Browser is available for
63 free use, distribution, and modification under the terms of version 2 or
64 later of the GNU Public License (GPL). No representations are made
65 about the suitability of this software for any purpose. It is provided
66 "as is" without express or implied warranty.
67
68 @cindex credits
69 @cindex InfoDock, obtaining
70 @cindex OO-Browser, obtaining
71 @cindex anonymous ftp
72 The OO-Browser was designed and written by Bob Weiner. Motorola,
73 Inc. funded and donated this work for free redistribution as part of the
74 InfoDock integrated productivity toolset. Torgeir Veimo and Mark Stern
75 helped write the X OO-Browser core. Don Yacktman helped write the
76 NEXTSTEP OO-Browser core. Jeff Sparkes helped with the Java language
77 support. Harri Pasanen implemented the Python language support, and
78 updated the documentation to reflect that addition.
79
80 @vindex file, BR-README
81 @cindex README file
82 @cindex installation
83 The OO-Browser and InfoDock can be obtained via anonymous ftp on the
84 Internet from: @file{/anonymous@@ftp.xemacs.org:/pub/infodock}.
85 Installation instructions for the OO-Browser can be found in the
86 @file{BR-README} file in the OO-Browser distribution.
87
88 This manual documents the user interface and operation of the OO-Browser
89 multi-language browser. It assumes a very basic familiarity in the use
90 of the GNU Emacs editor as documented in @cite{[Stallman 87]}. It also
91 assumes familiarity with object-oriented software concepts. However,
92 many technical terms used in this manual are given precise meaning in
93 the glossary. @xref{Glossary}. The OO-Browser is meant to be easy to
94 use, so you can point and click to use it, rather than learning all of
95 the key stroke commands.@refill
96
97 Chapter 1 of the manual focuses on OO-Browser Environments to provide
98 the reader with a picture of how to organize work for use with the
99 OO-Browser (@pxref{Environments,,Working with Environments}).
100 @xref{Usage,,Using the OO-Browser}, if you would rather start with the
101 interactive features of the browser. @xref{Features,,OO-Browser
102 Features}, for a quick overview of the browser's features.@refill
103
104 Throughout this manual, sequences of key strokes are delimited by braces,
105 @{@}, command names are delimited by parentheses, (), and variable names
106 are emphasized.@refill
107
108 We hope that you enjoy using the OO-Browser and that it improves your
109 productivity.
110
111 @menu
112 * Introduction:: Introduction
113 * Environments:: Working with Environments
114 * Usage:: Using the OO-Browser
115 * Options:: OO-Browser Options
116 * Customization:: Personal Customization
117 * Standalone:: Using Standalone OO-Browser Features
118 * Languages:: Language-Specific Notes
119 * Features:: OO-Browser Features
120 * Commands:: OO-Browser Command Descriptions
121 * Glossary:: Glossary
122 * References:: References
123 * Keys:: Key Binding Index
124 * Command Index:: Command and Variable Index
125 * Concepts:: Concept Index
126
127 --- The Detailed Node Listing ---
128
129 Working with Environments
130
131 * Creating Environments::
132 * Building Environments::
133 * Loading Environments::
134 * Saving Environments::
135
136 Using the OO-Browser
137
138 * Invoking:: Invoking the OO-Browser
139 * Top-Level Classes:: Displaying Top-Level Classes
140 * Moving to Entries::
141 * Saving Listings:: Writing a Listing to a File
142 * Children and Parents:: Browsing Children and Parents
143 * Descendants and Ancestors:: Browsing Descendants and Ancestors
144 * Viewing and Editing:: Viewing and Editing Classes
145 * Browsing Elements::
146 * Browsing Categories::
147 * Browsing Protocols::
148 * Browsing Implementors::
149 * Exiting a Listing::
150 * Quitting and Refreshing:: Quitting and Refreshing the OO-Browser
151 * Using the Mouse::
152 * Getting Help::
153 * Locating Entries::
154 * Filtering Entries::
155 * Ordering Entries::
156 * Statistics:: Environment and Class Summaries
157 * Class Info:: Language-Specific Class Information
158 * Adding and Deleting Classes::
159 * Completing Names::
160 * Graphical Browsing:: Graphical OO-Browser Interfaces
161
162 OO-Browser Options
163
164 * External Viewing:: Using An External Viewer or Editor
165 * Keep Viewed Classes::
166 * Inhibit Version:: Inhibit Version Screen
167 * Invert Ancestors:: Invert Ancestor Trees
168 * Save All:: Save All Lookup Tables
169 * Use Children:: Build Children Lookup Table
170 * Sort Options:: Controlling Class Listing Order
171
172 Language-Specific Notes
173
174 * C Specifics::
175 * C++ Specifics::
176 * CLOS Specifics::
177 * Eiffel Specifics::
178 * Java Specifics::
179 * Objective-C Specifics::
180 * Python Specifics::
181
182 C++ Specifics
183
184 * C++ Element Selection:: Source Code Element Selection
185 * C++ Settings::
186
187 CLOS Specifics
188
189 * CLOS Method Handling:: Method Handling
190 * CLOS Settings::
191
192 Eiffel Specifics
193
194 * Eiffel Listings::
195 * Eiffel Element Selection:: Source Code Element Selection
196 * Eiffel Settings::
197
198 Objective-C Specifics
199
200 * Objective-C Categories::
201 * Objective-C Protocols::
202 * Objective-C Element Selection:: Source Code Element Selection
203 * Objective-C Settings::
204
205 Python Specifics
206
207 * Python Module Lookup:: Source Code Element Selection
208 * Python Settings::
209
210 @end menu
211
212 @node Introduction, Environments, Top, Top
213 @c node-name, next, previous, up
214 @unnumbered Introduction
215
216 @cindex OO-Browser
217 @cindex Smalltalk
218 The @dfn{OO-Browser} is a multi-windowed, interactive, object-oriented
219 class browser designed for professional use. Its user interface is
220 similar to the well-known Smalltalk browsers @cite{[Goldberg 83]}, yet
221 it is much more flexible and easy to use.
222
223 @cindex Eiffel
224 @cindex C++
225 @cindex C
226 @cindex Objective-C
227 @cindex CLOS
228 @cindex Python
229 @cindex Smalltalk
230 @cindex Info
231 @noindent
232 The OO-Browser is unique in several respects:
233 @itemize @bullet
234 @item
235 It currently supports seven object-oriented languages (Eiffel, C++,
236 Objective-C, CLOS (Lisp), Java, Python and Smalltalk), one non-object-oriented
237 language (C), and one documentation language, (GNU Info).
238
239 @item
240 It may be used for both system exploration and for browsing purposes as
241 part of a professional software development tool chest.
242
243 @item
244 It quickly displays and provides views of complicated inheritance trees,
245 making it an important tool for understanding object-oriented systems.
246
247 @item
248 It has a completely direct-manipulation interface with multiple modalities.
249
250 @item
251 It is integrated with a powerful editing environment that can be
252 customized to meet personal work styles.
253 @end itemize
254
255 @cindex listing buffer
256 @cindex listing window
257 @cindex viewer window
258 @cindex user interface
259 The picture on the following page highlights the major components of
260 the OO-Browser user interface. (If you are reading the online Info
261 version of this manual, see the last paragraph of this node for a link
262 to the aforementioned picture.)
263
264 The windows across the top of the OO-Browser frame are called @dfn{class
265 listing windows}; they display @dfn{listing buffers} with a single class
266 name per line. The @dfn{viewer window} fills the bottom half of the
267 frame. It is used to display class source and summary information. It
268 is also used to display help on the OO-Browser command set. Pictured
269 here in the viewer window is part of the browser help buffer,
270 summarizing its command key bindings.
271
272 All key bindings described throughout this manual are effective only
273 within listing buffers, unless otherwise indicated. This means
274 that the keys may not be used within the buffers displayed in the class
275 viewer window. Instead, all normal editing keys are available in most
276 buffers displayed in the viewer window.
277
278 @cindex textual interface
279 @iftex
280 @sp 2
281 @centerline{@psfig{figure=im/oobr-text.eps}}
282 @end iftex
283 @ifinfo
284 Mouse click on the following filename to view a picture of
285 the textual OO-Browser: "im/oobr-text.eps". Under InfoDock, use the
286 middle mouse button. Under Emacs with the Hyperbole system loaded, use
287 the shift-middle mouse button or shift-left on a two button mouse.
288 Otherwise, there is no built-in way to view the picture.
289 @end ifinfo
290
291 @node Environments, Usage, Introduction, Top
292 @c node-name, next, previous, up
293 @chapter Working with Environments
294
295 @cindex Environment, the
296 @cindex Library search list
297 @cindex System search list
298 Whenever the OO-Browser is in use, an Environment is selected. An
299 Environment may be built or simply specified. An @dfn{Environment
300 specification} tells the browser what to include in the construction of
301 an Environment. (@xref{Creating Environments}, for more information.)
302 An OO-Browser @dfn{Environment} includes a set of inter-class
303 relationships together with a few browser settings. The phrase,
304 @dfn{the Environment}, refers to the current OO-Browser Environment.
305 Many browser commands depend on information in the Environment.@refill
306
307 The set of classes included in an Environment is specified by two lists
308 of directories, below which all of the Environment's class source files
309 are to be found. (The OO-Browser will automatically search
310 sub-directories below the directories specified.) The first list of
311 directories is called the @dfn{Library search list}; it defines the
312 locations of stable, typically reusable classes that have been released
313 for general use. The second list is called the @dfn{System search
314 list}; it defines the locations of unreleased classes being developed,
315 often for a particular system. All class names within a single
316 Environment must be unique to ensure proper operation of the browser.
317
318 The OO-Browser lets one create, update and save Environments. Once an
319 Environment file has been created, it may be loaded at any time. The
320 browser will then use this Environment for all of its operations until
321 another one is loaded.
322
323 The browser maintains a separate Environment for each programming
324 language on which it is used. Thus, if one switches from Eiffel to
325 C++ browsing and then back to Eiffel browsing, the Eiffel environment
326 will not need to be reloaded; it will appear immediately and the
327 frame will appear as if the Eiffel OO-Browser were invoked for the
328 first time.
329
330 @cindex Environment, default
331 The recommended default name for Environment files is, @file{OOBR}.
332 We recommend that you store each Environment in the top-level directory
333 of the first system pathname in the Environment, i.e@. the root
334 directory of a system's code.
335
336 Environment files are automatically created and loaded by the OO-Browser
337 so that you need never become familiar with their format. You are
338 responsible for remembering which Environment files you create and for
339 requesting their use whenever desired. @xref{Invoking,,Invoking the
340 OO-Browser}, for information on how to specify a different Environment
341 file for use.@refill
342
343 @menu
344 * Creating Environments::
345 * Building Environments::
346 * Loading Environments::
347 * Saving Environments::
348 @end menu
349
350
351 @node Creating Environments, Building Environments, Environments, Environments
352 @c node-name, next, previous, up
353 @section Creating Environments
354
355 @cindex Environment specification
356 Environment specifications are useful when one wants to describe a
357 number of Environments to the OO-Browser but wants to defer their
358 construction until later. Large environments then can be built
359 overnight. @xref{Building Environments}, for more information.@refill
360
361 @kindex C-c C-c
362 @findex br-env-create
363 @cindex initialization file
364 Every Environment must be specified before it can be built or used.
365 Thus, specifying an Environment is the first step in creating it.
366 Environment specifications are created with the @{@kbd{C-c C-c}@}
367 @code{(br-env-create)} command, which prompts for all necessary
368 information. This command may be invoked repeatedly to quickly specify
369 a number of different Environments.@refill
370
371 @noindent
372 Here are the Environment specification components for which you will be
373 prompted:
374 @table @code
375 @item System search directories
376 List of directories below which other System directories containing
377 class source code and directories of class source files may be found.
378
379 @item Library search directories
380 List of directories below which Library files of class source code
381 and directories of class source files may be found.
382
383 @emph{EIFFEL NOTE: We strongly suggest that if you have previous
384 versions of library class source below any of these directories, that
385 you move them elsewhere, e.g. ISE's Eiffel version "2.1" directory of
386 source. These will cause class naming conflicts that the browser will
387 not resolve to your satisfaction. The basic rule is that every class
388 name within a single Environment should be unique. Use @{@kbd{M-e}@} to
389 help find duplicate classes.}
390 @end table
391
392
393 @node Building Environments, Loading Environments, Creating Environments, Environments
394 @c node-name, next, previous, up
395 @section Building Environments
396
397 @cindex Environment building
398 An Environment specification tells the OO-Browser what to include in the
399 Environment, but the Environment still must be built before use. When a
400 new Environment must be built or when a large number of changes have
401 been made to classes in the Environment, the following commands are
402 useful:
403
404 @findex br-env-rebuild
405 @findex br-lib-rebuild
406 @findex br-sys-rebuild
407 @kindex C-c C-e
408 @kindex L
409 @kindex S
410 @table @kbd
411 @item @{C-c C-e@}
412 build all Env classes @code{(br-env-rebuild)} (This prompts for whether
413 or not to use a background process to build the Environment.)
414 @item @{L@}
415 build Env Library classes only @code{(br-lib-rebuild)}
416 @item @{S@}
417 build Env System classes only @code{(br-sys-rebuild)}
418 @end table
419
420
421 When class names or locations have changed or the Environment's
422 inheritance structure is modified, the Environment must be rebuilt. For
423 small Environment changes, one may use the class addition and deletion
424 features of the browser. @xref{Adding and Deleting Classes}, for more
425 information.@refill
426
427 @cindex Environment building, batch
428 @cindex large Environments
429 The OO-Browser lets you build large environments in the background so
430 you can go on to other work while waiting on a build. When the build is
431 complete, it will ask you whether you want to browse the built Environment.
432
433 Alternatively, very large Environments may be built overnight by
434 invoking Emacs in batch mode at a scheduled time. To do this, you must
435 first create an Environment specification so that the browser knows what
436 to build. @xref{Creating Environments}. Then use a shell command
437 line of the form below (substitute your local OO-Browser installation
438 directory for @emph{<BR-DIR>}):@*
439 @example
440 emacs -batch -l <BR-DIR>/br-start.el @emph{Env-Spec-File} \
441 ... @emph{Spec File} -f br-env-batch-build > log-file
442 @end example
443 @noindent
444 for example:@*
445 @example
446 emacs -batch -l br-start.el OOBR -f br-env-batch-build > log-file
447 @end example
448
449 Typically when using the above command line, one should redirect
450 the standard output stream to a log file for later examination, as is
451 done in the above example. This helps ensure that either the
452 Environment built successfully or a message indicating the cause of
453 failure is provided.
454
455 @node Loading Environments, Saving Environments, Building Environments, Environments
456 @c node-name, next, previous, up
457 @section Loading Environments
458
459 @cindex Environment loading
460 @cindex loading an Environment
461 @kindex C-c C-o
462 @findex oo-browser command
463 @vindex br-env-default-file
464 @vindex file, OOBR
465 @cindex default Environment
466 A new Environment may be loaded for use at any time within the
467 OO-Browser. One may either select the load Environment command from the
468 OO-Browser command summary or may use the @{@kbd{C-c C-o}@}
469 @code{(oo-browser)} command to select a language and environment to load.
470 When prompted for the Environment file to load or create, an immediate
471 @{@key{RET}@} will browse the most recently loaded Environment, if any.
472 Otherwise, it will create and load the Environment file in the current
473 directory whose name is given by the @var{br-env-default-file} variable
474 (default is @file{OOBR}).
475
476 @node Saving Environments, , Loading Environments, Environments
477 @c node-name, next, previous, up
478 @section Saving Environments
479
480 The OO-Browser automatically builds and saves Environments in most
481 cases. Occasionally one may find a need to force the Environment to
482 be saved to a file, as in the case when one wants to save an Environment
483 under a different file name.
484
485 @kindex C-c C-s
486 @findex br-env-save
487 Use @{@kbd{C-c C-s}@}, the @code{(br-env-save)} command to force an
488 Environment save to occur. The command will prompt for a file to save
489 to, with the default as the current Environment file name.
490
491
492 @node Usage, Options, Environments, Top
493 @c node-name, next, previous, up
494 @chapter Using the OO-Browser
495
496 @menu
497 * Invoking:: Invoking the OO-Browser
498 * Top-Level Classes:: Displaying Top-Level Classes
499 * Moving to Entries::
500 * Saving Listings:: Writing a Listing to a File
501 * Children and Parents:: Browsing Children and Parents
502 * Descendants and Ancestors:: Browsing Descendants and Ancestors
503 * Viewing and Editing:: Viewing and Editing Classes
504 * Browsing Elements::
505 * Browsing Categories::
506 * Browsing Protocols::
507 * Browsing Implementors::
508 * Exiting a Listing::
509 * Quitting and Refreshing:: Quitting and Refreshing the OO-Browser
510 * Using the Mouse::
511 * Getting Help::
512 * Locating Entries::
513 * Filtering Entries::
514 * Ordering Entries::
515 * Statistics:: Environment and Class Summaries
516 * Class Info:: Language-Specific Class Information
517 * Adding and Deleting Classes::
518 * Completing Names::
519 * Graphical Browsing:: Graphical OO-Browser Interfaces
520 @end menu
521
522 @node Invoking, Top-Level Classes, Usage, Usage
523 @section Invoking the OO-Browser
524
525 @cindex invoking the OO-Browser
526 @cindex starting the OO-Browser
527 @kindex C-c C-o
528 @findex oo-browser
529 @cindex language support
530 The OO-Browser supports the following languages: C++ or G++, C, Info
531 (the online manual format), CLOS (Lisp), Eiffel, Objective-C, Java (as
532 documented in @cite{[Java 95]}), Python and Smalltalk. The OO-Browser may be
533 used on source written in any of these languages by using @{@kbd{C-c
534 C-o}@} or, if that key has not been setup, by using @{@kbd{M-x
535 oo-browser @key{RET}}@}. This command will prompt for the language to
536 browse, the Environment specification of directories to browse, and then
537 will either load the Environment or build it. After the Environment is
538 built, it will display the set of classes (or nodes) in the Environment.
539 (Choose C++ if you are browsing plain C code.)
540
541 @kindex C-u C-c C-o
542 @cindex current Environment
543 @cindex Environment, current
544 @cindex oo-browser, restarting
545 If you have exited the browser using @{@kbd{q}@} and wish to browse the
546 same Environment again, use @{@kbd{C-u C-c C-o}@}, which will
547 immediately redisplay the browser just as you left it.
548
549 @findex c++-browse
550 @findex eif-browse
551 @findex info-browse
552 @findex clos-browse
553 @findex objc-browse
554 @findex python-browse
555 @findex smt-browse
556 Alternatively, you can invoke the browser on a specific language
557 Environment, e.g@. to bring back the last Environment browsed under that
558 language. The language-specific browser invocation commands are:
559 @{@kbd{M-x eif-browse @key{RET}}@}, @{@kbd{M-x c++-browse @key{RET}}@},
560 @{@kbd{M-x info-browse @key{RET}}@}, @{@kbd{M-x clos-browse
561 @key{RET}}@}, @{@kbd{M-x objc-browse @key{RET}}@}, @{@kbd{M-x python-browse @key{RET}}@}.@refill
562
563 @cindex Environment file
564 @cindex prefix argument
565 @cindex Environment, prompting for
566 @noindent
567 A prefix argument given to any of these commands will cause it to prompt
568 for an Environment file to use as the current Environment.
569
570 On startup, if the selected Environment has been saved to a file, it
571 will be loaded; otherwise, the user will be asked to specify the
572 Environment. The specification will be saved under the previously given
573 file name. The browser will then load this Environment specification
574 file.
575
576 @cindex aborting
577 @cindex canceling
578 @kindex C-g
579 @findex keyboard-quit
580 If the browser loads an Environment file and finds only a specification,
581 it will prompt the user in the minibuffer window with a request to build
582 the Environment. It will continue to prompt the user until a full
583 Environment is built or loaded and then the browser will start,
584 displaying its multi-windowed interface. To abort from these prompts
585 and to cancel the browser invocation request at any time, use
586 @{@kbd{C-g}@} @code{(keyboard-quit)}, the standard way to abort an
587 unfinished command within Emacs.
588
589 Once an Environment has been loaded, entering and quitting the browser
590 are rapid actions, allowing a smooth transition between editing and
591 browsing.
592
593
594 @node Top-Level Classes, Moving to Entries, Invoking, Usage
595 @section Displaying Top-Level Classes
596
597 @cindex classes, top-level
598 The OO-Browser starts by displaying all top-level classes in the
599 Environment. @dfn{Top-level classes} are those that do not inherit from
600 any others. The browser can show all top-level classes or System or
601 Library classes only. Once in the browser, use:
602
603 @kindex s
604 @findex br-sys-top-classes
605 @kindex l
606 @findex br-lib-top-classes
607 @kindex t
608 @findex br-top-classes
609 @table @kbd
610 @item @{s@}
611 System top-level classes only
612 @item @{l@}
613 Library top-level classes only
614 @item @{t@}
615 all top-level classes in Environment
616 @end table
617
618 Note that selection of any of these commands does not affect the ancestry or
619 descendancy trees for any given class. Each simply limits which trees are
620 easily accessible for browsing. For example, selection of Library
621 top-level classes only, followed by the browser show children command,
622 @{@kbd{c}@} @code{(br-children)}, would display the name of a System
623 class if the System class directly inherits from the selected Library
624 class.
625
626 @cindex classes, all
627 @cindex Environment, ordering classes
628 To see an ordered listing of all of the classes in a particular part of
629 an Environment, use a prefix argument with the commands given above:
630
631 @table @kbd
632 @item @{C-u s@}
633 all System classes
634 @item @{C-u l@}
635 all Library classes
636 @item @{C-u t@}
637 all Environment classes.
638 @end table
639
640 @node Moving to Entries, Saving Listings, Top-Level Classes, Usage
641 @section Moving to Entries
642
643 @kindex C-n
644 @findex br-next-entry
645 @kindex C-p
646 @findex br-prev-entry
647 @cindex previous entry
648 @cindex entry, previous
649 @cindex next entry
650 @cindex entry, next
651 @cindex movement
652 Many browser commands operate on the current entry in a listing window.
653 @{@kbd{C-n}@} @code{(br-next-entry)} moves point to
654 the next entry in a listing buffer. @{@kbd{C-p}@}
655 @code{(br-prev-entry)} moves to the previous entry. Both take prefix
656 arguments and use them as the number of entries by which to move.
657
658 @node Saving Listings, Children and Parents, Moving to Entries, Usage
659 @section Writing a Listing to a File
660
661 @kindex C-c C-w
662 @findex br-write-buffer
663 @cindex listing, editing
664 @cindex listing, writing to a file
665 Many standard editing keys are rebound in listing buffers to
666 provide a useful set of accessible commands. Nonetheless, one needs to
667 be able to store and to edit listing buffers. The @{@kbd{C-c
668 C-w}@} @code{(br-write-buffer)} command provides this capability. The
669 command prompts for a file name under which to save the current buffer.
670 One may then quit the browser, read in the file and edit it as a plain
671 text file.
672
673 @node Children and Parents, Descendants and Ancestors, Saving Listings, Usage
674 @section Browsing Children and Parents
675
676 @kindex c
677 @findex br-children
678 @kindex p
679 @findex br-parents
680 @cindex browsing, children
681 @cindex children
682 @cindex browsing, parents
683 @cindex parents
684 @{@kbd{c}@} displays the children of the class at point; @{@kbd{p}@}
685 displays its parents. @{@kbd{C-u c}@} displays the children of all classes
686 in the present listing window; @{@kbd{C-u p}@} does the same for parents.
687
688 @node Descendants and Ancestors, Viewing and Editing, Children and Parents, Usage
689 @section Browsing Descendants and Ancestors
690
691 @cindex browsing, ancestors
692 @cindex ancestors
693 @cindex browsing, descendants
694 @cindex descendants
695 The OO-Browser is very fast at computing ancestor and descendant hierarchies,
696 accounting for multiple inheritance and cycles where permitted. Descendant
697 and ancestor listings provide an immediate overview of some key relationships
698 among class groupings.
699
700 @kindex d
701 @findex br-descendants
702 @kindex a
703 @findex br-ancestors
704 With point on any class entry line in a listing buffer, @{@kbd{d}@}
705 shows descendants for the class and @{@kbd{a}@} shows ancestors.
706 @{@kbd{C-u d}@} shows the descendant trees for all classes in the
707 current listing buffer and @{@kbd{C-u a}@} does the same for ancestors.
708
709 @cindex ancestors, inverted
710 @vindex br-invert-ancestors
711 The ancestor tree for a given root class is normally shown branching out
712 from the root class. This means that higher-level ancestors, those
713 further away from the root class, are shown in descending trees below
714 lower-level ancestors. The leaves of the tree represent the ancestors
715 furthest from the root, as one might expect.
716
717 This, however, is the inverse of inheritance trees. Some people prefer
718 to see ancestor trees like inheritance trees, with parents above
719 children. This is an @dfn{inverted ancestor tree}. To obtain this
720 view of ancestors use @{@kbd{M- -1 a}@} for ancestors of the current
721 class. For ancestors of all classes in the current buffer, use
722 @{@kbd{M- -2 a}@}, or any negative prefix argument lest than -1.
723 Inverted ancestor trees may be made the default by setting
724 @code{br-invert-ancestors} non-nil, as in:
725
726 @display
727 @{@kbd{M-x set-variable @key{RET} br-invert-ancestors @key{RET} t @key{RET}}@}
728 @end display
729
730 @noindent
731 This is a personal setting that affects all Environments used by the browser.
732
733 @node Viewing and Editing, Browsing Elements, Descendants and Ancestors, Usage
734 @section Viewing and Editing Classes
735
736 @kindex v
737 @findex br-view-entry
738 @cindex classes, viewing
739 @cindex viewing a class
740 @kindex e
741 @findex br-edit-entry
742 @cindex classes, editing
743 @cindex editing a class
744 One of the major uses of the OO-Browser is to view or edit class source
745 texts. @{@kbd{v}@} will view the source for the class or element name
746 at point in a read-only mode in the viewer window; it will not select
747 the viewer window. @{@kbd{e}@} does the same, except that it edits the
748 element source in a read-write mode, if the user has write permission for
749 the source file. It also selects the viewer window.
750
751 @cindex classes, name completion
752 @cindex completion
753 A prefix argument to either of these commands, as in @{@kbd{C-u v}@} or
754 @{@kbd{C-u e}@}, causes them to prompt for the entry to display.
755 Full class and element name completion is provided once an Environment
756 has been loaded and built. @xref{Completing Names}.@refill
757
758 @vindex br-edit-file-function
759 @vindex br-view-file-function
760 The value of the variable @var{br-edit-file-function} is the function
761 that the browser calls when a source file entity is displayed for editing.
762 The value of @var{br-view-file-function} is the function called to view
763 a source file entity. @xref{External Viewing,,Using an External
764 Viewer or Editor}, for information on using non-Emacs editors and
765 viewers with the browser.
766
767 If a user has no read access rights to a file, this will be apparent
768 when the browser tries to display the file and fails. If the user does
769 not have write permission to the class source file, the standard
770 @var{br-edit-file-function} may display the file in a read-only mode
771 (indicated by two percent signs, %%, at the front of the buffer mode
772 line). This is a warning that one should not attempt to edit the file.
773 In some cases, one really wants to try to edit such a file; in those
774 cases, the buffer may be toggled between read-only and read-write modes
775 via the Emacs command, @code{(toggle-read-only)}, usually bound to
776 @{@kbd{C-x C-q}@}.
777
778 @kindex SPC
779 @findex br-viewer-scroll-up
780 @kindex DEL
781 @findex br-viewer-scroll-down
782 @cindex scrolling viewer
783 @cindex viewer, scrolling
784 Once a class has been displayed for viewing, @{@key{SPC}@} will scroll its
785 source text up (forward) almost a windowful; @{@key{DEL}@} will scroll it
786 down (backward) almost a windowful. In fact, this is a general means
787 for scrolling the OO-Browser viewer window whenever point, as shown by
788 the Emacs cursor, is in a listing window. When a class is
789 selected for editing, @{@kbd{C-v}@} will scroll up, @{@kbd{M-v}@} will
790 scroll down, assuming the standard Emacs key bindings.
791
792 @kindex C-c C-v
793 @findex br-to-from-viewer
794 @cindex movement, to or from viewer
795 Sometimes one needs to quickly switch back and forth between the viewer
796 window and the current listing window. The normal Emacs window
797 movement commands often are cumbersome in such instances. Instead
798 @code{(br-to-from-viewer)} bound to @{@kbd{C-c C-v}@}, allows the
799 desired back and forth movement. It acts as a toggle switch,
800 alternately moving between the buffer in the viewer window and the prior
801 listing buffer.
802
803 @cindex class, narrowing view to
804 @vindex br-narrow-view-to-class
805 @cindex classes, others same file
806 @kindex C-x n w
807 @kindex C-x w
808 @findex widen
809 By default, the OO-Browser displays class definition files in their
810 entirety. If there are multiple classes in a file, you will be able to
811 scroll through all of them. If you prefer that only the selected class
812 be visible, enable the @code{br-narrow-view-to-class} option flag. When
813 set to a non-nil value, this flag narrows the source buffer so that only
814 the class of interest and its preceding comments are visible. To
815 examine other classes in the same file, you must execute a @{@kbd{C-x n
816 w}@} @code{(widen)} command when in the narrowed buffer. (Use
817 @{@kbd{C-x w}@} under Emacs 18.)
818
819 @kindex 1 (one)
820 @findex br-view-full-frame
821 @kindex C-x 1
822 @findex delete-other-windows
823 @cindex viewer, full frame
824 If the browser is used on a small screen, it may be helpful to use the
825 a full frame to view or edit a buffer of source code. If point is in a
826 listing buffer, pressing @{@kbd{1}@}, the number one, will expand the
827 viewer window buffer to the full frame. When the browser is
828 re-invoked, it will look just as it did before. If point is in the
829 viewer window, @{@kbd{C-x 1}@} @code{(delete-other-windows)}, will do
830 practically the same thing, except that when the browser is re-invoked
831 it will not look precisely as it did before.
832
833 @kindex C-c C-k
834 @findex br-kill
835 @kindex C-x k
836 @findex kill-buffer
837 @cindex viewer, killing displayed buffer
838 If point is in a listing window, the buffer displayed in the
839 viewer window may be killed with the @{@kbd{C-c C-k}@} @code{(br-kill)}
840 command. (A killed buffer is removed from the current Emacs session.)
841
842 If point is in the viewer window, as it will be after editing a class
843 buffer, use the standard Emacs command @{@kbd{C-x k}@}
844 @code{(kill-buffer)} instead.
845
846 @node Browsing Elements, Browsing Categories, Viewing and Editing, Usage
847 @section Browsing Elements
848 @cindex element
849 @cindex browsing elements
850 @cindex element browsing
851 @cindex instance browsing
852 @cindex feature
853 @cindex routine
854 @cindex attribute
855 @cindex Common Lisp
856 @cindex CLOS
857 A @dfn{feature} of a class is either a routine or attribute defined in
858 the class. An @dfn{element} is either a feature or an instance of a
859 class. A number of OO-Browser languages support feature browsing, as
860 documented in @ref{Languages}. Instance browsing is only supported
861 in very limited form, for class instances which exist within the code
862 itself. For example, under Common Lisp and CLOS, a default class called
863 @code{[function]} is defined whose instances are all named functions
864 defined within the environment. A @dfn{default class} is a class
865 created to categorize elements of the Environment for browsing; default
866 classes are not specified within the Environment source code.
867
868 @kindex f
869 @kindex r
870 @findex br-features
871 Use @{@kbd{f}@} to display a listing of the features or elements
872 of the class at point, including inherited features.
873 Generally, this includes only routines. Use @{@kbd{M-0 f}@} to turn off
874 the display of inherited features; use the same command again to
875 re-enable display of inherited features.
876
877 If inherited features are off and there are no feature definitions for
878 the class, the class definition is displayed instead, so that its
879 feature declarations may be browsed.
880
881 Use @{@kbd{C-u f}@} to display a listing of the features or elements of
882 all classes in the present listing window. Prior versions of the
883 OO-Browser used @{@kbd{r}@} to display features. This key remains for
884 backward compatibility but may be used for another purpose in the
885 future.
886
887 @kindex e
888 @findex br-edit-entry
889 @cindex edit element
890 @kindex v
891 @findex br-view-entry
892 @cindex view element
893 @kindex F
894 @findex br-feature-signature
895 @cindex signature
896 @cindex feature
897 Move point to an element name and use @{@kbd{v}@} to view its source
898 definition or @{@kbd{e}@} to edit its source. Use @{@kbd{F}@} to see
899 the full signature tag of an element, which includes its argument names
900 and types, if any. @{@kbd{C-u F}@} lists the signatures of all elements
901 in the current listing. This is handy when several elements from the
902 same class have the same name but differ in signature.
903
904 @xref{Using the Mouse}, for how the Action and Assist Keys may be used
905 for browsing elements.
906
907 @node Browsing Categories, Browsing Protocols, Browsing Elements, Usage
908 @section Browsing Categories
909
910 @cindex category
911 @cindex class category
912 The definition of a @dfn{category} is language-specific. Some languages such
913 as Smalltalk use categories to group related classes together. The
914 OO-Browser does not yet support this kind of category.
915
916 A set of Objective-C categories segments a single class into groupings
917 of related features. When a class category is defined, the category
918 name appears within a set of parentheses, so the OO-Browser displays
919 category names with parentheses around them to distinguish them from
920 classes. The aggregation of all of the categories defined by a class
921 and its ancestors represents the complete class definition. The
922 OO-Browser does support this kind of category.
923
924 @kindex C
925 Use the @{@kbd{C}@} key when point is on a class listing entry to obtain
926 a list of the categories defined for the class within the Environment
927 source code (this excludes inherited categories). Use @{@kbd{C-u C}@}
928 to list the categories for all classes in the current listing. Thus, to
929 see the full set of categories for a class, use @{@kbd{a}@} to list the
930 ancestors of the current class and then @{@kbd{C-u C}@} to show all
931 direct and inherited categories of the class.
932
933 @cindex implementor, category
934 @kindex v
935 @kindex e
936 Use @{@kbd{v}@} or @{@kbd{e}@} to view or edit the class category
937 definition associated with a category entry at point. @xref{Browsing
938 Implementors}, for an explanation of how to browse the classes that
939 directly implement a category.
940
941 @kindex f
942 Use @{@kbd{f}@} with point on the default @code{[category]} class to
943 list all categories defined in the Environment.
944
945 @node Browsing Protocols, Browsing Implementors, Browsing Categories, Usage
946 @section Browsing Protocols
947
948 @cindex protocol
949 @cindex class protocol
950 @cindex conformance to protocol
951 @cindex formal protocol
952 The definition of a @dfn{protocol} is language-specific.
953 It generally refers to an interface specification to which a class is
954 said to conform. A class conforms to a protocol by implementing the set
955 of features defined in the protocol.
956
957 Presently, the OO-Browser support protocols only under Objective-C.
958 Objective-C protocols are sometimes called @emph{formal protocols}.
959 Protocol interfaces are specified in a manner similar to classes but their
960 features are only implemented in conforming classes. A single protocol
961 can inherit from any number of other protocols; thus, any conforming
962 class must conform to all of its ancestor protocols.
963
964 Class definitions list the protocols to which they directly conform,
965 within a set of angle brackets. So the OO-Browser displays protocol
966 names with angle brackets around them to distinguish them from classes.
967
968 @kindex P
969 Use the @{@kbd{P}@} key when point is on a class listing entry to obtain
970 a list of the protocols to which the class directly conforms
971 (this excludes inherited protocols). Use @{@kbd{C-u P}@}
972 to list the direct protocols for all classes in the current listing.
973 There is not yet a way to show the complete set of protocols to which a
974 class conforms, which includes all protocols inherited from other
975 protocols and all protocols inherited from ancestor classes.
976
977 @kindex v
978 @kindex e
979 If you use @{@kbd{P}@} when point is on a class' protocol entry, the
980 specification of the protocol will be displayed. Use @{@kbd{v}@} or
981 @{@kbd{e}@} to view or edit the class or class category definition
982 associated with a protocol entry at point.
983
984 @cindex implementor, protocol
985 Use standard class browsing keys when on a protocol entry to examine its
986 parents, children, ancestors or descendants. @xref{Browsing
987 Implementors}, for an explanation of how to browse the classes that
988 directly conform to a protocol.
989
990 @kindex f
991 Use @{@kbd{f}@} with point on the default @code{[protocol]} class to
992 list all protocols defined in the Environment.
993
994 @node Browsing Implementors, Exiting a Listing, Browsing Protocols, Usage
995 @section Browsing Implementors
996
997 @cindex implementor
998 @cindex element
999 @kindex I
1000 @findex br-implementors
1001 @kindex e
1002 @kindex v
1003 @kindex F
1004 @cindex signature
1005 Sometimes it is important to see the list of classes that define a
1006 particular element name. These are called the element's
1007 @dfn{implementors}. With point on an element listing, @{@kbd{I}@} will
1008 compute and display the element's implementor list. @{@kbd{C-u I}@} will
1009 do the same for all elements in the present listing.
1010
1011 Move point to an implementor class name and then use @{@kbd{v}@} or
1012 @{@kbd{e}@} to view or edit the element associated with the class. If an
1013 element name is defined with different signatures in a single class, the
1014 class will be listed as an implementor multiple times. Each class entry
1015 can be used to display a different element. @{@kbd{C-u F}@} will
1016 display the element signature associated with each class entry in the
1017 same order as the class entries in the present listing buffer.
1018
1019 @node Exiting a Listing, Quitting and Refreshing, Browsing Implementors, Usage
1020 @section Exiting a Listing
1021
1022 @kindex x
1023 @findex br-exit-level
1024 @cindex exiting a listing level
1025 When done with a browser listing buffer, one should clear and exit
1026 from the buffer's display with @{@kbd{x}@}. This command also displays
1027 the previous listing level, if any, and moves point to its
1028 previous position within this buffer.
1029
1030 In this way, the command provides a quick and clean way to exit back to a
1031 previous listing level; you may exit a single level at a time or all the way
1032 back to the top-level listing buffer through repeated invocation of the
1033 command or by sending a prefix argument value to the command.
1034
1035 There is no need to exit from listing buffers to quit from the browser. You
1036 may quit, perform other actions, and then re-invoke the browser at the same
1037 point from which you left.
1038
1039 @node Quitting and Refreshing, Using the Mouse, Exiting a Listing, Usage
1040 @section Quitting and Refreshing the OO-Browser
1041
1042 @kindex q
1043 @findex br-quit
1044 @cindex quitting, temporarily
1045 @cindex quitting, permanently
1046 @{@kbd{q}@} quits from the browser temporarily. The same command with a
1047 prefix argument quits from the browser permanently and kills all
1048 non-modified browser buffers. It will not kill any of the class source
1049 buffers.
1050
1051 @kindex C-c C-r
1052 @findex br-refresh
1053 @cindex refreshing the browser display
1054 If you are familiar with Emacs windowing, you may quickly alter the window
1055 configuration of the frame while in the browser, either intentionally or
1056 more likely unintentionally. If you execute non-browser Emacs commands while
1057 in the browser, you may find other buffers have taken the place of your
1058 browser buffers. In either case, you may refresh the browser display and
1059 restore it to the way it was when you originally invoked it, by using
1060 @{@kbd{M-x br-refresh @key{RET}}@} or with @{@kbd{C-c C-r}@} when in a
1061 browser listing buffer.
1062
1063 @node Using the Mouse, Getting Help, Quitting and Refreshing, Usage
1064 @section Using the Mouse
1065
1066 @cindex mouse control
1067 @kindex H
1068 @findex br-help-ms
1069 @cindex Action Key
1070 @cindex Assist Key
1071 @kindex Action Key
1072 @kindex Assist Key
1073 @cindex XEmacs
1074 @cindex Emacs 19
1075 @cindex InfoDock
1076 @cindex Menu Key
1077 Once configured, mouse control within the OO-Browser is helpful and easy
1078 to use. Under InfoDock, XEmacs and Emacs 19, the right mouse button,
1079 called the Menu Key, pops up a menu of OO-Browser commands when clicked
1080 within an OO-Browser listing buffer. Under XEmacs and Emacs 19, the
1081 same menu is added to the menubar used in listing buffers. Under
1082 InfoDock with mode-specific menus turned on, the menubar is devoted to
1083 OO-Browser commands.
1084
1085 Even if the above features are not available to you, if you have mouse
1086 support in your Emacs, the following features are available. A single
1087 mouse button, called the @dfn{Action Key}, is used for most purposes.
1088 The Action Key is bound to the shift-middle mouse button under standard
1089 Emacs, to the middle mouse button under InfoDock, or to the shift-left
1090 button on a two-button mouse.
1091
1092 A second button, called the @dfn{Assist Key}, is used for help and other
1093 ancillary functions. The Assist Key is bound to the shift-right button.
1094 The @file{br-help-ms} file uses a table format to summarize mouse
1095 control within the browser, it may be displayed within the browser via
1096 the @{@kbd{H}@} @code{(br-help-ms)} command.
1097
1098 Within an empty listing buffer, clicking the Action Key displays the
1099 browser command menu; the Assist Key displays a menu listing
1100 language-specific source files. Within this menu, the Action Key
1101 selects a buffer for display, the Assist Key marks the buffer for
1102 deletion. To perform the deletes, click the Action Key after the last
1103 line of the menu. If the Assist Key is clicked after the last line, the
1104 deletes are undone and a list of all current editor buffers is shown,
1105 allowing you to select buffers other than those containing classes.
1106
1107 The mouse buttons can be used to scroll the viewer window a page at a
1108 time by clicking after the end of any line. The Action Key scrolls the
1109 window up (forward) a windowful and the Assist Key scrolls it down
1110 (backward) a windowful.
1111
1112 The Action Key acts as follows when in an OO-Browser listing buffer. If
1113 the button is pressed:
1114
1115 @itemize @bullet
1116 @item
1117 on a blank line following all entries or in a blank listing buffer, the
1118 browser command help menu is displayed in the viewer window
1119 exited;@refill
1120 @item
1121 at the beginning of a (non-single character) class name, the class'
1122 ancestors are listed;@refill
1123 @item
1124 at the end of an entry line, the listing is scrolled up;@refill
1125 @item
1126 on the `...', following a class name, point is moved to the class
1127 descendency expansion;@refill
1128 @item
1129 before an element name, the implementor classes of the name are listed;@refill
1130 @item
1131 anywhere else on an entry line (i.e. on the entry), the entry's source
1132 is displayed for editing.@refill
1133 @end itemize
1134
1135 The Assist Key acts as follows when in a listing buffer. If it is pressed:
1136
1137 @itemize @bullet
1138 @item
1139 in a blank buffer, a selection list of buffer files is displayed;@refill
1140 @item
1141 at the beginning of a (non-single character) class, the class'
1142 descendants are listed;@refill
1143 @item
1144 at the end of an entry line, the listing is scrolled down;@refill
1145 @item
1146 on the `...', following a class name, point is moved to the class
1147 expansion;@refill
1148 @item
1149 anywhere else on a class line, the class' elements are listed;@refill
1150 @item
1151 anywhere else on an element line, the element's implementor classes are
1152 listed;@refill
1153 @item
1154 on a blank line following all entries, the current listing buffer is
1155 exited.@refill
1156 @end itemize
1157
1158 @node Getting Help, Locating Entries, Using the Mouse, Usage
1159 @section Getting Help
1160
1161 @kindex h
1162 @findex br-help
1163 The OO-Browser is very intuitive to operate, but help is always a key or
1164 button press away when needed. Besides the online and printed versions
1165 of this manual, there is an online quick reference built into the
1166 OO-Browser. Once the browser windows appear, press @{@kbd{h}@} at any
1167 time to bring up a buffer full of command help.
1168
1169 @kindex C-h k
1170 @findex describe-key
1171 For more extensive documentation on each browser key, use the Emacs command
1172 @{@kbd{C-h k @var{key-sequence}}@}.
1173
1174 @node Locating Entries, Filtering Entries, Getting Help, Usage
1175 @section Locating Entries
1176
1177 @kindex w
1178 @findex br-where
1179 @cindex class, source file
1180 @cindex class, where is
1181 @cindex element, source file
1182 @cindex element, where is
1183 @cindex entry, where is
1184 The @{@kbd{w}@} @code{(br-where)} command can be used to locate the
1185 source file associated with a listing entry. It prints the full
1186 pathname of the source file in the minibuffer window.
1187 A prefix argument as in, @{@kbd{C-u w}@}, causes the command to prompt
1188 for the class or element name to locate. Full completion is
1189 provided. @xref{Completing Names}.@refill
1190
1191 @kindex m
1192 @findex br-match
1193 @cindex classes, matching names
1194 @cindex classes, finding
1195 @cindex matching to class names
1196 @cindex finding classes
1197 @cindex locating classes
1198
1199 The @{@kbd{m}@} @code{(br-match)} command provides a quick mechanism for
1200 locating any classes in the Environment whose names match to an
1201 expression in part or in whole. The browser will prompt for the
1202 expression to use. All matching names are displayed in ascending order.
1203
1204 By default the expression is treated as a regular expression. A prefix
1205 argument sent to the command tells it to treat the expression as a string.
1206
1207 After each search, the command reports the number of matching classes
1208 found and displays them in the current listing window. It then prompts
1209 for another expression to key on. The selected set is then filtered
1210 once again. This cycle continues until the @{@key{RET}@} is pressed
1211 without giving an expression. This process allows for easy location of
1212 desired classes.
1213
1214 When the command is invoked (first time through the loop), if the
1215 @{@key{RET}@} key is pressed without giving a match expression, the search
1216 will match to all classes referenced in the Environment.
1217
1218 If you want a regular expression to match to whole class names
1219 exclusively, begin it with a '^' and end it with a '$' character which
1220 match to beginning of name and end of name, respectively. Thus, "^....$"
1221 would match to class names with exactly four characters. A string
1222 match always matches to any class name that contains the matching
1223 string.
1224
1225 @node Filtering Entries, Ordering Entries, Locating Entries, Usage
1226 @section Filtering Entries
1227
1228 @kindex M
1229 @findex br-match-entries
1230 @cindex entries, matching names
1231 @cindex matching to listing entries
1232 @cindex filtering entries
1233 @cindex locating Entries
1234
1235 The @{@kbd{M}@} @code{(br-match-entries)} command works much like the
1236 @code{(br-match}) command described in, @ref{Locating Entries}, except
1237 that it matches only to entries in the current listing buffer. It thus
1238 allows you to filter a listing to just those entries that you care to
1239 browse. It prompts you for a regular expression of entries to match
1240 and then deletes entries that don't match. A prefix argument sent to
1241 the command tells it to treat the match expression as a string.
1242
1243 After each search, the command reports the number of matching entries
1244 found and displays them in the current listing window. It then prompts
1245 for another expression to match. The selected set is then filtered
1246 once again. This cycle continues until the @{@key{RET}@} is pressed
1247 without giving an expression. This process allows for easy incremental
1248 filtering of listings.
1249
1250 When the command is invoked (first time through the loop), if the
1251 @{@key{RET}@} key is pressed without giving a match expression, the search
1252 will match to all entries in the listing, so no filtering will be done.
1253
1254 If you want a regular expression to match to whole entries
1255 exclusively, begin it with a '^' and end it with a '$' character which
1256 match to beginning of line and end of line, respectively. Thus, "^....$"
1257 would match to entry lines with exactly four characters. A string
1258 match always matches to any entry that contains the matching string.
1259
1260
1261 @node Ordering Entries, Statistics, Filtering Entries, Usage
1262 @section Ordering Entries
1263
1264 @kindex o
1265 @findex br-order
1266 @cindex entries, ordering
1267 @cindex ordering listings
1268 @cindex sorting listings
1269 Once you have a desired set of names in a browser listing window, you
1270 may want to re-order. For a simple ascending order sort by
1271 name, use @{@kbd{o}@}. To sort the lines in the current listing window
1272 accounting for leading whitespace, use a positive prefix argument. To sort
1273 the lines in descending order accounting for leading whitespace, use a
1274 negative prefix argument. Note that all of the top-level class display
1275 commands automatically order their output lists. @xref{Top-Level Classes,,
1276 Displaying Top-Level Classes}.@refill
1277
1278 To sort in descending order, first sort into ascending order with
1279 @{@kbd{o}@} to strip any leading whitespace and then use a negative
1280 prefix argument to sort the names into descending order.
1281
1282
1283 @node Statistics, Class Info, Ordering Entries, Usage
1284 @section Environment and Class Summaries
1285
1286 @kindex #
1287 @findex br-count
1288 @cindex number of classes
1289 @cindex class count
1290 The @{@kbd{#}@} @code{(br-count)} command displays in the minibuffer the
1291 number of entries in the present listing buffer.
1292
1293 @kindex M-c
1294 @findex br-class-stats
1295 @cindex class info
1296 @cindex class statistics
1297 The @{@kbd{M-c}@} @code{(br-class-stats)} command displays in the
1298 minibuffer window the number of parents and children for the selected
1299 class; with a prefix argument, it prompts for the class name to use.
1300
1301 @kindex M-e
1302 @findex br-env-stats
1303 @cindex Environment statistics
1304 @cindex Environment spec summary
1305 The @{@kbd{M-e}@} @code{(br-env-stats)} command displays the
1306 specification for the current Environment along with a few Environment
1307 statistics (OO-Browser version used to build the Environment, total
1308 classes, number of System and Library classes, number of duplicate and
1309 undefined classes) in the viewer window. With a prefix argument, it
1310 displays in the minibuffer window the basic statistics only, leaving the
1311 contents of the viewer window intact.
1312
1313 @node Class Info, Adding and Deleting Classes, Statistics, Usage
1314 @section Language-Specific Class Information
1315
1316 @kindex i
1317 @findex br-entry-info
1318 @cindex entry attributes
1319 @cindex parents
1320 @cindex attributes
1321 @cindex routine calls
1322 @cindex Eiffel, info
1323 Presently, this feature is available only for Eiffel browsing.
1324
1325 With point on a class name in a listing buffer, the command,
1326 @{@kbd{i}@} @code{(br-entry-info)}, displays the class' parents,
1327 attributes and routines with routine call summaries. This is its
1328 default behavior.
1329
1330 @cindex Eiffel, short
1331 @cindex Eiffel, flat
1332 @{@kbd{M-x eif-info-use-short}@} will instead cause the
1333 @code{(br-entry-info)} command to run the Eiffel 'short' command on a
1334 class, thereby displaying its specification.
1335 @{@kbd{M-x eif-info-use-flat}@}, will cause the command to run
1336 the Eiffel 'flat' command on a class, thereby displaying its complete
1337 feature set. Use @{@kbd{M-x eif-info-use-calls}@} to reset this command
1338 to its default behavior.
1339
1340
1341 @node Adding and Deleting Classes, Completing Names, Class Info, Usage
1342 @section Adding and Deleting Classes
1343
1344 @kindex C-c ^
1345 @findex br-add-class-file
1346 @cindex class, adding to Environment
1347 @cindex class, replacing in Environment
1348 @cindex Environment, adding classes
1349 @cindex Environment, replacing classes
1350 @cindex initialization file
1351 A file containing class definitions may be added to the Environment with
1352 the @{@kbd{C-c ^}@} @code{(br-add-class-file)} command. This will
1353 prompt for the file name, scan the file, and then update the
1354 Environment. If a class defined in the file is already in the
1355 Environment, its information will be replaced with the information
1356 gathered from the file; otherwise, the class will be added to the
1357 Environment. This command does not update the browser display; one
1358 must issue a browser command after the add command in order to see any
1359 change.
1360
1361 @cindex Environment, adding individual classes
1362 To add a single class from a file containing multiple classes, read the
1363 file into an Emacs buffer, narrow the buffer to the desired class and
1364 then execute the add command. @xref{Narrowing,,Narrowing, emacs, The
1365 Gnu Emacs Manual}.@refill
1366
1367 @{@kbd{C-c ^}@} is normally globally bound in the OO-Browser
1368 initialization file, @file{br-init.el}, so that it may be used outside
1369 of the browser when editing classes.
1370
1371 @kindex C-c C-d
1372 @findex br-delete
1373 @cindex class, deleting from Environment
1374 @cindex Environment, deleting classes
1375 To delete a class from the Environment, display the class name in a
1376 listing window using the @{@kbd{m}@} @code{(br-match)} command if
1377 necessary. (@xref{Locating Entries}.) Move point to the desired class
1378 name and hit @{@kbd{C-c C-d}@} @code{(br-delete)} to delete the class.
1379 This will remove the class name at point after the class is deleted from
1380 the Environment.@refill
1381
1382
1383 @node Completing Names, Graphical Browsing, Adding and Deleting Classes, Usage
1384 @section Completing Names
1385
1386 Whenever the browser prompts for a name and an Environment has already
1387 been loaded or built, one may use the browser's identifier name
1388 completion facilities to help in entering the name. These features
1389 allow you to type as much of the name as you know and then have the
1390 browser fill in what it can. The relevant keys are:
1391
1392 @table @key
1393 @item @{TAB@}
1394 complete as much as possible of a class or element name
1395 @item @{SPC@}
1396 complete up to one word of the class or element name
1397 @item @{@kbd{?}@}
1398 show all possible completions for class or element name
1399 @end table
1400
1401 You may also use the browser's completion facilities outside of the browser,
1402 for example, when editing code. @xref{Standalone, ,Using Standalone
1403 OO-Browser Features}, and the description of
1404 @code{(br-complete-type)}.@refill
1405
1406 @node Graphical Browsing, , Completing Names, Usage
1407 @section Graphical OO-Browser Interfaces
1408
1409 @cindex xoobr
1410 @cindex NEXTSTEP OO-Browser
1411 @cindex graphical browsing
1412 The X interface to the OO-Browser is called, @dfn{xoobr}. It provides a
1413 simple but effective means of navigating through OO-Browser hierarchy
1414 and element relations. (The NEXTSTEP OO-Browser is very similar to the
1415 X version, so use the documentation herein if you need any help with it.)
1416
1417 Any number of xoobr sessions may be established at the same time. Each
1418 one is used to gain a particular view on an Environment. The textual
1419 OO-Browser is used to filter a set of classes for display in an xoobr
1420 process. For this reason, xoobr is invoked from within the textual
1421 OO-Browser.
1422
1423 @page
1424 @cindex X OO-Browser picture
1425 @cindex xoobr picture
1426 @iftex
1427 Here is a picture of the X OO-Browser.
1428 @sp 2
1429 @centerline{@psfig{figure=im/oobr-x.ps}}
1430 @end iftex
1431 @ifinfo
1432 If running under the X window system, Action Key click on the following
1433 filename to view a picture of the X OO-Browser: "im/oobr-x.xwd".
1434 @end ifinfo
1435
1436 @kindex M-g
1437 @findex br-tree-graph
1438 @cindex xoobr, graphical view
1439 @{@kbd{M-g}@} @code{(br-tree-graph)} displays the current listing
1440 buffer's entries in a graphical form. It ignores the show
1441 features setting so that you can capture the current listing without
1442 the need to alter that setting.
1443
1444 @kindex M-d
1445 @findex br-tree
1446 @cindex xoobr, descendants
1447 @{@kbd{M-d}@} @code{(br-tree)} selects the current class and displays
1448 its descendancy graph in tree-form by starting a new xoobr session.
1449 With a prefix argument, @{@kbd{C-u M-d}@}, displays descendancy trees
1450 for all classes at the current browser level. They are all grouped
1451 under some imaginary joining node so as to maintain the concept of one
1452 tree per xoobr view.
1453
1454 @kindex M-f
1455 @findex br-tree-features-toggle
1456 @cindex xoobr, displaying features
1457 @cindex descendancy view
1458 @{@kbd{M-f}@} @code{(br-tree-features-toggle)} is used before creating a
1459 graphical descendency view to determine whether or not to include the
1460 features of each class in the listing as child nodes of the class.
1461 It toggles between showing features and not showing them in descendancy
1462 views. The setting applies across all OO-Browser languages. The
1463 default setting is to not add features to the view.
1464
1465 @cindex xoobr, view
1466 Xoobr views are meant to complement the textual browser interface.
1467 Therefore, the two most common actions used in the text browser are
1468 performed in a similar manner within an xoobr view. A click on a node with
1469 the left mouse button highlights the node and then displays the appropriate
1470 class text in the chosen editor, ready for editing. A click of the
1471 middle button performs similarly but displays the associated class for
1472 viewing only.
1473
1474 @cindex xoobr, node menu
1475 [The right mouse button is disable in this release of the X OO-Browser
1476 because of an inability to debug a problem in limiting its use to tree
1477 nodes.] The right mouse button when depressed over a node displays a
1478 short menu of commands that may be applied to the node. The only ones
1479 of real interest at this point are the collapse and expand entries which
1480 let you hide and then restore the display of a node's subtree. This
1481 allows you precise control over the amount of detail you receive in
1482 various parts of the hierarchy.
1483
1484 @cindex xoobr, help
1485 The Help button in the upper right of the an xoobr session window when
1486 selected displays a few pages of help text regarding the program itself.
1487
1488 @kindex M-k
1489 @findex br-tree-kill
1490 @cindex xoobr, terminating
1491 @cindex xoobr, killing
1492 The @{@kbd{M-k}@} @code{(br-tree-kill)} command will prompt to see if
1493 you want to terminate all xoobr sessions started from within the current
1494 editor session. If you answer affirmatively, all such processes
1495 disappear, as your screen will quickly indicate.
1496
1497 @cindex xoobr, quitting
1498 @kindex C-u q
1499 @findex br-quit
1500 The upper left of a session window contains a set of buttons which
1501 display menus. The only menu entry you need be concerned with at all is
1502 found under the file menu, labelled "Quit". xoobr processes may also be
1503 terminated by issuing the kill command mentioned just before. A third
1504 menas of killing such processes is by sending the permanent
1505 @code{(br-quit)} command, @{@kbd{C-u q}@}, to the textual browser. You
1506 will then be prompted as to whether you want to terminate all xoobr
1507 sessions started from within the current editor session.
1508
1509 @node Options, Customization, Usage, Top
1510 @chapter OO-Browser Options
1511
1512 @menu
1513 * External Viewing:: Using An External Viewer or Editor
1514 * Keep Viewed Classes::
1515 * Inhibit Version:: Inhibit Version Screen
1516 * Invert Ancestors:: Invert Ancestor Trees
1517 * Save All:: Save All Lookup Tables
1518 * Use Children:: Build Children Lookup Table
1519 * Sort Options:: Controlling Class Listing Order
1520 @end menu
1521
1522 @node External Viewing, Keep Viewed Classes, Options, Options
1523 @comment node-name, next, previous, up
1524 @section Using an External Viewer or Editor
1525
1526 @cindex editing, externally
1527 @cindex viewing, externally
1528 The OO-Browser allows you to select your desired editor and viewer
1529 programs when you use a multi-windowed display. By default, both of
1530 these tasks are handled by Emacs so that the browser works on text
1531 terminals. If you choose an external editor or viewer, Emacs will still
1532 automatically be used whenever you invoke the browser from a text
1533 terminal.
1534
1535 @vindex br-editor-cmd
1536 @cindex vi
1537 If you wish to edit classes displayed by the browser in an editor other
1538 than Emacs, set the @var{br-editor-cmd} variable to the command with
1539 which you wish to edit. Arguments to the command should be placed in
1540 the variables named @var{br-ed[1-9]}, with one string argument per
1541 variable. Unused variables should have the value @code{nil}. Bear in
1542 mind that the command must generate a new window under your window
1543 system. For example, the vi editor under UNIX does not create its own
1544 window, it runs within the window in which it is created. Under X one
1545 would create a new xterm window and then invoke vi. The command line
1546 would be @emph{xterm -e vi}, the settings in your personal
1547 initialization file would then be:
1548
1549 @display
1550 @code{
1551 (setq br-editor-cmd "xterm" br-ed1 "-e" br-ed2 "vi"
1552 br-ed3 nil br-ed4 nil br-ed5 nil
1553 br-ed6 nil br-ed7 nil br-ed8 nil br-ed9 nil)}
1554 @end display
1555
1556 @vindex window-system
1557 This editor will only be used when the browser is run under a window
1558 system external to Emacs, like X. (In such a case, the Emacs variable
1559 @var{window-system} will be non-nil).
1560
1561 @vindex br-viewer-cmd
1562 @cindex xmore
1563 If you want to view classes in a read-only fashion outside of Emacs, set the
1564 following @var{br-viewer-cmd} and @var{br-vw[1-9]} variables in a similar
1565 manner as you did for the editor variables above.
1566
1567 For example, to use @file{xmore}, an X-compatible version of @file{more}, as
1568 your viewer, use the following settings (assuming all the @var{br-vw}
1569 variables are already null):
1570
1571 @display
1572 @code{(setq br-viewer-cmd "xmore")}
1573 @end display
1574
1575
1576 @node Keep Viewed Classes, Inhibit Version, External Viewing, Options
1577 @comment node-name, next, previous, up
1578 @section Keep Viewed Classes
1579
1580 @vindex br-keep-viewed-classes
1581 The @var{br-keep-viewed-classes} flag is turned off by default,
1582 indicating that each time a class is viewed immediately after another
1583 one, the prior one is deleted. If it is set to any non-nil value, all
1584 viewed classes are left around for selection.
1585
1586 In typical use, the burden of having to manage all viewed classes is
1587 greater than the benefit of leaving them in memory. This is why the
1588 flag is off by default. The class buffer menu can be used to delete
1589 buffers when you want to trim down the number with which you are dealing.
1590 @xref{Using the Mouse}, for details on this technique.
1591
1592 @findex br-toggle-keep-viewed
1593 @vindex br-keep-viewed-classes
1594 The value of the @var{br-keep-viewed-classes} flag may be easily
1595 toggled with the @code{(br-toggle-keep-viewed)} command bound to
1596 @{@kbd{V}@}.
1597
1598
1599 @node Inhibit Version, Invert Ancestors, Keep Viewed Classes, Options
1600 @section Inhibit Version Screen
1601
1602 @vindex br-inhibit-version
1603 After you are familiar with the opening OO-Browser version screen, you may
1604 want to disable its display each time the browser is started. This is done by
1605 setting @var{br-inhibit-version} non-nil, as in the following line that
1606 would go in your personal OO-Browser initialization file:
1607
1608 @example
1609 @code{(setq br-inhibit-version t)}
1610 @end example
1611
1612 @kindex C-c #
1613 @findex br-version
1614 @cindex version, browser
1615 @cindex support
1616 @noindent
1617 This option has no effect on the display of the help screen which
1618 follows the version screen. Even with this option set, you may display
1619 the version screen at any time from within a browser listing
1620 window by using @{@kbd{C-c #}@} @code{(br-version)}.
1621
1622
1623 @node Invert Ancestors, Save All, Inhibit Version, Options
1624 @section Invert Ancestor Trees
1625
1626 @xref{Descendants and Ancestors,,Browsing Descendants and Ancestors},
1627 for more information.@refill
1628
1629 This is a global OO-Browser option, it affects all Environments.
1630
1631 Ancestor trees are normally shown to emphasize how the trees branch out
1632 from their origin. An initialization file line such as:
1633
1634 @example
1635 @code{(setq br-invert-ancestors t)}
1636 @end example
1637
1638 @noindent
1639 will cause the display of ancestor trees to be inverted such that the further
1640 ancestors appear as roots of the trees and parents (the nearest ancestors)
1641 appear as leaves in the trees. This ensures that all listing displays
1642 reflect the class inheritance structure with children below parents.
1643
1644
1645 @node Save All, Use Children, Invert Ancestors, Options
1646 @section Save All Lookup Tables
1647
1648 This is an Environment-specific option set during Environment
1649 specification. @xref{Creating Environments}.@refill
1650
1651 Half of the browser lookup tables can be built whenever an Environment
1652 is loaded. If this option is set, these tables will be stored in the
1653 Environment file instead. This will speed Environment loading somewhat,
1654 at the cost of doubling the file size per saved Environment.
1655
1656 @node Use Children, Sort Options, Save All, Options
1657 @section Build Children Lookup Table
1658
1659 This is an Environment-specific option set during Environment
1660 specification. @xref{Creating Environments}.@refill
1661
1662 This is a highly recommended option that allows for fast descendant
1663 lookups. The only time one would turn off this option would be when a
1664 file system is extremely short of space.
1665
1666 @node Sort Options, , Use Children, Options
1667 @section Controlling Class Listing Order
1668
1669 @vindex br-sort-options
1670 @cindex listing order
1671 @cindex sorting options
1672 @cindex listing options
1673 The OO-Browser normally orders classes and elements in listing windows
1674 according to the ASCII character set. This sort order is controlled by the
1675 @var{br-sort-options} variable which specifies the command line options
1676 sent to the system @code{sort} command. (Under any Emacs 19 variant,
1677 this variable is not used by the @code{br-order} command, bound to
1678 @{@kbd{o}@}.)
1679
1680 The value of this variable should be a single string of options such as
1681 @code{-fu} (the default) or @code{nil} for no options. The @code{-f}
1682 option folds upper and lower case to the same character for sort
1683 comparisons. The @code{-u} option leaves only unique elements in the
1684 listing by eliminating any duplicate entries.
1685
1686 @node Customization, Standalone, Options, Top
1687 @chapter Personal Customization
1688
1689 @vindex br-skip-dir-regexps
1690 @cindex scanning, skip directories
1691 @cindex directory scanning
1692 The @var{br-skip-dir-regexps} variable is a list of regular expressions
1693 which match directory names that the OO-Browser will not descend when
1694 scanning source code trees.
1695
1696 @vindex br-file-dir-regexp
1697 The @var{br-file-dir-regexp} variable specifies a regular expression
1698 that matches to file and directory names that the OO-Browser should
1699 scan. Any others, including those matched by @var{br-skip-dir-regexps},
1700 are ignored.
1701
1702 @cindex initialization file
1703 @cindex personal initialization
1704 @vindex file, .br-init.el
1705 The following hook variables are provided so that one may customize what
1706 happens each time the OO-Browser is invoked. Set them as you would any
1707 other Emacs Lisp hook variables in a personal OO-Browser initialization
1708 file, @file{~/.br-init.el}. They all default to null operations.
1709
1710 @vindex br-mode-hook
1711 If you want a set of actions to occur each time after the OO-Browser is
1712 invoked, attach them to @var{br-mode-hook}. For language-specific
1713 actions, a language-specific hook such as @var{br-eif-mode-hook},
1714 or @var{br-c++-mode-hook} is run after @var{br-mode-hook}.
1715
1716 @vindex br-class-list-hook
1717 If you want a set of actions to occur after each time that a new browser
1718 listing buffer is created, set @var{br-class-list-hook}.
1719
1720
1721 @node Standalone, Languages, Customization, Top
1722 @chapter Using Standalone OO-Browser Features
1723
1724 A number of browser features may be used independently of the browser
1725 user interface, assuming that a site-wide or personal OO-Browser
1726 initialization file has been loaded into your current Emacs session.
1727
1728 @kindex C-c C-o
1729 First, an Environment must be selected and loaded into the OO-Browser
1730 via @{@kbd{C-c C-o}@}. When the browser user interface is displayed,
1731 use @{@kbd{q}@} to quit.
1732
1733 @findex br-env-load
1734 Alternatively, you can load an Environment without invoking the browser
1735 user interface by using @{@kbd{M-x br-env-load @key{RET}}@}. The
1736 standalone browser features will use the newly loaded Environment.
1737
1738 @noindent
1739 The commands that are available for standalone use include:
1740 @table @code
1741 @findex br-add-class-file
1742 @item br-add-class-file
1743 Add a file of classes to the current Environment. @xref{Adding and
1744 Deleting Classes}.@refill
1745
1746 @item br-find
1747 @findex br-find
1748 Interactively complete class or ELEMENT name and jump to its definition.
1749
1750 @findex br-find-class
1751 @item br-find-class
1752 Display file of class text matching CLASS-NAME in VIEW-ONLY mode if non-nil.
1753
1754 @findex br-complete-type
1755 @item br-complete-type
1756 Perform in-buffer completion of a type or element identifier before point.
1757
1758 @findex br-class-path
1759 @item br-class-path
1760 Return full path, if any, to CLASS-NAME.
1761 With optional prefix argument INSERT non-nil, insert path at point.
1762 @end table
1763
1764 All of these commands provide full completion. @xref{Completing Names},
1765 based upon the current OO-Browser Environment.@refill
1766
1767 @findex br-find
1768 @cindex finding an element
1769 @cindex searching for an element
1770 When editing and debugging code, one often wants to look at a class or
1771 element definition without having to invoke the browser to locate it.
1772 The @code{(br-find)} command does exactly that by prompting for a name
1773 and then displaying for editing the class or element definition given by
1774 that name.
1775
1776 @findex br-find-class
1777 @cindex finding a class
1778 @cindex searching for a class
1779 The @code{(br-find-class)} command is similar. It prompts for a class name
1780 and then displays its source file in a viewable, read-only mode. To
1781 display a class file in an editable mode, send a prefix argument to this
1782 command.
1783
1784 @findex br-complete-type
1785 When writing code and entering class attribute definitions (variable
1786 definitions), one often has to repetitively enter class names as the
1787 static types for the attributes. The @code{(br-complete-type)} command
1788 completes and inserts a class name at point in the current buffer.
1789 The traditional key to bind such a command to is @{@kbd{M-@key{TAB}}@}.
1790 The following example illustrates its usage.
1791 @display
1792 my_list: LIN<-- (point is here)
1793
1794 @{@kbd{M-@key{TAB}}@} is hit:
1795
1796 my_list: LINKED_LIST
1797 @end display
1798
1799 @findex br-class-path
1800 The @code{(br-class-path)} command prompts for a class name and
1801 displays the full path of the associated class source file in the
1802 minibuffer. With a prefix argument, it inserts the path name at point
1803 in the current buffer.
1804
1805 The following key bindings are recommended when using these standalone
1806 features:
1807
1808 @kindex C-M-i
1809 @kindex M-TAB
1810 @kindex C-c C-f
1811 @kindex C-c C-w
1812 @example
1813 @code{(define-key eiffel-mode-map "\C-c\C-f" 'br-find)}
1814 @code{(define-key c++-mode-map "\C-c\C-f" 'br-find)}
1815 @code{(define-key lisp-mode-map "\C-c\C-f" 'br-find)}
1816 @code{(define-key objc-mode-map "\C-c\C-f" 'br-find)}
1817 @code{(define-key smalltalk-mode-map "\C-c\C-f" 'br-find)}
1818
1819 ;; @{@kbd{C-M-i}@} means @{@kbd{M-@key{TAB}}@}.
1820 @code{(define-key eiffel-mode-map "\C-\M-i" 'br-complete-type)}
1821 @code{(define-key c++-mode-map "\C-\M-i" 'br-complete-type)}
1822 @code{(define-key lisp-mode-map "\C-\M-i" 'br-complete-type)}
1823 @code{(define-key objc-mode-map "\C-\M-i" 'br-complete-type)}
1824 @code{(define-key smalltalk-mode-map "\C-\M-i" 'br-complete-type)}
1825
1826 @code{(define-key eiffel-mode-map "\C-c\C-w" 'br-class-path)}
1827 @code{(define-key c++-mode-map "\C-c\C-w" 'br-class-path)}
1828 @code{(define-key lisp-mode-map "\C-c\C-w" 'br-class-path)}
1829 @code{(define-key objc-mode-map "\C-c\C-w" 'br-class-path)}
1830 @code{(define-key smalltalk-mode-map "\C-c\C-w" 'br-class-path)}.
1831 @end example
1832
1833 @xref{Eiffel Specifics}, for an Eiffel-specific standalone browser
1834 feature.@refill
1835
1836 @node Languages, Features, Standalone, Top
1837 @chapter Language-Specific Notes
1838
1839 @menu
1840 * C Specifics::
1841 * C++ Specifics::
1842 * CLOS Specifics::
1843 * Eiffel Specifics::
1844 * Java Specifics::
1845 * Objective-C Specifics::
1846 * Python Specifics::
1847 @end menu
1848
1849 @node C Specifics, C++ Specifics, Languages, Languages
1850 @section C Specifics
1851
1852 @vindex br-c-tags-flag
1853 @findex br-toggle-c-tags
1854 The @var{br-c-tags-flag} variable controls whether or not C constructs
1855 are included within C and C-based language Environments. By default,
1856 this flag is true. Use @code{M-x br-toggle-c-tags RET} to toggle its
1857 value. If you set it false before building an Environment, then C
1858 constructs will not be included in the Environment. (Note that C
1859 functions are always included in C++ Environments, regardless of this
1860 flag value.)
1861
1862 If you wish to build an Environment whose source code is entirely C,
1863 ensure that the @var{br-c-tags-flag} is enabled and then select C++ when
1864 asked for the language to browse. In the future, a language setting for
1865 C will probably be added.
1866
1867 C constructs are grouped into default classes for browsing. The
1868 elements of each default class are the instances of the associated
1869 construct within the Environment. Use normal element/feature commands
1870 to browse each instance.
1871
1872 @example
1873 DEFAULT CLASS C CONSTRUCT
1874 --------------------------------------
1875 [constant] #define constant
1876 [enumeration] enum @{@}
1877 [function] non-member function()
1878 [macro] #define macro()
1879 [structure] struct @{@}
1880 [type] typedef @{@}
1881 [union] union @{@}
1882 @end example
1883
1884 @node C++ Specifics, CLOS Specifics, C Specifics, Languages
1885 @section C++ Specifics
1886
1887 @xref{C Specifics}, for details on C-specific support within C++
1888 Environments.
1889
1890 @menu
1891 * C++ Element Selection:: Source Code Element Selection
1892 * C++ Settings::
1893 @end menu
1894
1895 @node C++ Element Selection, C++ Settings, C++ Specifics, C++ Specifics
1896 @subsection Source Code Element Selection
1897
1898 @cindex C++ feature listings
1899 @cindex pure virtual function
1900 @cindex function, pure virtual
1901 @cindex deferred function
1902 C++ pure virtual function declarations, which specify method interfaces
1903 but no implementation, appear in class feature listings. The function
1904 name is preceded by the @code{"> "} string to identify the function as a
1905 pure virtual (deferred) function. Pure virtuals may be treated like any
1906 other member functions within the browser. Since there is no definition
1907 for such a function within the class in which it is listed, its
1908 declaration will be shown instead, when requested.
1909
1910 @cindex friend
1911 @cindex function, friend
1912 @cindex class, friend
1913 @findex br-view-friend
1914 @kindex V
1915 Friend functions and friend classes give members of another class
1916 access to the private parts of the current class. They appear
1917 in class feature listings preceded by the @code{"% "} string.
1918 The keys, @{@kbd{v}@} or @{@kbd{e}@}, display the friend declaration
1919 within the current class. Use @{@kbd{V}@}, @code{(br-view-friend)} to
1920 view the definition of the friend class or function.
1921
1922 @cindex constructor
1923 @cindex destructor
1924 @cindex operator new
1925 @cindex operator delete
1926 Methods and operators associated with creating and destroying objects
1927 are preceded by the @code{"+ "} string in listing buffers. All other
1928 method listing entries are preceded by the @code{"- "} string.
1929
1930 @cindex C++
1931 One can jump from a C++ declaration to its definition by clicking the
1932 Action Key when within the declaration. Most importantly, once a class
1933 header file is displayed, simply click on a method declaration to see
1934 its corresponding definition. Each feature declaration should be
1935 terminated with a semicolon to ensure accurate scanning. If the method
1936 is inherited from another class, a message at the bottom of the frame
1937 will describe which class the method is defined in once the browser
1938 displays the method definition.
1939
1940 Parent classes may be browsed in a similar manner by clicking on their
1941 names in an inheritance or declaration clause. It is therefore
1942 important to click on the method name part of a declaration when that is
1943 the element desired.
1944
1945 @vindex c++-include-dirs
1946 @cindex #include
1947 @cindex include files
1948 Include files may be browsed by selecting their inclusion declarations
1949 (#include ...) within a source file. Include files delimited by double
1950 quotes are searched for in the following places: first, the directory of
1951 the current source file, then the directories listed in the variable
1952 @var{c++-include-dirs}, and then in any directories included in the
1953 current environment.
1954
1955 @vindex c++-cpp-include-dirs
1956 Include files delimited by angle brackets are searched for in the
1957 following places: first, the directories listed in the variable
1958 @var{c++-include-dirs}, then the directories listed in the variable
1959 @var{c++-cpp-include-dirs}, and then in any directories included in the
1960 current environment. The variable @var{c++-cpp-include-dirs} should
1961 hold a list of the standard directories searched by your C++ pre-processor.
1962 Each directory entry must end with a directory separator. On UNIX
1963 systems, this is the '/' character.
1964
1965 @node C++ Settings, , C++ Element Selection, C++ Specifics
1966 @subsection C++ Settings
1967 @vindex c++-class-keyword
1968 @cindex class definition keywords
1969 By default, @code{class}, @code{struct} and @code{union} definitions all
1970 constitute class definitions to the C++ OO-Browser. If you prefer some
1971 other criteria, you will need to modify the definition of
1972 @var{c++-class-keyword} in @file{br-c++.el}.
1973
1974 @vindex c++-src-file-regexp
1975 @cindex file suffixes
1976 If you find that the browser is not scanning some of your C++ source
1977 files, you may be using file suffixes which it does not recognize.
1978 Examine the value of @var{c++-src-file-regexp} and add any special file
1979 suffixes you use to it.@refill
1980
1981 @node CLOS Specifics, Eiffel Specifics, C++ Specifics, Languages
1982 @section CLOS Specifics
1983
1984 @menu
1985 * CLOS Method Handling:: Method Handling
1986 * CLOS Settings::
1987 @end menu
1988
1989 @node CLOS Method Handling, CLOS Settings, CLOS Specifics, CLOS Specifics
1990 @subsection Method Handling
1991 @cindex CLOS methods
1992 @cindex CLOS types
1993 @cindex specialized parameters
1994 @cindex methods, specialized parameters
1995 In CLOS, methods may have typed parameters of the form,
1996 @code{(<parameter-name> <class>)}; these are called @dfn{specialized
1997 parameters}. Each such parameter defines the method within
1998 @code{<class>}. Thus, a single method definition can generate methods
1999 associated with many classes. The OO-Browser lets you navigate to a
2000 method definition from any of the classes for which it is defined, since
2001 a method is included as an element of each of its constituent classes.
2002
2003 CLOS permits compile-time computation of the @code{<class>} of a
2004 specialized parameter, through use of the expression, @code{(eql
2005 <form>)}. Since the OO-Browser cannot perform this computation, it
2006 treats such a parameter as non-specialized.
2007
2008 @cindex CLOS, the class t
2009 Methods may also contain non-specialized parameters of the form,
2010 @code{<parameter-name>}. The type of each such parameter defaults to
2011 the default root class @code{t} in CLOS. But a method is only included
2012 in the class @code{t} by the OO-Browser if none of its parameters are
2013 specialized. Otherwise, methods with more specific types which happened
2014 to include one or more non-specialized parameters would appear to not
2015 have a more specific type than @code{t}.
2016
2017 @node CLOS Settings, , CLOS Method Handling, CLOS Specifics
2018 @subsection CLOS Settings
2019 The OO-Browser automatically works with CLOS class and method
2020 definitions. But Lisp contains many other standard object types such as
2021 functions, macros and variables which you may wish to browse. These are
2022 handled through a configuration variable as explained below.
2023
2024 @vindex clos-element-type-alist
2025 @cindex default class
2026 @cindex element type
2027 The @var{clos-element-type-alist} variable determines the Lisp definition
2028 constructs that the browser looks for and the associated default class
2029 under which instances of each construct type are grouped. Each element
2030 in the association list is a cons cell whose first part is the function
2031 name string that defines an instance of a particular type,
2032 e.g@. @code{"defun"}.
2033
2034 The second part is a default class name, a string, under which to assign
2035 each instance of the type, e.g@. @code{"function"}. The OO-Browser
2036 always displays default class names with square brackets around them,
2037 e.g@. @code{[function]}, to distinguish them from classes defined within
2038 the Environment.
2039
2040 @noindent
2041 Here is the default @var{clos-element-type-alist} setting:
2042
2043 @example
2044 '(("defconstant" . "constant")
2045 ("defconst" . "constant")
2046 ("defun" . "function")
2047 ("defgeneric" . "generic")
2048 ("defmacro" . "macro")
2049 ("defpackage" . "package")
2050 ("defparameter" . "parameter")
2051 ("defsetf" . "setfunction")
2052 ("defstruct" . "structure")
2053 ("deftype" . "type")
2054 ("defvar" . "variable")
2055 ("fset" . "function"))
2056 @end example
2057
2058 @vindex clos-def-form-with-args-regexp
2059 The @var{clos-def-form-with-args-regexp} is a regular expression which
2060 includes a subset of the definition symbol names from
2061 @var{clos-element-type-alist}, namely those which require an argument
2062 list to uniquely distinguish them from other elements, e.g@. functions.
2063
2064
2065 @node Eiffel Specifics, Java Specifics, CLOS Specifics, Languages
2066 @section Eiffel Specifics
2067
2068 Eiffel support has now been updated to Eiffel version 3, to the best
2069 of our knowledge. If you find any problems, please report them
2070 to <oo-browser@@hub.ucsb.edu> (this is a public mailing list).
2071
2072 @menu
2073 * Eiffel Listings::
2074 * Eiffel Element Selection:: Source Code Element Selection
2075 * Eiffel Settings::
2076 @end menu
2077
2078 @node Eiffel Listings, Eiffel Element Selection, Eiffel Specifics, Eiffel Specifics
2079 @subsection Eiffel Listings
2080
2081 Eiffel entities are categorized when shown within OO-Browser listing
2082 buffers. Classes are shown by name, without any prefix. Features
2083 are shown by name but are preceded by a special character that indicates
2084 the kind of feature. The following table describes each prefix.
2085
2086 @table @code
2087 @item -
2088 precedes regular routines;
2089 @item =
2090 precedes attributes;
2091 @item 1
2092 precedes once routines, which create shared objects;
2093 @item >
2094 precedes deferred features, which are specified but not defined within
2095 this class;
2096 @item /
2097 precedes external features, which are defined in a non-Eiffel language.
2098 @end table
2099
2100 @node Eiffel Element Selection, Eiffel Settings, Eiffel Listings, Eiffel Specifics
2101 @subsection Source Code Element Selection
2102 @cindex Eiffel
2103 One can jump from an Eiffel element reference to its definition by
2104 clicking the Action Key when within the reference. Selection of a
2105 feature name in an export clause displays the feature definition, even
2106 if it is renamed several times within ancestors. Parent classes may be
2107 browsed in a similar manner by clicking on their names in an inheritance
2108 or declaration clause.
2109
2110 The following example of locating a renamed feature is taken from an
2111 actual set of Eiffel library classes:
2112
2113 @example
2114 User selects feature @code{subwindow} of @code{POPUP_MENU}
2115 inherited from @code{WINDOW} which renames @code{child} as @code{subwindow}
2116 inherited from @code{TWO_WAY_TREE} which renames @code{active} as @code{child}
2117 inherited from @code{TWO_WAY_LIST}
2118 inherited from @code{LINKED_LIST} which defines @code{active}.
2119 @end example
2120
2121 The browser would display the feature @code{active} and explain to the
2122 user that feature @code{subwindow} of class @code{POPUP_MENU} is
2123 inherited from feature @code{active} of class @code{LINKED_LIST}.
2124 Location of this sort of feature definition would be incredibly tedious
2125 without programmatic support.
2126
2127 The algorithm used to locate features is dynamic, so if another class
2128 were inserted into the inheritance structure given above, the feature
2129 definition would still be located properly.
2130
2131 @node Eiffel Settings, , Eiffel Element Selection, Eiffel Specifics
2132 @subsection Eiffel Settings
2133
2134 @findex eif-get-parents-from-source
2135 Be sure that the 'inherit' and 'feature' clauses in your classes begin in
2136 column 0; otherwise the browser parser will not work properly. If you prefer
2137 some other indentation style, you will need to slightly alter
2138 @code{(eif-get-parents-from-source)} in @file{br-eif.el}; specifically,
2139 the lines that contain '^inherit' and '^feature'.
2140
2141 @cindex Eiffel, error parsing
2142 @cindex error parsing
2143 Emacs has a feature called error parsing which lets one quickly jump to
2144 the line of code that supposedly triggered an error.
2145 (@xref{Compilation, ,Compilation Errors, emacs, The Gnu Emacs Manual},
2146 for information on error parsing.) Some object-oriented language
2147 compilers display the name of the class and line number with each error
2148 message but do not include the filename containing the class source
2149 code. Emacs then has no way of parsing the error message. The browser
2150 class location facilities enable one to perform error parsing across any
2151 set of classes in a single Environment, given only this type of
2152 message. Interactive Software Engineering's Eiffel compiler is an
2153 example of a compiler that produces this type of error. The code for
2154 parsing these Eiffel error messages is included in
2155 @file{eif-ise-err.el}.@refill
2156
2157 @node Java Specifics, Objective-C Specifics, Eiffel Specifics, Languages
2158 @section Java Specifics
2159
2160 @cindex Java feature listings
2161 @cindex abstract method
2162 @cindex method, abstract
2163 @cindex deferred function
2164 Java abstract method declarations, which specify method interfaces
2165 but no implementation, appear in class feature listings. The method
2166 name is preceded by the @code{"> "} string to identify the method as an
2167 abstract (deferred) method. Abstract methods may be treated like any
2168 other methods within the browser. Since there is no definition
2169 for such a method within the class in which it is listed, its
2170 declaration will be shown instead, when requested.
2171
2172 @cindex native method
2173 @cindex method, native
2174 Native methods are like abstract methods in that only their interfaces
2175 are specified in Java. Unlike abstract methods, their method bodies are
2176 defined in external languages such as C to allow for machine-specific
2177 dependencies. Native methods are listed in the browser prefixed by the
2178 @code{"/ "} string, indicating that they are divided between Java and
2179 another language.
2180
2181 @cindex constructor
2182 @cindex destructor
2183 Methods associated with creating and destroying objects
2184 are preceded by the @code{"+ "} string in listing buffers. All other
2185 method listing entries are preceded by the @code{"- "} string.
2186
2187 @vindex Java-class-keyword
2188 @cindex class definition keywords
2189 Java interface specifications, which specify protocols to which classes
2190 must conform, are treated just like class definitions in browser
2191 listings. All the methods of such interfaces are abstract, however.
2192
2193 @node Objective-C Specifics, , Java Specifics, Languages
2194 @section Objective-C Specifics
2195
2196 @xref{C Specifics}, for details on C-specific support within Objective-C
2197 Environments.
2198
2199 The OO-Browser supports browsing Objective-C classes, methods,
2200 categories and formal protocols. Earlier sections of this manual explain
2201 how to browse these entities. This section documents Objective-C
2202 language specifics, including variable settings.
2203
2204 Objective-C entities are categorized when shown within OO-Browser listing
2205 buffers. Classes are shown by name, without any prefix. Methods
2206 are shown by name but are preceded by a special character that indicates
2207 the kind of method. The following table describes each prefix.
2208
2209 @table @code
2210 @item -
2211 precedes instance methods;
2212 @item +
2213 precedes class (factory) methods that affect the factory object for the
2214 class.
2215 @end table
2216
2217 @menu
2218 * Objective-C Categories::
2219 * Objective-C Protocols::
2220 * Objective-C Element Selection:: Source Code Element Selection
2221 * Objective-C Settings::
2222 @end menu
2223
2224 @node Objective-C Categories, Objective-C Protocols, Objective-C Specifics, Objective-C Specifics
2225 @subsection Objective-C Categories
2226 @cindex category
2227 @cindex Objective-C category
2228 An @dfn{Objective-C category} is an internal class grouping that
2229 specifies and implements a set of related class features. The
2230 aggregation of all of the categories defined by a class and its
2231 ancestors represents the complete class definition.
2232
2233 The OO-Browser can list and browse the source for: the categories of a
2234 class, all class categories in an Environment, and the classes which
2235 implement a category. @xref{Browsing Categories}, for details.
2236
2237 @node Objective-C Protocols, Objective-C Element Selection, Objective-C Categories, Objective-C Specifics
2238 @subsection Objective-C Protocols
2239 @cindex protocol
2240 @cindex Objective-C protocol
2241 An @dfn{Objective-C protocol} is an interface specification to which a
2242 class may conform. The protocol includes a set of method signatures
2243 which any conforming class must implement. One protocol may inherit
2244 from a list of other protocols, and thus expand the set of methods which
2245 a conforming class must implement. The OO-Browser can list and browse
2246 the source for: the protocols to which a class conforms, all protocols
2247 in an Environment, and the implementors of a protocol. @xref{Browsing
2248 Protocols}, for details.
2249
2250 @node Objective-C Element Selection, Objective-C Settings, Objective-C Protocols, Objective-C Specifics
2251 @subsection Source Code Element Selection
2252 @cindex Objective-C
2253 One can jump from an Objective-C declaration to its definition by
2254 clicking the Action Key when within the declaration. Most importantly,
2255 once a class header file is displayed, simply click on a method
2256 declaration to see its corresponding definition. If the method is
2257 inherited from another class, a message at the bottom of the frame will
2258 describe which class the method is defined in once the browser displays
2259 the method definition.
2260
2261 Parent classes may be browsed in a similar manner by clicking on their
2262 names in an inheritance or declaration clause. It is therefore
2263 important to click on the method name part of a declaration when that is
2264 the element desired.
2265
2266 @vindex objc-include-dirs
2267 @cindex #import
2268 @cindex include files
2269 Include files may be browsed by selecting their inclusion declarations
2270 (#import ...) within a source file. Include files delimited by double
2271 quotes are searched for in the following places: first, the directory of
2272 the current source file, then the directories listed in the variable
2273 @var{objc-include-dirs}, and then in any directories included in the
2274 current environment.
2275
2276 @vindex objc-cpp-include-dirs
2277 Include files delimited by angle brackets are searched for in the
2278 following places: first, the directories listed in the variable
2279 @var{objc-include-dirs}, then the directories listed in the variable
2280 @var{objc-cpp-include-dirs}, and then in any directories included in the
2281 current environment. The variable @var{objc-cpp-include-dirs} should
2282 hold a list of the standard directories searched by your Objective-C
2283 pre-processor. Each directory entry must end with a directory
2284 separator. On UNIX systems, this is the '/' character.
2285
2286 @node Objective-C Settings, Python Specifics, Objective-C Element Selection, Objective-C Specifics
2287 @subsection Objective-C Settings
2288 @vindex objc-class-keyword
2289 @cindex class definition keywords
2290 By default, the @code{@@interface} keyword indicates a class definition to the
2291 Objective-C OO-Browser. If you prefer some other criteria, you will need to
2292 modify the definition of @var{objc-class-keyword} in @file{br-objc.el}.
2293
2294 @vindex objc-src-file-regexp
2295 @cindex file suffixes
2296 If you find that the browser is not scanning some of your Objective-C
2297 source files, you may be using file suffixes which it does not
2298 recognize. Examine the value of @var{objc-src-file-regexp} and add any
2299 special file suffixes you use to it.@refill
2300
2301
2302 @node Python Specifics, Python Module Lookup, Objective-C Settings, Languages
2303 @section Python Specifics
2304
2305 The OO-Browser supports browsing Python classes, methods, and
2306 documentation strings for both. The class info key 'i' is used to
2307 display class or method documentation string, if that is available.
2308
2309 Python methods appear in class feature listings. The method
2310 name is preceded by the @code{"- "} string.
2311
2312 Global functions are grouped under the imaginary class @code{[functions]} to
2313 distinguish them from classes or class methods.
2314
2315 Known bugs: nested classes are not recognized. As browsing is based on
2316 analyzing the source code, run-time modifications are lost.
2317
2318 @menu
2319 * Python Module Lookup:: Source Code Element Selection
2320 * Python Settings::
2321 @end menu
2322
2323 @node Python Module Lookup, Python Settings , Python Specifics, Python Specifics
2324 @subsection Python Module Lookup
2325
2326 The @file{br-help-ms} file uses a table format to summarize mouse
2327 control within the browser, it may be displayed within the browser via
2328 the @{@kbd{H}@} @code{(br-help-ms)} command.
2329
2330 Clicking on a module name in an import statement using the Action Key
2331 will open the specified module, if it is found in the search path.
2332
2333 @node Python Settings, , Python Module Lookup, Python Specifics
2334 @subsection Python Settings
2335 @vindex python-import-dirs
2336 @cindex class definition keywords
2337 When a module name in an import statement is clicked using
2338 the Action Key, OO-Browser tries to open the module.py file. By default,
2339 it looks for the module file in the environment directories, and from the path
2340 @code{/usr/local/lib/python}. If you have installed Python libraries
2341 elsewhere, or wish to include other modules in the search path, you will
2342 need to modify the definition of @var{python-import-dirs} in
2343 @file{br-python-ft.el}.
2344
2345 @c ***************************
2346 @c Appendices
2347 @c ***************************
2348
2349
2350 @node Features, Commands, Languages, Top
2351 @c node-name, next, previous, up
2352 @appendix OO-Browser Features
2353
2354 @itemize @bullet
2355
2356 @item
2357 Support for Eiffel, C++, Objective-C, Smalltalk, Java and Common Lisp
2358 and its Object System (CLOS) is included. Additionally, support for
2359 browsing large amounts of material in Info format by node name (a
2360 popular online documentation format with cross references and
2361 hierarchical structure) is include. All languages provide class
2362 browsing via either a textual or a graphical interface.
2363
2364 @item
2365 Method browsing is supported for C++, Objective-C, Eiffel and CLOS.
2366 CLOS supports browsing all elements defined with (def* constructs.
2367 In-source feature browsing is also supported for all of these languages.
2368 One simply selects a feature name to jump to its corresponding source.
2369 Method name overloading in C++ and inherited feature renaming in Eiffel
2370 are fully supported.
2371
2372 @item
2373 C code browsing is supported for C++, Objective-C and C source code.
2374 @item
2375 Objective-C category and formal protocol browsing are supported.
2376
2377 @item
2378 C++ parameterized template classes and methods are supported.
2379
2380 @item
2381 Building Environments is fast compared to many other tools and browser
2382 startup once an Environment has been built is very fast. Response times
2383 on workstations are excellent; for example, in one test case, less than
2384 two real seconds were required to display a set of complex inheritance
2385 graphs involving over 400 classes.
2386
2387 @item
2388 Class inheritance networks may be displayed. Either a single
2389 inheritance level (parents or children) or the entire inheritance
2390 network (ancestors or descendants) for a set of classes may be shown.
2391
2392 @cindex multiple inheritance
2393 @item
2394 Multiple inheritance support is built-in, where applicable.
2395
2396 @item
2397 The user need not know the location of class source; the browser will display
2398 or edit a class source based solely upon its class name.
2399
2400 @item
2401 Immediate switching among languages is allowed. One can switch from Eiffel
2402 browsing to C++ browsing in an instant, if so desired. Or simply run two
2403 browsers side by side.
2404
2405 @item
2406 Class files may be added, replaced or deleted one at a time or as a
2407 group by specifying a root directory below which all class files are
2408 found, including those in subdirectories.
2409
2410 @item
2411 The browser uses class source code only, hence no compiler is necessary for
2412 proper browser operation.
2413
2414 @item
2415 Library (stable) and System (in development) classes may be maintained and
2416 listed separately or together. Any number of Libraries and Systems may be
2417 combined for listing in a single Environment. There are no fixed limits
2418 on the number of classes per Environment nor on the number of
2419 Environments that may be browsed.
2420
2421 @item
2422 The number of listing windows is limited only by the frame width and
2423 the width setting used for listing windows.
2424
2425 @item
2426 Statistics on classes and Environments may be displayed.
2427
2428 @item
2429 Language-specific class information may be shown. Presently this feature is
2430 supported only for Eiffel. A listing of class parents, attributes,
2431 routines and best guess (highly accurate) list of routine calls may be
2432 displayed. Outputs from the Eiffel 'short' and 'flat' commands may also be
2433 shown.
2434
2435 @item
2436 Machine-independent mouse support is included along with an extremely
2437 intuitive point and click interface. The OO-Browser is pre-configured
2438 for use with the X window system, NEXTSTEP, Sunview or Apollo's DM
2439 window system under InfoDock, Emacs V19, XEmacs, Epoch, and Emacs V18.
2440
2441 @item
2442 Popup and pulldown command menus are available under InfoDock, Emacs V19
2443 and XEmacs.
2444
2445 @item
2446 All browser outputs are text which may be edited as desired or saved to
2447 files.
2448
2449 @item
2450 A single key provides ASCII ordering of class names, ascending or
2451 descending, including those from inheritance trees. Classes may be
2452 easily located by matching a regular expression or string to the set of
2453 class names in an Environment, with repeated searches incrementally
2454 narrowing the selected set.
2455
2456 @item
2457 Browser functions may be used standalone within the editor without using
2458 the multi-windowed browser interface. One useful example is to point to
2459 a class name such as a parent class in the text of another class and
2460 have the parent's source appear in an editable fashion. An alternative
2461 editor and viewer may be selected to adapt the browser to personal
2462 taste.
2463
2464 @cindex CLOS
2465 @item
2466 The browser is adaptable to any class-based object-oriented language.
2467 It works best with languages that focus on static class creation such as
2468 Eiffel and C++. Those that use dynamic (runtime) class creation such as
2469 CLOS must be interfaced to the browser so that classes created at runtime
2470 are added to the browser's Environment.
2471
2472 @cindex GNU Emacs
2473 @cindex UNIX
2474 @item
2475 The OO-Browser is integrated with the powerful GNU Emacs editor; it works on
2476 any UNIX system display supported by Emacs. Most browser commands may
2477 be executed by direct selection, providing a very natural interface.
2478
2479 @cindex source code
2480 @item
2481 All source code, over 400 kilobytes, is included and is heavily documented.
2482 @end itemize
2483
2484
2485 @node Commands, Glossary, Features, Top
2486 @appendix OO-Browser Command Descriptions
2487
2488 @c Call {M-x doc} to insert documentation in table.
2489 @c Call (br-cmd-doc t) to remove documentation from table.
2490
2491 @cindex arguments
2492 @cindex formal arguments
2493 @cindex programming
2494 The following documentation is meant for programmers who want to modify
2495 the OO-Browser but is included here since some users of the OO-Browser
2496 may find it useful. All commands that are bound to keys and that are
2497 specific to the OO-Browser are listed here. Within each command
2498 description, identifiers shown in all capitals are the names of the
2499 command's formal arguments; all formal arguments are presented in the
2500 order in which they are required by the command. If a command takes
2501 optional arguments, the first optional argument is labeled
2502 @emph{optional}; all following arguments are assumed to be optional.
2503
2504 @cindex command documentation
2505 @cindex OO-Browser commands
2506 @table @code
2507
2508 @findex br-add-class-file
2509 @item br-add-class-file @{@kbd{C-c ^}@}
2510 Adds a file of classes to the current Environment. Interactively or
2511 when optional CLASS-PATH is nil, defaults to current buffer file as
2512 CLASS-PATH. If optional LIB-TABLE-P is non-nil, add to Library
2513 Environment, otherwise add to System Environment. If optional SAVE-FILE
2514 is t, the Environment is then stored to the filename given by
2515 @var{br-env-file}. If SAVE-FILE is non-nil and not t, its string value
2516 is used as the file to which to save the Environment.
2517
2518 @findex br-ancestors
2519 @item br-ancestors @{@kbd{a}@}
2520 Display ancestor tree whose root is the current class. With optional
2521 prefix ARG, display all ancestor trees whose roots are visible classes
2522 at the current level. ARG = -1 inverts current class ancestry tree.
2523 That is, it shows branches going down towards the root class, so that
2524 parents appear above children. ARG < -1 inverts all ancestry trees.
2525
2526 @findex br-at
2527 @item br-at @{@kbd{@@}@}
2528 Display current class location in the inheritance graph.
2529 The class is displayed among both its ancestors and descendants.
2530 With optional prefix ARG, display location for all visible classes at the
2531 current level.
2532
2533 @findex br-buffer-menu
2534 @item br-buffer-menu @{@kbd{b}@}
2535 Display selection list of buffers with attached files in viewer window.
2536
2537 @findex br-children
2538 @item br-children @{@kbd{c}@}
2539 Display children of current class. With optional prefix ARG, display
2540 children of all visible classes at the current level.
2541
2542 @findex br-class-stats
2543 @item br-class-stats @{@kbd{M-c}@}
2544 Display statistics summary for current class. Optional prefix arg
2545 PROMPT means prompt for class name.
2546
2547 @findex br-copyright
2548 @item br-copyright
2549 @cindex copyright
2550 Display browser copyright information in viewer window.
2551
2552 @findex br-count
2553 @item br-count @{@kbd{#}@}
2554 Count number of classes visible in current listing buffer. Print
2555 text result in minibuffer when called interactively.
2556
2557 @findex br-delete
2558 @item br-delete @{@kbd{C-c C-d}@}
2559 Delete class from current Environment. Optional prefix arg PROMPT means
2560 prompt for class name.
2561
2562 @findex br-descendants
2563 @item br-descendants @{@kbd{d}@}
2564 Display descendant tree whose root is the current class. With optional
2565 prefix ARG, display all descendant trees whose roots are visible classes
2566 at the current level.
2567
2568 @findex br-edit-entry
2569 @item br-edit-entry @{@kbd{e}@}
2570 Edits source for any browser listing entry, such as a class or a feature.
2571 Optional prefix arg PROMPT means prompt for entry name.
2572
2573 @findex br-env-create
2574 @item br-env-create @{@kbd{C-c C-c}@}
2575 Create and save the specification of a new OO-Browser Environment.
2576 Interactively prompt for the Environment file name or use optional
2577 ENV-FILE. Interactively prompt for the Environment language to use or
2578 use optional LANG-PREFIX as language indicator. Return the name of the
2579 Envir spec file created. Do not build the Environment. Use
2580 'br-env-build' to construct an Environment from its specification.
2581
2582 @findex br-env-load
2583 @item br-env-load @{@kbd{C-c C-l}@}
2584 Load browser Environment or spec from optional ENV-FILE or 'br-env-file'.
2585 Non-nil PROMPT means prompt user before building tables.
2586 Non-nil NO-BUILD means skip build of Environment entirely.
2587 Return t if load is successful, else nil.
2588
2589 @findex br-env-rebuild
2590 @item br-env-rebuild @{@kbd{C-c C-e}@}
2591 Rescan System and Library sources associated with the current Environment.
2592
2593 @findex br-env-save
2594 @item br-env-save @{@kbd{C-c C-s}@}
2595 Save changed Environment to file given by optional SAVE-FILE or
2596 'br-env-file'.
2597
2598 @findex br-env-stats
2599 @item br-env-stats @{@kbd{M-e}@}
2600 Display summary for current Environment in viewer window.
2601 With optional prefix ARG, display class totals in minibuffer.
2602
2603 @findex br-exit-level
2604 @item br-exit-level @{@kbd{x}@}
2605 Return to prefix ARGth previous inheritance level listing.
2606 The command is ignored with ARG < 1.
2607
2608 @findex br-find
2609 @item br-find
2610 Interactively completes class or feature ELEMENT-NAME and jumps to its definition.
2611 Returns ELEMENT-NAME or signals an error.
2612
2613 @findex br-feature-signature
2614 @item br-feature-signature @{@kbd{F}@}
2615 Show full feature signature in the view window.
2616 With optional prefix ARG, display signatures of all features from the
2617 current buffer.
2618
2619 @findex br-help
2620 @item br-help @{@kbd{h}@}
2621 Display browser operation help information in viewer window.
2622
2623 @findex br-help-ms
2624 @item br-help-ms @{@kbd{H}@}
2625 Display browser mouse usage help information in viewer window.
2626
2627 @findex br-entry-info
2628 @item br-entry-info @{@kbd{i}@}
2629 Display attributes of the current entry in the viewer window.
2630
2631 @findex br-implementors
2632 @item br-implementors @{@kbd{I}@}
2633 Display hierarchy of classes that define current feature. Ignore
2634 inherited features. With optional prefix ARG, display implementors of
2635 all features at the current level.
2636
2637 @findex br-kill
2638 @item br-kill @{@kbd{C-c C-k}@}
2639 Kill buffer in viewer window and redisplay help text.
2640
2641 @findex br-lib-top-classes
2642 @item br-lib-top-classes @{@kbd{l}@}
2643 Display list of top level Library classes. With prefix ARG, display all
2644 Library classes.
2645
2646 @findex br-lib-rebuild
2647 @item br-lib-rebuild @{@kbd{L}@}
2648 Rescan Library components of the current Environment.
2649
2650 @findex br-match
2651 @item br-match @{@kbd{m}@}
2652 Show all class names in current Environment that contain optional EXPR.
2653 Nil value of EXPR means prompt for a value. With optional prefix ARG, EXPR
2654 is treated as a string. By default, it is treated as a regular expresion.
2655 AGAIN non-nil shows the number of classes MATCHED from the last search,
2656 allowing repeated narrowing of the search set. Empty EXPR when AGAIN is nil
2657 matches to all classes in the Environment.
2658
2659 @findex br-match-entries
2660 @item br-match-entries @{@kbd{M}@}
2661 Show all entries in current listing that contain optional EXPR.
2662 Nil value of EXPR means prompt for a value. With optional prefix ARG, EXPR
2663 is treated as a string. By default, it is treated as a regular expresion.
2664 AGAIN non-nil means show the number of entries MATCHED from last search,
2665 allowing repeated narrowing of the search set. Empty EXPR when AGAIN is nil
2666 matches to all entries in the listing.
2667
2668 @findex br-next-entry
2669 @item br-next-entry @{@kbd{C-n}@}
2670 Move point vertically down prefix ARG number of lines in listing
2671 buffer.
2672
2673 @findex br-order
2674 @item br-order @{@kbd{o}@}
2675 Order current browser listing window entries.
2676 With prefix ARG other than 1 (the default), don't remove leading space from
2677 entry lines before ordering. Negative ARG means order in descending Ascii
2678 sequence, otherwise order in ascending sequence.
2679
2680 @findex br-parents
2681 @item br-parents @{@kbd{p}@}
2682 Display parents of current class. With optional prefix ARG, display
2683 parents of all visible classes at the current level.
2684
2685 @findex br-prev-entry
2686 @item br-prev-entry @{@kbd{C-p}@}
2687 Move point vertically up prefix ARG number of lines in listing
2688 buffer.
2689
2690 @findex br-quit
2691 @item br-quit @{@kbd{q}@}
2692 Quit browser. With optional prefix ARG, delete window configurations
2693 and listing buffers associated with the browser.
2694
2695 @findex br-refresh
2696 @item br-refresh @{@kbd{C-c C-r}@}
2697 Restore OO-Browser to its state upon startup.
2698
2699 @findex br-resize-narrow
2700 @item br-resize-narrow @{@kbd{C-x -}@}
2701 Resize listing windows so are narrower by 10 characters.
2702
2703 @findex br-resize-widen
2704 @item br-resize-widen @{@kbd{C-x +}@}
2705 Resize listing windows so are wider by 10 characters.
2706
2707 @findex br-features
2708 @vindex br-inherited-features-flag
2709 @item br-features @{@kbd{f}@}
2710 Display features/elements of the current class (prefix ARG = 1) or of
2711 the current listing if ARG is other than 0 or 1.
2712
2713 With ARG = 0, the value of the variable, @var{br-inherited-features-flag},
2714 is toggled and no other action is taken.
2715
2716 If @var{br-inherited-features-flag} is @code{t}, all features of each
2717 class are shown. If @code{nil}, only lexically included features are
2718 shown and if the features of a single class are requested and none are
2719 defined, the class definition is displayed so that its feature
2720 declarations may be browsed.
2721
2722 @findex br-sys-rebuild
2723 @item br-sys-rebuild @{@kbd{S}@}
2724 Rescan System components of the current Environment.
2725
2726 @findex br-sys-top-classes
2727 @item br-sys-top-classes @{@kbd{s}@}
2728 Display list of top level System classes.
2729 With prefix ARG, display all System classes.
2730
2731 @findex br-to-from-viewer
2732 @item br-to-from-viewer @{@kbd{C-c C-v}@}
2733 Move point to viewer window or back to last recorded listing
2734 window.
2735
2736 @findex br-toggle-keep-viewed
2737 @vindex br-keep-viewed-classes
2738 @item br-toggle-keep-viewed
2739 Toggle the value of the @var{br-keep-viewed-classes} flag.
2740
2741 @findex br-top-classes
2742 @item br-top-classes @{@kbd{t}@}
2743 Display list of top level classes.
2744 With prefix ARG, display all Environment classes.
2745
2746 @findex br-unique
2747 @item br-unique @{@kbd{u}@}
2748 Eliminate adjacent duplicate entry names from the current listing window.
2749 If two adjacent entries look the same one is eliminated, even if they refer
2750 to different class elements.
2751
2752 @findex br-version
2753 @item br-version @{@kbd{C-c #}@}
2754 Display browser version number.
2755
2756 @findex br-view-entry
2757 @item br-view-entry @{@kbd{v}@}
2758 Displays source for any browser listing entry.
2759 Optional prefix arg PROMPT means prompt for entry name.
2760
2761 @findex br-view-friend
2762 @item br-view-friend @{@kbd{V}@}
2763 With point on a friend listing entry, view its source code definition.
2764 With optional OTHER-WIN non-nil, display in another window.
2765 With optional SIG-AT-POINT-FLAG non-nil, assume point is within a friend
2766 signature in a source buffer.
2767
2768 @findex br-view-full-frame
2769 @item br-view-full-frame @{@kbd{1}@}
2770 Use full frame to display contents of viewer window.
2771
2772 @findex br-viewer-scroll-down
2773 @item br-viewer-scroll-down @{@kbd{DEL}@}
2774 Scroll viewer window downward ARG lines or a windowful if no ARG.
2775
2776 @findex br-viewer-scroll-up
2777 @item br-viewer-scroll-up @{@kbd{SPC}@}
2778 Scroll viewer window upward ARG lines or a windowful if no ARG.
2779
2780 @findex br-where
2781 @item br-where @{@kbd{w}@}
2782 Display in minibuffer and return full path of a browser listing entry.
2783 Optional prefix arg PROMPT means prompt for entry name."
2784
2785 @findex br-write-buffer
2786 @item br-write-buffer @{@kbd{C-c C-w}@}
2787 Write narrowed portion of current browser buffer to a file.
2788
2789 @findex br-tree
2790 @item br-tree @{@kbd{M-d}@}
2791 Start the @file{xbr} application with descendency tree of current class.
2792 With optional prefix ARG, a descendency tree for each class in current
2793 buffer.
2794
2795 @findex br-tree-graph
2796 @item br-tree-graph @{@kbd{M-g}@}
2797 Start the appropriate tree application with the tree from current
2798 listing buffer.
2799
2800 @findex br-tree-kill
2801 @item br-tree-kill @{@kbd{M-k}@}
2802 Prompt user whether to kill all @file{xbr} sub-processes.
2803
2804 @findex br-tree-features-toggle
2805 @item br-tree-features-toggle @{@kbd{M-f}@}
2806 Toggle between showing features and hiding them when @code{br-tree} is
2807 invoked to display descendants graphically.
2808
2809 @end table
2810
2811
2812 @c ***************************
2813 @c Unnumbered Chapters
2814 @c ***************************
2815
2816 @node Glossary, References, Commands, Top
2817 @unnumbered Glossary
2818
2819 Concepts pertinent to operational usage of the OO-Browser are defined here.
2820
2821 If some GNU Emacs terms are unfamiliar to you, see @cite{[Stallman 87]}.
2822
2823 @table @code
2824 @item Ancestors
2825 All classes above a class in the inheritance hierarchy.@refill
2826
2827 @item Category
2828 Under most languages, a logical grouping of related classes. The
2829 OO-Browser does not yet have any support for this kind of category.
2830
2831 Under Objective-C, a partial class definition that implements a related
2832 set of methods. The full class definitions is formed from the
2833 conjunction of all of the class' categories. The OO-Browser supports
2834 Objective-C category browsing.@refill
2835
2836 @item Children
2837 First level of classes below a class in the inheritance hierarchy. Those
2838 that directly inherit from a class.@refill
2839
2840 @item Class
2841 A category from which object instances are created. The OO-Browser
2842 can display classes along with their elements, categories and formal
2843 protocols.
2844
2845 @item Class at Point
2846 Class name in a listing buffer whose name appears on the same line as
2847 point.@refill
2848
2849 @item Declaration
2850 A specification of a programatic entity, for reference by other parts of
2851 a program. See also @code{Definition}. The declaration of a method
2852 specifies its signature but not its body.@refill
2853
2854 @item Default Class
2855 A class that the OO-Browser creates to simplify browsing a particular
2856 category of objects such as class protocols or global functions.
2857 Default class names begin and end with square bracket delimiters, as in
2858 @code{[protocol]}.@refill
2859
2860 @item Definition
2861 Programmatic definition of an entity, e.g@. defining the body of a
2862 method.
2863
2864 @item Completion
2865 The act of filling in the non-ambiguous part of a requested item, such
2866 as a class name or a file name.@refill
2867
2868 @item Decendants
2869 All classes below a class in the inheritance hierarchy.@refill
2870
2871 @item Element
2872 A feature or an instance of a class.
2873
2874 @item Environment
2875 A series of browser lookup tables and control variables that specify the set
2876 of classes and inter-class relationships with which the browser works.@refill
2877
2878 @item Environment File
2879 A file used to store browser Environments.@refill
2880
2881 @item Environment Specification
2882 Unambiguously tells the browser what to include in the construction of
2883 an Environment.@refill
2884
2885 @item Feature
2886 An element (method/attribute/component) of a class.
2887
2888 @item Formal Protocol
2889 See @code{Protocol}.@refill
2890
2891 @item Implementor
2892 A class in which a particular element is defined. This does not include
2893 classes which inherit an element.
2894
2895 @item Initialization File
2896 See @code{Personal Initialization File}.@refill
2897
2898 @item Instance
2899 An object which has a particular class as its type. The class serves as
2900 a template for instance creation.
2901
2902 @item Library Classes
2903 Stable, seldomly changed classes that have been released for general
2904 usage.@refill
2905
2906 @item Listing Window
2907 One of a number of browser windows used to display lists of classes.
2908 Inheritance relations are shown by class name indentation and by the class
2909 level numbers in the listing buffer mode lines.@refill
2910
2911 @item Lookup Table
2912 A store used to help the browser quickly determine inter-class
2913 relationships.@refill
2914
2915 @item Member
2916 See @code{Feature}.
2917
2918 @item Method
2919 A callable function defined within one or more classes.
2920
2921 @item Minibuffer Window
2922 The single line window at the bottom of an Emacs frame. It is used to
2923 interact with the user by displaying messages and prompting for
2924 input.@refill
2925
2926 @item Parents
2927 First level of classes above a class in the inheritance hierarchy. Those
2928 from which a class directly inherits.@refill
2929
2930 @vindex file, .br-init.el
2931 @item Personal Initialization File
2932 The optional file, @file{~/.br-init.el}, which sets user-specific
2933 options affecting operation of the OO-Browser, thereby configuring the
2934 browser for personal use.@refill
2935
2936 @item Point
2937 The point in the current buffer in front of the character which the Emacs
2938 cursor is over but after any prior character.@refill
2939
2940 @item Protocol
2941 An interface specification to which a class conforms. Some languages
2942 use abstract classes for this purpose. Under Objective-C, one may also
2943 define formal protocols which include a set of method signatures which a
2944 class must implement if it conforms to the protocol. Also under
2945 Objective-C, one protocol may inherit from a list of other protocols,
2946 and thus expand the set of methods which a conforming class must
2947 implement.
2948
2949 @item Routine
2950 See @code{Method}.
2951
2952 @item Signature
2953 An interface specification for a method. It includes the method's
2954 class, type of return value and the types of its formal parameters.
2955
2956 @item Smart System
2957 The Smart System is another handy program that helps you to work smarter
2958 and faster. It consists of two parts, the Smart Key System, a direct
2959 manipulation keyboard interface that gives you control of most GNU Emacs
2960 subsystems by using only two keys, and the Smart Menu System. This
2961 provides a hierarchy of menus within Emacs that you use instead of
2962 keyboard commands. Just point and click on a menu entry. One of its
2963 uses is to invoke the OO-Browser on any desired language Environment.
2964 (The Smart Key System is included with the Smart Menu System.)@refill
2965
2966 @item Smart Menu System
2967 See @code{Smart System}.
2968
2969 @item System Classes
2970 Classes still in development whose interfaces are likely to change.
2971 They are typically part of a specific project and are often not meant to
2972 be reused elsewhere.@refill
2973
2974 @item Top-Level Classes
2975 Classes without parents. Those at the top of the inheritance tree for a
2976 given Environment.@refill
2977
2978 @item Viewer Window
2979 The largest, bottom-most window in the browser used for displaying class
2980 source and help information.@refill
2981 @end table
2982
2983
2984 @node References, Keys, Glossary, Top
2985 @unnumbered References
2986
2987 @table @b
2988 @item [Meyer 88]
2989 Meyer, Bertrand. Object-oriented Software Construction. Prentice Hall
2990 International: UK, 1988.
2991
2992 @item [Meyer 89]
2993 Meyer, Bertrand. Eiffel: The Language. Interactive Software
2994 Engineering: Santa Barbara, CA, 1989. (Also being republished by
2995 Prentice Hall.)
2996
2997 @item [Goldberg 83]
2998 Goldberg, Adele and David Robson. @emph{Smalltalk-80: The Language and
2999 its Implementation}. Addison-Wesley, 1983.@refill
3000
3001 @item [Stallman 87]
3002 Stallman, Richard. @emph{GNU Emacs Manual}. Free Software Foundation,
3003 Cambridge: MA, March 1987.@refill
3004
3005 @item [Java 95]
3006 @emph{The Java Language Specification}. Sun Microsystems Computer
3007 Corporation, Mountain View, CA, February 1, 1995.@refill
3008 @end table
3009
3010
3011 @c ***************************
3012 @c Indices
3013 @c ***************************
3014
3015 @node Keys, Command Index, References, Top
3016 @unnumbered Key Binding Index
3017
3018 @printindex ky
3019
3020 @node Command Index, Concepts, Keys, Top
3021 @unnumbered Command and Variable Index
3022
3023 @printindex fn
3024
3025 @node Concepts, , Command Index, Top
3026 @unnumbered Concept Index
3027
3028 @printindex cp
3029
3030 @page
3031 @page
3032 @summarycontents
3033 @contents
3034 @bye
3035
3036 @c Locl Variables: ;;;
3037 @c eval: (progn (load "cmd-doc") (defun doc () (interactive) (br-cmd-doc) (save-buffer))) ;;;
3038 @c End: ;;;