![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The Directory Viewer When a directory is opened or visited, Apex opens a directory-viewer window that displays a list of files and directories. You can use the directory-viewer window to navigate through the UNIX directory structure open files and directories, and view other files and directories.
The directory-viewer window is sometimes referred to as simply a directory viewer.
About This Chapter
This chapter describes the Apex directory-viewer window and shows how to use its features.
Specifically, the topics covered in this chapter are:
- The Directory-Viewer Window
- Finding and Using Files and Directories
- Managing Apex Windows
- The Enclosing and Jobs Commands
The Directory-Viewer WindowWhen the directory viewer opens, it displays the names of:
- The current directory
- First-level subdirectories
- Files in the current directory
A directory-viewer window is shown in Figure 24.
Figure 24 Directory-Viewer Window
![]()
Note: The names of files or directories that begin with a period (UNIX hidden files), such as .cshrc, do not ordinarily appear in the directory-viewer window. However, you can change this default behavior. See Filtering the Directory-Viewer Display.
Modifying the Directory-Viewer Display
You can modify the display of the directory-viewer in various ways, depending on your requirements and preferences. You can change:
- Which directories or files are displayed or hidden
- How many directory levels are displayed
- The amount and the type of information displayed
- The order in which directories and files are displayed
Expanding and Eliding the View Menu Display
By default, the directory-viewer window displays the contents of the current directory. You can modify its display to show the contents of multiple levels of subdirectories by choosing the Expand and Subdirectories commands from the View menu. The View menu is illustrated in Figure 25.
Figure 25 View Menu
![]()
By selecting items from the View menu (shown in Figure 25) you can:
- Expand and collapse (elide) the list-and-directory tree shown in the directory viewer to display only directories, both files and directories, or various combinations of files and directories
- Apply filters to the filenames and directory names displayed in the directory viewer to include or exclude specified text patterns or expressions
- Sort the filenames and directory names displayed in the directory viewer in various ways
Expanding the Display
When you choose Expand command from the View menu, Apex expands the file-and-directory display in the directory-viewer window. When the directory-viewer display is expanded, it includes files and subdirectories that lie directly below the selected directory in the UNIX file-and-directory hierarchy.
To illustrate, assume that your directory-viewer window displays the four directories on the left illustrated in Figure 26.
Figure 26 Expanding a Directory
![]()
Now suppose you select the Smartseat directory and then choose the Expand command from the View menu. The files and subdirectories in the Smartseat directory are then added to the display in your directory-view window, as shown in the column labeled First Expansion in Figure 26.
Next, suppose you select the cabin_tests.ss directory and choose the View > Expand menu item. Apex responds by expanding the contents of that directory also, as shown in the column labeled Second Expansion in Figure 26.
In this way, by continuing the process of selecting directory names and choosing the View > Expand menu item, you can display multiple levels of a directory structure in a single directory-viewer window.
If you choose the View > Expand without selecting a subdirectory, all subdirectories visible in the window are expanded.
Eliding Subdirectories
The Elide command under the View menu hides files and subdirectories inside selected directories. Elide does not move or modify these objects; only the display is affected. In Figure 26, if you select the expanded directory Smartseat and select View > Elide, the display returns to its original form.
If no directory is selected, Elide hides the deepest level of nested directories and files. With successive uses of Elide, you can hide everything except the name of the current directory.
The Subdirectories Menu Item
The Subdirectories item on the View menu works much like the Expand item, except that it displays only directory names. In contrast, as you saw in Figure 26, the Expand item displays both filenames and directory names.
Formatting the Directory-Viewer Display
By default, the directory-viewer window displays only the simple (single-level) names of files and directories. By selecting the View > Format menu item, you can modify the display to provide more information. View > Format is a cascading menu that offers the choices described in Table 7.
Additional menu items may appear at the bottom of the Format submenu. These correspond to user-defined formats which have been created using the Define dialog.
If you choose an item from the View > Format menu without selecting any directory names or filenames, the formatting that you choose affects all objects in the directory-viewer display. If you select one or more filenames or pathnames and then choose an item from the View > Format menu, the formatting you choose affects only the objects you have selected.
Sorting the Directory-Viewer Display
The directory-viewer window displays the names of files and directories in accordance with the following conventions:
- Directories appear before files.
- Names beginning with numbers precede names beginning with letters of the alphabet.
- Names beginning with uppercase letters precede names beginning with lowercase letters.
By choosing the View > Sort menu item, you can modify the sorting order of the display. View > Sort is a cascading menu that lets you choose how the pathnames and filenames in the directory viewer are sorted. A sorting operation includes all objects within a directory.
The View > Sort menu lets you choose from seven different sorting orders, as outlined in Table 8.
Refreshing the Directory-Viewer Display
The display in the directory viewer is a copy of the contents of the current directory. When you perform an operation such as sorting the contents of the displayed directory, your command operates on the copy of the directory shown in the directory-viewer window, not on the directory itself.
The File > Redisplay command updates the directory-viewer display to reflect the actual contents of the current directory, not including any objects you have explicitly hidden. To hide objects, see the Filter menu items shown in Table 9 .
To refresh the display of text that is selected in a window, choose the Redisplay Selected item from the File menu.
Filtering the Directory-Viewer Display
By default, the directory viewer does not display the names of files or directories that begin with a period (UNIX hidden files), such as .cshrc. However, by choosing the View > Filter command, you can change this default behavior. You can modify the viewer display to include filenames that begin with a dot or to filter displayed filenames and directory names in other ways.
In the filtering of pathnames and filenames, the View > Filter menu item takes precedence over the View > Expand menu item.
View > Filter is a cascading menu that offers you a choice of the five file ways to filter filenames and pathnames described in Table 9.
When you choose the Filter... item from the View > Filter menu, a Filter dialog box is displayed as illustrated in Figure 27.
Figure 27 Filter Dialog Box - Apex/Summit only
![]()
Figure 28 Filter Dialog Box - Apex/ClearCase only
![]()
When the Filter dialog box appears, you can specify filtering options that affect the objects shown in the directory-viewer window. To set filter options, enter text in the appropriate text-entry fields and checks in the appropriate check boxes. Click OK or Apply to implement the filter options you have chosen.
Filtering Options
In the Filter dialog box illustrated in Figure 27, the three check boxes labeled Include Pattern, Exclude Pattern, and Always Include Pattern apply to the three text fields to the right of each check box. By entering text strings in the Include Pattern, Exclude Pattern, and Always Include Pattern text fields, you can:
- Include items shown in the directory-viewer window to any string you enter in the text field labeled Include Pattern
- Exclude from the display in the directory-viewer window any string you enter in the text field labeled Exclude Pattern
- Unconditionally display in the director-viewer window any string you enter in the text field labeled Always Include Pattern
The Exclude Pattern filter prevent objects from appearing in the directory-viewer window.
Using Wildcards in Filtering Operations
When you enter directory names and filenames in the Limit To, Always Include, and Exclude text fields, you can use an asterisk (*) to represent any group of zero or more characters, or a question mark(?), to represent any single character.
(Ada only) For example, to represent all Ada specifications the expression *.1.ada matches all Ada specifications, while the expression strings_utilities.?.ada matches the specification and body of the string_utilities package.
Alternatively, you can restrict the kind of objects to which your naming expressions apply by preceding them with a keyword such as file or directory.
Separating Filtering Specifications
Finally, you can separate multiple specifications by commas. For example, consider:
.*, file *~ #*# Makefile, directory Links Imports
- All objects whose names begin with a period (.)
- Files whose names end with a tilde (~), begin and end with a number sign (#), or are Makefiles
- Directories named Links or Imports
Summit/CM Filters (Apex/Summit only)
The remaining options in the Filter dialog box —— labeled Limit To History, Out Of Date, Checked Out, Checked In, and Uncontrolled —— apply to files controlled under the Rational Summit/CM system. Using and Customizing Summit/CM describes the checking out and checking in of Summit/CM-controlled files; it also provides more detailed information about the Summit/CM system.
In the Limit To History text field, you can specify the name of a version history family —— for example, Common. This choice limits the display to objects in the version history family that you specify. For more information about version histories, see Using and Customizing Summit/CM.
You can also limit the display to objects that are out of date, checked out, checked in, and controlled by clicking the appropriate toggle buttons.
ClearCase Filters
Filter by ClearCase Attributes can be accomplished using Checked Out, Checked-In and Uncontrolled.
Saving the Window Characteristics
Once you have the directory-viewer displaying the information of interested to you in the format you like, you can save these characteristics by executing the Tools > Session > Save Window Properties command. This commands saves these characteristics so that every time you bring up a directory-viewer, you get same type of information. These window characteristics are also saved across sessions. This command is available from any type of window.
Copying Text to the Clipboard
You can copy filenames or directory names from the directory-viewer window to the clipboard using standard mouse and menu operations. To copy a filename or a directory name, select the text you want to copy and choose the Copy Selected Names item from the File menu. Apex responds by copying the text you have selected to the clipboard.
Multiple names are separated by blanks. To copy the names so that each is on its own line, hold down the Shift key while choosing Edit > Copy Selected Names.
When you have copied a block of text to the clipboard, you can transfer it to other locations —— for example, into an Apex edit window. To learn more about using cut-and-paste operations in Apex edit windows, see the .
Using the Unbusy Command
When you execute a command that affects the directory-viewer window, the cursor changes to a picture of a watch to let you know that a command has been issued and processing is under way. When the watch cursor is displayed, you can change the cursor's appearance to normal by executing the File > Unbusy command. The watch cursor then reverts to its normal appearance and the directory-viewer window becomes available for normal operations without waiting for the currently executing operation to complete.
Closing the Directory-Viewer Window
The File > Close menu item closes the currently active directory-viewer window. However, it does not affect any other Apex window or any Apex operation in progress —— and it does not exit Apex.
To exit Apex completely and shut down Apex, you must choose Exit Apex from the File menu or from the Apex Panel Dialog Box.
Finding and Using Files and DirectoriesApex provides several ways to traverse the UNIX directory structure, but the most straightforward method is to choose from the items listed on the Navigate menu in the directory-viewer window illustrated in Figure 29 and Figure 30.
Figure 29 Navigate Menu in a Directory-Viewer (Ada only)
![]()
Figure 30 Navigate Menu in a Directory-Viewer (C/C++ only)
![]()
From the Navigate menu, you can choose the commands described in Table 10.
Mouse Alternatives to the `Visit' Commands
From the directory-viewer window, you can open other directory-viewer windows and editor windows using the mouse instead of selecting Visit or Visit In Place from the Navigate menu. To open another window using the mouse, place the mouse over the name of the file or directory you want to display and do one of the actions described in Table 11.
You can use the mouse to open a window only if the name of the file or directory you want to open appears in the current directory-viewer window.
Managing Apex WindowsDuring an Apex session, you may find that you have accumulated too plentiful a supply of open or iconified windows on your workstation screen. An easy way to manage a large number of windows is to open the Apex windows browser.
To open the window browser, choose the Navigate > Windows command. Apex then displays a browser dialog box named Windows illustrated in Figure 31.
Figure 31 Windows Window
![]()
The Windows window displays the names of all Apex windows, including those that are iconified.
The Navigate menu in the Windows window provides a list of commands to help you manage Apex windows. Choose any of the items from the windows browser's Navigate menu described in Table 12.
These commands help you manage your Apex windows for the most efficient use of your workstation display.
Raising Windows Using the Mouse
The act of raising a window places it in the foreground, hiding any windows that it overlaps. To raise an Apex window, double-click its name in the window's browser. If you double-click the name of an iconified window, that window is restored and raised.
Reopening Directories
If you have closed one or more directory-viewer windows, the Navigate > Directories Visited menu item gives you an easy way to reopen them. When you select the Directories Visited menu, Apex opens the Visit History dialog box illustrated in Figure 32.
Figure 32 The Visit History Dialog Box
![]()
The Visit History dialog box lists the pathnames of all the directories you have visited during the current Apex session, in order of most recent visit.
- 1 . Select the directory you want to open. You can select only one directory at a time.
- 2 . If you want to open the directory in the current directory viewer window, select the In Place check box.
- 3 . Click OK or Apply.
If you select a directory that is open but is either lowered or iconified, the command raises the window.
The Enclosing and Jobs CommandsTo open the directory-viewer window, from which the browser was opened, execute the Navigate > Enclosing command.
To open the Jobs window, which shows jobs that are currently running, execute the Navigate > Jobs command. A Jobs window showing the creating of a subsystem for Apex/Summit is illustrated in Figure 33.
Figure 33 The Jobs Window
![]()
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2002, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |