The Meta-Environment API

editor-error-display.tb

Go to the documentation of this file.
00001 #ifndef __EDITOR_ERROR_DISPLAY__
00002 #define __EDITOR_ERROR_DISPLAY__
00003 
00004 #include <error-support.idef>
00005 
00006 process GoToEditorArea(Sid: session-id, Area: area) is
00007 let
00008   Offset: int
00009 in
00010   snd-msg(get-area-offset(Area))
00011   . rec-msg(area-offset(Offset?))
00012   . snd-msg(te-set-cursor-at-offset(Sid, Offset))
00013   . snd-msg(te-set-selection(Sid, Area))
00014 endlet
00015 
00016 process ShowDescription(Sid: session-id, Description: str) is
00017   snd-msg(te-display-message(Sid, Description))
00018 
00019 process ShowLocation(Sid: session-id, Location: term) is
00020 let
00021   Area: area
00022 in
00023   snd-msg(has-location-area(Location))
00024   .
00025   (
00026     rec-msg(location-has-area(Location))
00027     . snd-msg(get-location-area(Location))
00028     . rec-msg(location-area(Area?))
00029     . GoToEditorArea(Sid, Area)
00030   +
00031     rec-msg(location-has-no-area(Location))
00032     . tau
00033   )
00034 endlet
00035 
00036 process ShowSubject(Sid: session-id, Subject: term) is
00037 let
00038   Location: term,
00039   Description: str
00040 in
00041   snd-msg(has-subject-location(Subject))
00042   .
00043   (
00044     rec-msg(subject-has-location(Subject))
00045     . snd-msg(get-subject-location(Subject))
00046     . rec-msg(subject-location(Location?))
00047     . snd-msg(get-subject-description(Subject))
00048     . rec-msg(subject-description(Description?))
00049     . ShowLocation(Sid, Location)
00050     . ShowDescription(Sid, Description)
00051   +
00052     rec-msg(subject-has-no-location(Subject))
00053     . tau
00054   )
00055 endlet
00056 
00057 process ShowError(Sid: session-id, Error: term) is
00058 let
00059   Subject: term,
00060   Subjects: list
00061 in
00062   snd-msg(get-error-subjects(Error))
00063   . rec-msg(error-subjects(Subjects?))
00064   . Subject := first(Subjects)
00065   . ShowSubject(Sid, Subject)
00066 endlet
00067 
00068 process ShowSummary(Sid: session-id, Summary: summary) is
00069 let
00070   Error: term,
00071   Errors: list
00072 in
00073   snd-msg(get-summary-errors(Summary))
00074   . rec-msg(summary-errors(Errors?))
00075   . Error := first(Errors)
00076   . ShowError(Sid, Error)
00077 endlet
00078 
00079 #endif /* __EDITOR_ERROR_DISPLAY__ */

Generated on Fri Sep 12 13:08:53 2008 for meta by  doxygen 1.4.6