Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(possible) fix for jdibug-source-file-to-class-signature to include package name #23

Open
GoogleCodeExporter opened this issue Apr 30, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

When adding a breakpoint for an android application classes-by-signature 
returned nothing.
It seems that it requires the full package and class name to find something.
So toggling a breakpoint always ended with 'JDIbug setting 
breakpoint...pending' instead of ...done. Using this function made it work for 
me. (with borrowed code from jde to get package name) 

(defun jdibug-source-file-to-class-signature (source-file)
  "Converts a source file to a JNI class name."
  (let ((buf source-file)
    (packages (semantic-brute-find-tag-by-class 'package (current-buffer)))
    (class-name (file-name-sans-extension
             (file-name-nondirectory (buffer-file-name)))))
    (when (and (listp packages) (eq (length packages) 1))
      (setf buf (concat (semantic-tag-name (car packages)) "." class-name))
      (setf buf (jdi-class-name-to-class-signature buf)))
    (jdibug-trace "jdi-source-to-class-signature : %s -> %s" source-file buf)
    buf))

(I'm pretty much beginner with elisp (and java), so there are probably other 
issues the above code)



Original issue reported on code.google.com by hannes.j...@googlemail.com on 15 Oct 2011 at 1:08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant