mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-17 13:33:36 -05:00
lang/java: fix java namespace resolution #1098
Now uses slightly more sophisticated namespace resolution when populating the *.java file template.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
(defun yas-java-project-package ()
|
||||
(if (eq major-mode 'java-mode)
|
||||
(s-chop-suffix "." (s-replace "/" "." (f-dirname (f-relative (buffer-file-name)
|
||||
(concat (narf/project-root) "/src/")))))
|
||||
""))
|
||||
(or (and (eq major-mode 'java-mode)
|
||||
(+java-current-package))
|
||||
""))
|
||||
|
||||
(defun yas-java-class-name ()
|
||||
(if (eq major-mode 'java-mode)
|
||||
(f-no-ext (f-base (buffer-file-name)))
|
||||
""))
|
||||
|
||||
(or (and (eq major-mode 'java-mode)
|
||||
(+java-current-class))
|
||||
""))
|
||||
|
Reference in New Issue
Block a user