DIRECTORY TerminalIO USING [WriteRope], CD USING [Design, ObPtr, ApplicationPtr, ApplicationList, DesignRect, lambda, highLightError], CDSequencer USING [Command, ImplementCommand], CDOps USING [AppList, DelayedRedraw, ReOrderApplication], CDCommandOps USING [WriteInfo], CDInline USING [Extend], CDViewer USING [ShowAndScale], CDVPrivate USING [MyGraphicRef], CDApplications USING [ARectO] ; ShowErrorsCommandImpl: CEDAR PROGRAM IMPORTS TerminalIO, CDSequencer, CDOps, CDCommandOps, CDInline, CDViewer, --CDProperties,-- CDApplications ~ BEGIN ZoomError: PROCEDURE [comm: CDSequencer.Command] ~ { applList: CD.ApplicationList ~ CDOps.AppList[comm.design]; foundSome: BOOLEAN _ FALSE; FOR a: CD.ApplicationList _ applList, a.rest WHILE a # NIL DO IF a.first.ob.level = CD.highLightError THEN { aptr: CD.ApplicationPtr ~ a.first; IF aptr.selected # TRUE THEN { mySheet: CDVPrivate.MyGraphicRef ~ NARROW[comm.ref]; eRect: CD.DesignRect ~ CDApplications.ARectO[aptr]; aptr.selected _ TRUE; CDCommandOps.WriteInfo[aptr]; TerminalIO.WriteRope[ "\n"]; CDViewer.ShowAndScale[viewer~ mySheet.viewer, rect~ CDInline.Extend[eRect, 5*CD.lambda] ]; CDOps.DelayedRedraw[comm.design, eRect, FALSE]; CDOps.ReOrderApplication[comm.design, aptr]; EXIT } ELSE foundSome _ TRUE }; REPEAT FINISHED => TerminalIO.WriteRope[ IF foundSome THEN "***All errors are already selected\n" ELSE "***No errors to show\n"]; ENDLOOP; }; CDSequencer.ImplementCommand[$ShowErrors, ZoomError,, doQueue]; TerminalIO.WriteRope["ShowErrors loaded\n"] END. tShowErrorsCommandImpl.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Written by Shand, July 25, 1984 7:13:44 pm PDT Last Edited by: Shand, July 26, 1984 1:56:10 am PDT CDProperties USING [GetPropFromApplication], -- HORROR! INTERIM code awaiting a method to find the viewer associated with a command. -- Module Initialization of SpinifexCommands Κ˜code™Kšœ Οmœ1™