I had this problem that with several large java classes the
jde-debug-toggle-breakpoint function didn't work and tried to set
breakpoints like ":434" instead of "Myclass:434". I traced the problem
to the c-parse-state function used in
jde-parse-get-innermost-class-at-point function. Apparently
c-parse-state has some issues with big classes (CC mode version
5.31.5): sometimes it "forgets" to return the opening class parenthesis
position (especially when you go towards the end of the buffer).
Here's my attempt to workaround this in jdee (I gave up trying to find what the problem is in cc-mode):
(defun jde-parse-get-innermost-class-at-point ()
"Get the innermost class containing point.
If point is in a class, this function returns
(CLASS_NAME . CLASS_POSITION). CLASS_NAME is the
name of the class. For anonymous classes it is
the unqualified name of the superclass. CLASS_POSITION
is the position of the first character of the class
or interface keyword or the first character
of the new keyword in case of anonymous classes.
Returns nil, if point is not in a class."
(let ((tag (semantic-current-tag-of-class 'type)))
;; (class-name (semantic-tag-name tag))
(class-pos (semantic-tag-start tag))
;; This could be problematic in case a comment is embedded in the class declaration
(if (and class-pos (> (point) block-pos))
(re-search-backward jde-parse-class-decl-re class-pos t)
(cons (match-string-no-properties 2)
I also had to change jde-parse-class-decl-re like this:
;;; ;; comments, string literals, keywords, identifier,
;;; ;; assignment operator or open parenthese:
;;; "\\(?:" jde-parse-java-comment-or-ws-re "\\|[a-zA-Z0-9_.=(]\\)*"
;; keyword before classname:
"\\(?:" jde-parse-java-comment-or-ws-re "\\)+"
;; package part of superclass of anonymous class:
;; everything between classname and curly brace:
"\\(?:" jde-parse-java-comment-or-ws-re "\\|[a-zA-Z0-9_.,()]\\)*"
"Regular expression matching class declarations before point.
Point must be at opening curly brace of class.
It matches interfaces, named and anonymous classes.")
It did the trick in my case.
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr