The Meta-Environment API
00001 #ifndef __RSCRIPT_EDITOR_LISTENERS__ 00002 #define __RSCRIPT_EDITOR_LISTENERS__ 00003 00004 #include <rscript-namespace.h> 00005 00006 process StartRSCRIPTEditor(Path: str, Area: area) is 00007 let 00008 ModuleId: module-id, 00009 Pid: int, 00010 Sid: session-id 00011 in 00012 MM-GetModuleIdByAttribute(RSCRIPT_NAMESPACE, "path", path(Path), ModuleId?) 00013 . create(EditSyntax(ModuleId), Pid?) 00014 . TODO("And what if it does not start? See editing Terms") 00015 . rec-msg(syntax-editor-started(ModuleId, Sid?)) 00016 . snd-msg(te-set-selection(Sid, Area)) 00017 . GoToEditorArea(Sid, Area) 00018 endlet 00019 00020 process RSCRIPTCloseEditors is 00021 let 00022 ModuleId: module-id 00023 in 00024 subscribe(mm-module-deleted(<module-id>)) 00025 . 00026 ( 00027 rec-note(mm-module-deleted(ModuleId?)) 00028 . DeleteSessions(ModuleId) 00029 ) 00030 * delta 00031 endlet 00032 00033 toolbus(RSCRIPTCloseEditors) 00034 00035 #endif /* __RSCRIPT_EDITOR_LISTENERS__ */