mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
full project support
This commit is contained in:
parent
9a7607dfb4
commit
2befb3ff46
6 changed files with 258 additions and 107 deletions
|
|
@ -1,11 +1,16 @@
|
|||
|
||||
(in-package "CLOG-TOOLS")
|
||||
(defclass projects (clog:clog-panel)
|
||||
((unload-project-button :reader unload-project-button)
|
||||
(new-project-button :reader new-project-button)
|
||||
(designtime-delete :reader designtime-delete)
|
||||
(designtime-add-lisp :reader designtime-add-lisp)
|
||||
(designtime-add-clog :reader designtime-add-clog)
|
||||
(runtime-delete :reader runtime-delete)
|
||||
(runtime-add-lisp :reader runtime-add-lisp)
|
||||
(designtime-list :reader designtime-list)
|
||||
(runtime-list :reader runtime-list)
|
||||
(runtime-list :reader runtime-list) (dbl-click2 :reader dbl-click2)
|
||||
(designtime-label :reader designtime-label)
|
||||
(dbl-click1 :reader dbl-click1)
|
||||
(runtime-label :reader runtime-label) (edit-asd :reader edit-asd)
|
||||
(project-list :reader project-list)
|
||||
(projects-label :reader projects-label)))
|
||||
|
|
@ -14,36 +19,57 @@
|
|||
(let ((panel
|
||||
(change-class
|
||||
(clog:create-div clog-obj :content
|
||||
"<label for=\"undefined\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 6.99858px;\" id=\"CLOGB3868394887\" data-clog-name=\"projects-label\">Current Project</label><select style=\"box-sizing: content-box; position: absolute; left: 5px; top: 35px; width: 386.54px; height: 22px; bottom: 309.041px;\" id=\"CLOGB3868394888\" data-clog-name=\"project-list\"></select><button style=\"box-sizing: content-box; position: absolute; left: 400px; top: 32px; height: 22px; width: 90px;\" id=\"CLOGB3868394889\" data-clog-name=\"edit-asd\">Edit .asd</button><label for=\"CLOGB3868393710\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 64.9943px;\" id=\"CLOGB3868394890\" data-clog-name=\"runtime-label\">Runtime System</label><label for=\"CLOGB3868393704\" style=\"box-sizing: content-box; position: absolute; left: 290.007px; top: 66.9986px;\" id=\"CLOGB3868394891\" data-clog-name=\"designtime-label\">Design Time System (/tools)</label><select size=\"4\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 95px; width: 265px; height: 196px;\" id=\"CLOGB3868394892\" data-clog-name=\"runtime-list\"></select><select size=\"4\" style=\"box-sizing: content-box; position: absolute; left: 290.007px; top: 96px; width: 265px; height: 195.545px;\" id=\"CLOGB3868394893\" data-clog-name=\"designtime-list\"></select><button style=\"box-sizing: content-box; position: absolute; left: 520px; top: 9.99574px; width: 100px; height: 22px;\" id=\"CLOGB3868394899\" data-clog-name=\"new-project-button\">New</button><button style=\"box-sizing: content-box; position: absolute; left: 520px; top: 44.9957px; width: 100px; height: 22px; bottom: 309.041px;\" id=\"CLOGB3868394900\" data-clog-name=\"unload-project-button\">Unload</button>"
|
||||
"<label for=\"undefined\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 6.99858px;\" id=\"CLOGB3868475339\" data-clog-name=\"projects-label\">Current Project</label><select style=\"box-sizing: content-box; position: absolute; left: 5px; top: 35px; width: 386.54px; height: 22px; bottom: 309.041px;\" id=\"CLOGB3868475340\" data-clog-name=\"project-list\"></select><button style=\"box-sizing: content-box; position: absolute; left: 400px; top: 32px; height: 22px; width: 90px;\" id=\"CLOGB3868475341\" data-clog-name=\"edit-asd\">Edit .asd</button><label for=\"CLOGB3868393710\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 65px;\" id=\"CLOGB3868475342\" data-clog-name=\"runtime-label\">Runtime System</label><label for=\"CLOGB3868452429\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 85px;\" id=\"CLOGB3868475343\" data-clog-name=\"dbl-click1\">(double click to launch)</label><label for=\"CLOGB3868393704\" style=\"box-sizing: content-box; position: absolute; left: 290.007px; top: 65px;\" id=\"CLOGB3868475344\" data-clog-name=\"designtime-label\">Design Time System (/tools)</label><label for=\"CLOGB3868452430\" style=\"box-sizing: content-box; position: absolute; left: 290px; top: 85px;\" id=\"CLOGB3868475345\" data-clog-name=\"dbl-click2\">(double click to launch)</label><select size=\"4\" style=\"box-sizing: content-box; position: absolute; left: 5px; top: 115px; width: 265px; height: 196px;\" id=\"CLOGB3868475346\" data-clog-name=\"runtime-list\"></select><select size=\"4\" style=\"box-sizing: content-box; position: absolute; left: 290px; top: 115px; width: 265px; height: 195.545px;\" id=\"CLOGB3868475347\" data-clog-name=\"designtime-list\"></select><button style=\"box-sizing: content-box; position: absolute; left: 5px; top: 320px;\" id=\"CLOGB3868475348\" data-clog-name=\"runtime-add-lisp\">Add .lisp</button><button style=\"box-sizing: content-box; position: absolute; left: 92.9801px; top: 320px; width: 65px; height: 22px;\" id=\"CLOGB3868475349\" data-clog-name=\"runtime-delete\">Remove</button><button style=\"box-sizing: content-box; position: absolute; left: 290px; top: 320px;\" id=\"CLOGB3868475350\" data-clog-name=\"designtime-add-clog\">Add .clog</button><button style=\"box-sizing: content-box; position: absolute; left: 385px; top: 320px;\" id=\"CLOGB3868475351\" data-clog-name=\"designtime-add-lisp\">Add .lisp</button><button style=\"box-sizing: content-box; position: absolute; left: 473px; top: 320px; width: 65px; height: 22px;\" id=\"CLOGB3868475352\" data-clog-name=\"designtime-delete\">Remove</button><button style=\"box-sizing: content-box; position: absolute; left: 520px; top: 9.99574px; width: 100px; height: 22px;\" id=\"CLOGB3868475353\" data-clog-name=\"new-project-button\">New</button><button style=\"box-sizing: content-box; position: absolute; left: 520px; top: 44.9957px; width: 100px; height: 22px; bottom: 309.041px;\" id=\"CLOGB3868475354\" data-clog-name=\"unload-project-button\">Unload</button>"
|
||||
:hidden hidden :class class :html-id html-id
|
||||
:auto-place auto-place)
|
||||
'projects)))
|
||||
(setf (slot-value panel 'unload-project-button)
|
||||
(attach-as-child clog-obj "CLOGB3868394900" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475354" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'new-project-button)
|
||||
(attach-as-child clog-obj "CLOGB3868394899" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475353" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'designtime-delete)
|
||||
(attach-as-child clog-obj "CLOGB3868475352" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'designtime-add-lisp)
|
||||
(attach-as-child clog-obj "CLOGB3868475351" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'designtime-add-clog)
|
||||
(attach-as-child clog-obj "CLOGB3868475350" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'runtime-delete)
|
||||
(attach-as-child clog-obj "CLOGB3868475349" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'runtime-add-lisp)
|
||||
(attach-as-child clog-obj "CLOGB3868475348" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'designtime-list)
|
||||
(attach-as-child clog-obj "CLOGB3868394893" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475347" :clog-type
|
||||
'clog:clog-select :new-id t))
|
||||
(setf (slot-value panel 'runtime-list)
|
||||
(attach-as-child clog-obj "CLOGB3868394892" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475346" :clog-type
|
||||
'clog:clog-select :new-id t))
|
||||
(setf (slot-value panel 'dbl-click2)
|
||||
(attach-as-child clog-obj "CLOGB3868475345" :clog-type
|
||||
'clog:clog-label :new-id t))
|
||||
(setf (slot-value panel 'designtime-label)
|
||||
(attach-as-child clog-obj "CLOGB3868394891" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475344" :clog-type
|
||||
'clog:clog-label :new-id t))
|
||||
(setf (slot-value panel 'dbl-click1)
|
||||
(attach-as-child clog-obj "CLOGB3868475343" :clog-type
|
||||
'clog:clog-label :new-id t))
|
||||
(setf (slot-value panel 'runtime-label)
|
||||
(attach-as-child clog-obj "CLOGB3868394890" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475342" :clog-type
|
||||
'clog:clog-label :new-id t))
|
||||
(setf (slot-value panel 'edit-asd)
|
||||
(attach-as-child clog-obj "CLOGB3868394889" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475341" :clog-type
|
||||
'clog:clog-button :new-id t))
|
||||
(setf (slot-value panel 'project-list)
|
||||
(attach-as-child clog-obj "CLOGB3868394888" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475340" :clog-type
|
||||
'clog:clog-select :new-id t))
|
||||
(setf (slot-value panel 'projects-label)
|
||||
(attach-as-child clog-obj "CLOGB3868394887" :clog-type
|
||||
(attach-as-child clog-obj "CLOGB3868475339" :clog-type
|
||||
'clog:clog-label :new-id t))
|
||||
(let ((target (projects-label panel)))
|
||||
(declare (ignorable target))
|
||||
|
|
@ -58,11 +84,21 @@
|
|||
(setf (attribute target "for")
|
||||
(clog:js-query target
|
||||
"$('[data-clog-name=\\'runtime-list\\']').attr('id')")))
|
||||
(let ((target (dbl-click1 panel)))
|
||||
(declare (ignorable target))
|
||||
(setf (attribute target "for")
|
||||
(clog:js-query target
|
||||
"$('[data-clog-name=\\'runtime-list\\']').attr('id')")))
|
||||
(let ((target (designtime-label panel)))
|
||||
(declare (ignorable target))
|
||||
(setf (attribute target "for")
|
||||
(clog:js-query target
|
||||
"$('[data-clog-name=\\'designtime-list\\']').attr('id')")))
|
||||
(let ((target (dbl-click2 panel)))
|
||||
(declare (ignorable target))
|
||||
(setf (attribute target "for")
|
||||
(clog:js-query target
|
||||
"$('[data-clog-name=\\'designtime-list\\']').attr('id')")))
|
||||
(clog:set-on-change (project-list panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
|
|
@ -86,6 +122,48 @@
|
|||
(format nil "~A/tools"
|
||||
(text-value (project-list panel)))
|
||||
target)))
|
||||
(clog:set-on-click (runtime-add-lisp panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
(let ((sys (text-value (project-list panel))))
|
||||
(projects-add-lisp panel sys))))
|
||||
(clog:set-on-click (runtime-delete panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
(let ((sys (text-value (project-list panel)))
|
||||
(file (select-text (runtime-list panel))))
|
||||
(unless (equal file "")
|
||||
(setf file (subseq file 0 (- (length file) 5)))
|
||||
(remove-file-from-defsystem sys file :file)
|
||||
(projects-populate panel)))))
|
||||
(clog:set-on-click (designtime-add-clog panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
(let ((sys (text-value (project-list panel))))
|
||||
(projects-add-clog panel sys))))
|
||||
(clog:set-on-click (designtime-add-lisp panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
(let ((sys
|
||||
(format nil "~A/tools"
|
||||
(text-value (project-list panel)))))
|
||||
(projects-add-lisp panel sys))))
|
||||
(clog:set-on-click (designtime-delete panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
(let ((sys
|
||||
(format nil "~A/tools"
|
||||
(text-value (project-list panel))))
|
||||
(file (select-text (designtime-list panel)))
|
||||
ext)
|
||||
(unless (equal file "")
|
||||
(setf ext (subseq file (- (length file) 5)))
|
||||
(setf file (subseq file 0 (- (length file) 5)))
|
||||
(remove-file-from-defsystem sys file
|
||||
(if (equalp ext ".clog")
|
||||
:clog-file
|
||||
:file))
|
||||
(projects-populate panel)))))
|
||||
(clog:set-on-click (new-project-button panel)
|
||||
(lambda (target)
|
||||
(declare (ignorable target))
|
||||
|
|
@ -97,4 +175,4 @@
|
|||
(asdf/system-registry:clear-system sel)
|
||||
(setf (text-value (project-list panel)) "None")
|
||||
(projects-populate panel))))
|
||||
panel))
|
||||
panel))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue