malabar-mode
malabar-mode copied to clipboard
trying to import classes (C-v C-v C-z on Java symbol) gives error
Hi,
I am using I think the latest version on Semantic (semantic-version gives me '2.2') but still I am getting Invalid function: semantic-find-tags-by-class when I try to import the class when editing Java files.
Full debug message when it happens:
Debugger entered--Lisp error: (invalid-function semantic-find-tags-by-class)
semantic-find-tags-by-class(type (("int_.nato.nc3a.services.common.interceptor" package nil nil #<overlay from 1 to 52 in MyCxfSoapOutInterceptor.java>) ("org.apache.cxf.interceptor.LoggingMessage" include nil nil #<overlay from 54 to 103 in MyCxfSoapOutInterceptor.java>) ("org.apache.cxf.interceptor.LoggingOutInterceptor" include nil nil #<overlay from 104 to 160 in MyCxfSoapOutInterceptor.java>) ("org.slf4j.LoggerFactory" include nil nil #<overlay from 162 to 193 in MyCxfSoapOutInterceptor.java>) ("org.slf4j.Logger" include nil nil #<overlay from 194 to 218 in MyCxfSoapOutInterceptor.java>) ("MyCxfSoapOutInterceptor" type (:typemodifiers ("public") :superclasses "LoggingOutInterceptor" :members (("LOG" variable (:typemodifiers ("private" "final") :type "Logger") (reparse-symbol class_member_declaration) #<overlay from 292 to 360 in MyCxfSoapOutInterceptor.java>) ("MyCxfSoapOutInterceptor" function (:constructor-flag t :typemodifiers ("public")) (reparse-symbol class_member_declaration) #<overlay from 364 to 415 in MyCxfSoapOutInterceptor.java>) ("formatLoggingMessage" function (:typemodifiers ("protected") :arguments (("loggingMessage" variable ... ... #<overlay from 469 to 498 in MyCxfSoapOutInterceptor.java>)) :type "String") (reparse-symbol class_member_declaration) #<overlay from 431 to 777 in MyCxfSoapOutInterceptor.java>)) :type "class") nil #<overlay from 220 to 779 in MyCxfSoapOutInterceptor.java>) ("LOG" variable (:typemodifiers ("private" "final") :type "Logger") (reparse-symbol class_member_declaration) #<overlay from 292 to 360 in MyCxfSoapOutInterceptor.java>) ("MyCxfSoapOutInterceptor" function (:constructor-flag t :typemodifiers ("public")) (reparse-symbol class_member_declaration) #<overlay from 364 to 415 in MyCxfSoapOutInterceptor.java>) ("formatLoggingMessage" function (:typemodifiers ("protected") :arguments (("loggingMessage" variable (:type "LoggingMessage") (reparse-symbol formal_parameters) #<overlay from 469 to 498 in MyCxfSoapOutInterceptor.java>)) :type "String") (reparse-symbol class_member_declaration) #<overlay from 431 to 777 in MyCxfSoapOutInterceptor.java>) ("loggingMessage" variable (:type "LoggingMessage") (reparse-symbol formal_parameters) #<overlay from 469 to 498 in MyCxfSoapOutInterceptor.java>)))
malabar--type-tags-in-buffer(nil)
malabar-class-defined-in-buffer-p("Logger")
malabar-import-one-class("Logger")
call-interactively(malabar-import-one-class nil nil)
command-execute(malabar-import-one-class)
Someone else also reports on Stack Overflow similar problem : http://stackoverflow.com/questions/15223929/eassist-function-tags-invalid-function-semantic-find-tags-by-class
Interestingly, I do have this function defined in my CEDET version. Strange...
Try S-M-: and enter (symbol-function 'semantic-find-tags-by-class) and tell me what you get. I get
(macro . #[(class &optional table) "ÂÃÄBB E" [class table semantic--find-tags-by-macro eq (...)] 4 ("c:/Users/lpmsmith/projects/cedet/lisp/cedet/semantic/find.elc" . 7881)])
Hi, I have something similar:
(macro . #[(class &optional table) "ÂÃÄBB E" [class table semantic--find-tags-by-macro eq (...)] 4 ("/home/luke/.emacs.d/el-get/cedet/lisp/cedet/semantic/find.elc" . 7881)])
The macro is available; I have no clue why I am getting this message :/
Looking at this again it looks similar to http://stackoverflow.com/questions/6432966/why-doesnt-application-of-function-returned-by-elisp-macro-work except the macro expands a let rather than a function
(let
((tags (semantic-something-to-tag-table scope)) (result nil))
(while tags (and (eq class (semantic-tag-class (car tags))) (setq result (cons (car tags) result))) (setq tags (cdr tags)))
(nreverse result)