Skip to content

Commit

Permalink
Add progress indication to extend/implement [#19 state:open]
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhw committed Feb 26, 2009
1 parent 37a693c commit 22c0c6f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/lisp/malabar-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,18 @@ in the list")
(or (malabar--public-p class-info)
(equal (malabar-get-package-name) (malabar-get-package-of qualified-class))))

(defun malabar--override-all (methods)
(let ((c-progress-interval nil)
(c-echo-syntactic-information-p nil)
(method-count (length methods))
(counter 0))
(message nil)
(working-status-forms "Overriding methods...%s" nil
(dolist (method methods)
(working-status (/ (* (incf counter) 100) method-count) (malabar--get-name method))
(malabar-override-method method))
(working-status t "done"))))

(defun malabar-implement-interface (&optional interface)
(interactive)
(destructuring-bind (interface qualified-interface interface-info)
Expand All @@ -798,7 +810,7 @@ in the list")
">")))
(unless (eolp)
(newline-and-indent))
(mapc #'malabar-override-method (malabar--get-abstract-methods interface-info))))
(malabar--override-all (malabar--get-abstract-methods interface-info))))

(defun malabar--implement-interface-move-to-insertion-point ()
(malabar-goto-start-of-class)
Expand Down Expand Up @@ -860,7 +872,7 @@ in the list")
(c-indent-defun)
(forward-line 2))
accessible-constructors)
(mapc #'malabar-override-method (malabar--get-abstract-methods class-info)))))))
(malabar--override-all (malabar--get-abstract-methods class-info)))))))

(defun malabar--extend-class-move-to-constructor-insertion-point ()
(let ((class-tag (malabar-get-class-tag-at-point)))
Expand Down

0 comments on commit 22c0c6f

Please sign in to comment.