GetDWIMDoc.tioga
Spreitzer, October 2, 1985 9:09:59 pm PDT
GetDWIM
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
GetDWIM
Mike Spreitzer
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: GetDWIM adds heuristics for finding files when you click the "Get" menu button in a Tioga viewer. GetDWIM knows about renaming interfaces in Mesa source files, the meaning of DF-Files, and following remote attachments.
Keywords: File, Get, Tioga, Lookup, DWIM, DF File, Attachment, Directory, Mesa, Cedar, OPEN, IMPORTS, Renaming, Interfaces
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. GetDWIM
GetDWIM adds four heuristics about how to find a file. GetDWIM is invoked when you select a file name, and click the "Get" entry in the menu of a Tioga viewer, but Tioga can't easily find the selected file.
The first heuristic involves mesa source files. If the Tioga viewer whose "Get" button you clicked is on a mesa source file, GetDWIM will process that source, looking for renaming IMPORTS and OPEN clauses. If the text you were trying to "get" had the form foo.bar, and there is a renaming of foo to glotz, the "get" is transformed into a "get" of glotz.bar. This feature is enabled/disabled with the UserProfile entry GetDWIM.TryRenaming: Boolean (defaults to TRUE).
Another heuristic involves DF-files. If the Tioga viewer whose "Get" button you clicked is on a DF-file, GetDWIM will process the DF-file, looking for the filename you selected. This feature is enabled/disabled with the UserProfile entry GetDWIM.ProcessDF: Boolean (defaults to TRUE).
Another heuristic says that files whose names differ only in the extensions are often found in the same directory. The third heuristic assists this; it says that when a local name has an attachment to a remote name, the remote name's directory is a good place to look. These last two are enabled/disabled by the UserProfile entries GetDWIM.AssociateExtensions and GetDWIM.FollowAttachments (both take Booleans and default to TRUE).