Function: smart-java

smart-java is an autoloaded, interactive and byte-compiled function defined in hmouse-tag.el.

Signature

(smart-java &optional IDENTIFIER NEXT)

Documentation

Jump to the definition of optional Java IDENTIFIER or the one at point.

Optional second arg NEXT means jump to next matching Java tag.

It assumes that its caller has already checked that the key was pressed in an appropriate buffer and has moved the cursor to the selected buffer.

See the documentation for smart-java-oo-browser for the behavior of this function when the OO-Browser has been loaded. Otherwise:
 (1) within a commented @see cross-reference, the referent is displayed;
 (2) on a package or import statement, the referent is displayed;
     Look for referent files in the directory list smart-java-package-path;
 (3) on a Java identifier, the identifier definition is displayed,
     assuming the identifier is found within an etags generated tag file
     in the current directory or any of its ancestor directories.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-tag.el
;;;###autoload
(defun smart-java (&optional identifier next)
  "Jump to the definition of optional Java IDENTIFIER or the one at point.
Optional second arg NEXT means jump to next matching Java tag.

It assumes that its caller has already checked that the key was pressed in an
appropriate buffer and has moved the cursor to the selected buffer.

See the documentation for `smart-java-oo-browser' for the behavior of this
function when the OO-Browser has been loaded.
Otherwise:
 (1) within a commented @see cross-reference, the referent is displayed;
 (2) on a `package' or `import' statement, the referent is displayed;
     Look for referent files in the directory list `smart-java-package-path';
 (3) on a Java identifier, the identifier definition is displayed,
     assuming the identifier is found within an `etags' generated tag file
     in the current directory or any of its ancestor directories."

  (interactive)
  (if (fboundp 'java-to-definition)
      ;; Only fboundp if the OO-Browser has been loaded.
      (smart-java-oo-browser)
    (or (if identifier nil (or (smart-java-cross-reference) (smart-java-packages)))
	(smart-java-tag identifier next))))