I'm resending the message below, because I don't think it went through
previously... (sorry if this is a dup)
============================================

  Below is a patch to jde-wiz.el that I have created to add
functionality to automatically sort the list of import
  statements when a new one is programmatically added.  There is a new
custom variable called
  jde-auto-sort-imports that defaults to 't'.  I also added changes to
preserve the current location in the buffer
  when the new statement is added.

  FWIW: Hope someone else finds this useful.


  Regards and Thanks!

  Jason Stell
  ====================================================

  *** jde-wiz.el_orig     Tue Sep 19 00:57:54 2000
  --- jde-wiz.el  Tue Sep 19 08:38:57 2000
  ***************
  *** 38,43 ****
  --- 38,53 ----
    ;; end JVL enhancement contributed by Jim LoVerde <[EMAIL PROTECTED]>


  + ;; auto sorting of import statements
  + (defcustom jde-auto-sort-imports t
  +   "*Automatically resort import statements after a jde-wiz-import.
  + If non-nil, the JDE automatically resorts the import statements when
a new import statement is added using
  jde-wiz-import or jde-wiz-find-and-import."

  +   :group 'jde-project
  +   :type 'boolean
  + )
  + ;;
  +
  +
    (defun jde-wiz-update-class-list()
      "Update the class list used to resolve class names.
    The first time you invoke a JDE wizard, the JDE builds a list of all
classes on the classpath
  ***************
  *** 229,241 ****
          (setq i 0)
          (setq n (length new-imports))
          (while (< i n)
          (let ((new-import
                 (nth i new-imports)))
            (progn
              (insert
               (concat "import " new-import ";\n"))
              (message "Imported %s" new-import))
  !         (setq i (+ i 1)))))))


    (defun jde-wiz-strip-existing-imports (new-imports existing-imports)

  --- 239,255 ----
          (setq i 0)
          (setq n (length new-imports))
          (while (< i n)
  +       (let (deactivate-mark) t)
          (let ((new-import
                 (nth i new-imports)))
            (progn
              (insert
               (concat "import " new-import ";\n"))
              (message "Imported %s" new-import))
  !         (setq i (+ i 1)))
  !       (if jde-auto-sort-imports
  !           (jde-sort-imports))
  !       ))))


    (defun jde-wiz-strip-existing-imports (new-imports existing-imports)


begin:vcard 
n:Stell;Jason
tel;pager:800-724-3329 PIN 382-8028
tel;work:(703) 471-2529
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Jason Stell
end:vcard

Reply via email to