comparison lisp/oobr/br-java.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 4103f0995bd7
children 4be1180a9e89
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
4 ;; SUMMARY: Support routines for Java inheritance browsing. 4 ;; SUMMARY: Support routines for Java inheritance browsing.
5 ;; USAGE: GNU Emacs Lisp Library 5 ;; USAGE: GNU Emacs Lisp Library
6 ;; KEYWORDS: c, oop, tools 6 ;; KEYWORDS: c, oop, tools
7 ;; 7 ;;
8 ;; AUTHOR: Bob Weiner 8 ;; AUTHOR: Bob Weiner
9 ;; ORG: InfoDock Associates 9 ;; ORG: Motorola Inc.
10 ;; 10 ;;
11 ;; ORIG-DATE: 01-Aug-95 11 ;; ORIG-DATE: 01-Aug-95
12 ;; LAST-MOD: 20-Feb-97 at 07:33:18 by Bob Weiner 12 ;; LAST-MOD: 4-Oct-95 at 13:31:43 by Bob Weiner
13 ;; 13 ;;
14 ;; Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. 14 ;; Copyright (C) 1995 Free Software Foundation, Inc.
15 ;; See the file BR-COPY for license information. 15 ;; See the file BR-COPY for license information.
16 ;; 16 ;;
17 ;; This file is part of the OO-Browser. 17 ;; This file is part of the OO-Browser.
18 ;; 18 ;;
19 ;; DESCRIPTION: 19 ;; DESCRIPTION:
66 class-name-end classes class has-parents open-brace-point end 66 class-name-end classes class has-parents open-brace-point end
67 parents-start parents parent-cons parent-list signatures) 67 parents-start parents parent-cons parent-list signatures)
68 (if no-kill 68 (if no-kill
69 (set-buffer no-kill) 69 (set-buffer no-kill)
70 (funcall br-view-file-function filename)) 70 (funcall br-view-file-function filename))
71 ;; Don't bother saving anything for this temporary buffer
72 (buffer-disable-undo (current-buffer))
73 (setq buffer-auto-save-file-name nil)
74 ;; Make life simpler
75 (br-lang-mode)
71 ;; Static initializers confuse the parser and don't define anything 76 ;; Static initializers confuse the parser and don't define anything
72 ;; that we need, so remove them. 77 ;; that we need, so remove them.
73 (java-strip-static-code) 78 (java-strip-static-code)
74 ;; Is more than one package statement allowed? 79 ;; Is more than one package statement allowed?
75 (setq java-package-name (java-get-package-name)) 80 (setq java-package-name (java-get-package-name))
155 (setq s (substring s (match-end 0))) 160 (setq s (substring s (match-end 0)))
156 (setq words (cons tmp words))))) 161 (setq words (cons tmp words)))))
157 (hash-add words java-package-name java-package-htable)))) 162 (hash-add words java-package-name java-package-htable))))
158 163
159 (defun java-normalize-class-name (name) 164 (defun java-normalize-class-name (name)
160 "Normalize class NAME to include the package name that defines it." 165 "Convert class NAME to make it globally unique using current package."
161 ;; Currently incomplete. The defined class has a package name, but 166 ;; Currently incomplete. THe defined class has a package name, but
162 ;; the parents do not. How do we match the parents to the correct 167 ;; the parents do not. How do we match the parents to the correct
163 ;; class if there are multiple matches? 168 ;; class if there are multiple matches?
164 (or (car (java-split-identifier name)) 169 (or (car (java-split-identifier name))
165 (if (null java-package-name) 170 (if (null java-package-name)
166 (car (java-split-identifier name)) 171 (car (java-split-identifier name))
282 ;;; ************************************************************************ 287 ;;; ************************************************************************
283 ;;; Internal variables 288 ;;; Internal variables
284 ;;; ************************************************************************ 289 ;;; ************************************************************************
285 290
286 (defconst java-class-modifier-keyword 291 (defconst java-class-modifier-keyword
287 "\\(public\\|final\\|abstract\\|[ \t\n\^M]+\\)*") 292 "\\(public\\|protected\\|final\\|abstract\\|[ \t\n\^M]+\\)*")
288 293
289 (defconst java-class-name-before 294 (defconst java-class-name-before
290 (concat "^[ \t]*" java-class-modifier-keyword java-class-keyword) 295 (concat "^[ \t]*" java-class-modifier-keyword java-class-keyword)
291 "Regexp preceding the class name in a class definition.") 296 "Regexp preceding the class name in a class definition.")
292 297