Function: semantic-get-local-variables-java-mode

semantic-get-local-variables-java-mode is a byte-compiled function defined in java-tags.el.gz.

Signature

(semantic-get-local-variables-java-mode)

Documentation

Get local values from a specific context.

Parse the current context for field_declaration nonterminals to collect tags, such as local variables or prototypes. This function override get-local-variables. Override semantic-get-local-variables in java-mode buffers.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/wisent/java-tags.el.gz
;;;;
;;;; Local context
;;;;

(define-mode-local-override semantic-get-local-variables
  java-mode ()
  "Get local values from a specific context.
Parse the current context for `field_declaration' nonterminals to
collect tags, such as local variables or prototypes.
This function override `get-local-variables'."
  (let ((vars nil)
	(ct (semantic-current-tag))
        ;; We want nothing to do with funny syntaxing while doing this.
        (semantic-unmatched-syntax-hook nil))
    (while (not (semantic-up-context (point) 'function))
      (save-excursion
        (forward-char 1)
        (setq vars
              (append (semantic-parse-region
                       (point)
                       (save-excursion (semantic-end-of-context) (point))
                       'field_declaration
                       0 t)
                      vars))))
    ;; Add 'this' if in a fcn
    (when (semantic-tag-of-class-p ct 'function)
      ;; Append a new tag THIS into our space.
      (setq vars (cons (semantic-tag-new-variable
			"this" (semantic-tag-name (semantic-current-tag-parent))
			nil)
		       vars)))
    vars))