TiogaExecViewerCommands.mesa
Copyright Ó 1985, 1987, 1988, 1991 by Xerox Corporation. All rights reserved.
Paxton, October 26, 1982 10:12 am
Maxwell, January 14, 1983 8:46 am
Plass, April 20, 1983 9:26 am
Russ Atkinson, September 29, 1983 11:17 am
Michael Plass, March 15, 1989 4:50:56 pm PST
Mike Spreitzer February 19, 1987 3:51:44 pm PST
Doug Wyatt, June 17, 1988 2:42:04 pm PDT
Christian Jacobi, May 3, 1989 11:32:46 am PDT
Eduardo Pelegri-Llopart, July 26, 1989 12:37:47 pm PDT
DIRECTORY
Commander USING [CommandProc, Register],
IO USING [EndOfStream, GetRefAny, RIS, STREAM],
List USING [Nconc1],
Rope,
TEditDocument USING [Selection],
TEditInput USING [Interpret, ReadTipTables],
TEditOps USING [GetSelData],
TEditSelection USING [LockSel, UnlockSel];
TiogaExecViewerCommands: CEDAR PROGRAM
IMPORTS Commander, IO, List, TEditInput, TEditOps, TEditSelection
= BEGIN
ROPE: TYPE = Rope.ROPE;
ReadTiogaTipTablesCommand: Commander.CommandProc = {
[cmd: Handle] RETURNS [result: REF ← NIL, msg: Rope.ROPE ← NIL]
TEditInput.ReadTipTables[];
};
DoTiogaOpsCommand: Commander.CommandProc = {
[cmd: Handle] RETURNS [result: REF ← NIL, msg: Rope.ROPE ← NIL]
pSel: TEditDocument.Selection ¬ TEditOps.GetSelData[];
rope: Rope.ROPE ¬ cmd.commandLine;
h: IO.STREAM ¬ IO.RIS[rope];
item: REF ANY;
list: LIST OF REF ANY;
DO
item ¬ IO.GetRefAny[h ! IO.EndOfStream => { item ¬ NIL; CONTINUE}];
IF item = NIL THEN EXIT;
list ¬ List.Nconc1[list, item];
ENDLOOP;
TEditSelection.LockSel[primary, "DoTiogaOps"];
-- IF pSel.viewer # NIL THEN -- TEditInput.Interpret[pSel.viewer, list ! UNWIND => TEditSelection.UnlockSel[primary]];
TEditSelection.UnlockSel[primary];
};
Commander.Register["ReadTiogaTipTables", ReadTiogaTipTablesCommand, "Have Tioga read its TIP tables again."];
Commander.Register["DoTiogaOps", DoTiogaOpsCommand, "Like EditTool Do Operations command."];
END.