;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------- ;;;; File name: defsys.lsp ;;;; System: Case Manager ;;;; Author: Shawn Nicholson ;;;; Created: June 25, 2002 10:02:52 ;;;; Purpose: ;;;; --------------------------------------------------------------------- ;;;; Modified: Friday, November 15, 2002 at 00:45:25 by nicholson ;;;; --------------------------------------------------------------------- (in-package :common-lisp-user) #-qrg (error "You must first load qrg-setup.lisp.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load defsys for other modules required by this system if any (unless (member :fire-case-viewer *features*) (qrg:load-qrg-defsys "fire" "v1" "case-manager" "case-viewer")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Set up package (eval-when (:load-toplevel :compile-toplevel :execute) (defpackage :text-editor-case-display (:use :common-lisp :qrg))) ;;Provide the ability to move data to a separate package in the future. (eval-when (:compile-toplevel :load-toplevel :execute) (unless (find-package :data) (rename-package (find-package :cl-user) :common-lisp-user ;keep name the same '(:cl-user :user ;replace standard nicknames :data)))) ;add a new nickname (in-package :text-editor-case-display) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Global variables (defconstant *text-editor-case-display-version* "1.0") ;; current version number (defparameter *text-editor-case-display-path* (append-qrg-path fire-case-viewer::*case-viewer-path* "text-editor-case-display")) (defparameter *text-editor-case-display-files* nil) ;; Function to get case manager path (works for running under executable or devel environment) (defun get-text-editor-case-display-path (&key (subdirs nil) (filename nil) (filetype nil)) (qrg::get-path :root-path *text-editor-case-display-path* :subdirs subdirs :filename filename :filetype filetype)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; PackDoc stuff (eval-when (:load-toplevel :compile-toplevel :execute) (defmacro export-symbols (subpackage-name doc-string symbols) "Assigns a name and documentation to the group of symbols and exports them from the current package. If PackDoc has been loaded, subpackage documentation will also be generated." `(progn (export ,symbols) (when (member :packdoc *features*) (funcall (intern :subpackage-documentation :packdoc) ,subpackage-name ,symbols ,doc-string))))) #+packdoc (defun generate-text-editor-case-display-documentation (&key (output-path (qrg:append-qrg-path *text-editor-case-display-pathname* "docs")) (overwrite-files? t)) "Generates API documentation for the Case Mapper in HTML format. Files are written to qrg/fire/v1/case-manager/case-viewer/text-display-and-edit/docs/ by default." (flet ((doc-path (filename) (qrg:make-full-file-spec output-path filename ".html"))) (packdoc:document-package-to-file :text-editor-case-display (doc-path "text-editor-case-display-API") :html nil t :block) #+common-graphics (cg:beep) :done)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load the export file (qrg:load-file *text-editor-case-display-path* "export" :action :load-source) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; List the system files (defparameter *text-editor-expression-display-path* (append-qrg-path *text-editor-case-display-path* "expression-glyph-window")) (defparameter *text-editor-expression-display-files* '( "expression-glyph-graphic-mixin" "expression-glyph" "expression-glyph-pane" )) (setq *text-editor-case-display-files* '( "general-utilities" "text-editor-case-display-classes" "text-editor-case-display" "case-viewer-registration" )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Loading Function (defun load-text-editor-case-display (&key (action :source-if-newer) (verbose t) (force-load nil)) (cond ((and (not force-load) (member :text-editor-case-display qrg:*modules-loaded*)) (format t "~%;;; Text Editor Case Display already loaded.")) (t (qrg:require-system fire-case-viewer::*case-viewer-path* :load-fire-case-viewer :fire-case-viewer :action action :verbose verbose :load-subsystems? nil) ;; Load the text display code now (qrg:load-files (make-qrg-path "Utils") (list "general-utilities") :action action :verbose verbose) (qrg:load-files *text-editor-expression-display-path* *text-editor-expression-display-files* :action action :verbose verbose) (qrg:load-files *text-editor-case-display-path* *text-editor-case-display-files* :action action :verbose verbose) (pushnew :text-editor-case-display *features*) (pushnew :text-editor-case-display qrg:*modules-loaded*)) :done)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End Of Code