<> <> <> <> DIRECTORY CD, CDBottomUp, CDCells, CDCommandOps, CDOps, CDSequencer, TerminalIO; CDSetDisplayTresholdsImpl: CEDAR PROGRAM IMPORTS CDBottomUp, CDCells, CDCommandOps, CDOps, TerminalIO = BEGIN SetTreshold: PUBLIC PROC [design: CD.Design, root: CD.Object] = { [] _ CDBottomUp.StartRecurse[setTresholdClass, root, design]; }; DoSetTreshold: CDBottomUp.DoProc = { IF CDCells.IsCell[ob] THEN CDCells.SetSimplificationTreshhold[ob, -1]; }; ResetDisplayTresholdsComm: PROC [comm: CDSequencer.Command] = { inst: CD.Instance _ CDOps.TheInstance[comm.design, "recompute display treshold hierarchycally\n"]; IF inst#NIL THEN { SetTreshold[comm.design, inst.ob]; TerminalIO.PutRope["--done\n"] } }; setTresholdClass: CDBottomUp.Class _ CDBottomUp.Register[DoSetTreshold, NIL, NIL, $CDSetDisplayTresholds, $CDSetDisplayTresholds]; <<--use the CDBottomUp mechanism because we want to deal every object just once but >> <<--some silly user didn't include the objects in the directory. >> CDCommandOps.RegisterWithMenu[menu: $ProgramMenu, entry: "reset display tresholds", proc: ResetDisplayTresholdsComm, key: $CDSetDisplayTresholds]; END.