Mercurial > hg > xemacs-beta
comparison lisp/oobr/br-java.el @ 100:4be1180a9e89 r20-1b2
Import from CVS: tag r20-1b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:15:11 +0200 |
parents | 131b0175ea99 |
children |
comparison
equal
deleted
inserted
replaced
99:2d83cbd90d8d | 100:4be1180a9e89 |
---|---|
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: Motorola Inc. | 9 ;; ORG: InfoDock Associates |
10 ;; | 10 ;; |
11 ;; ORIG-DATE: 01-Aug-95 | 11 ;; ORIG-DATE: 01-Aug-95 |
12 ;; LAST-MOD: 4-Oct-95 at 13:31:43 by Bob Weiner | 12 ;; LAST-MOD: 20-Feb-97 at 07:33:18 by Bob Weiner |
13 ;; | 13 ;; |
14 ;; Copyright (C) 1995 Free Software Foundation, Inc. | 14 ;; Copyright (C) 1995, 1996, 1997 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) | |
76 ;; Static initializers confuse the parser and don't define anything | 71 ;; Static initializers confuse the parser and don't define anything |
77 ;; that we need, so remove them. | 72 ;; that we need, so remove them. |
78 (java-strip-static-code) | 73 (java-strip-static-code) |
79 ;; Is more than one package statement allowed? | 74 ;; Is more than one package statement allowed? |
80 (setq java-package-name (java-get-package-name)) | 75 (setq java-package-name (java-get-package-name)) |
160 (setq s (substring s (match-end 0))) | 155 (setq s (substring s (match-end 0))) |
161 (setq words (cons tmp words))))) | 156 (setq words (cons tmp words))))) |
162 (hash-add words java-package-name java-package-htable)))) | 157 (hash-add words java-package-name java-package-htable)))) |
163 | 158 |
164 (defun java-normalize-class-name (name) | 159 (defun java-normalize-class-name (name) |
165 "Convert class NAME to make it globally unique using current package." | 160 "Normalize class NAME to include the package name that defines it." |
166 ;; Currently incomplete. THe defined class has a package name, but | 161 ;; Currently incomplete. The defined class has a package name, but |
167 ;; the parents do not. How do we match the parents to the correct | 162 ;; the parents do not. How do we match the parents to the correct |
168 ;; class if there are multiple matches? | 163 ;; class if there are multiple matches? |
169 (or (car (java-split-identifier name)) | 164 (or (car (java-split-identifier name)) |
170 (if (null java-package-name) | 165 (if (null java-package-name) |
171 (car (java-split-identifier name)) | 166 (car (java-split-identifier name)) |
287 ;;; ************************************************************************ | 282 ;;; ************************************************************************ |
288 ;;; Internal variables | 283 ;;; Internal variables |
289 ;;; ************************************************************************ | 284 ;;; ************************************************************************ |
290 | 285 |
291 (defconst java-class-modifier-keyword | 286 (defconst java-class-modifier-keyword |
292 "\\(public\\|protected\\|final\\|abstract\\|[ \t\n\^M]+\\)*") | 287 "\\(public\\|final\\|abstract\\|[ \t\n\^M]+\\)*") |
293 | 288 |
294 (defconst java-class-name-before | 289 (defconst java-class-name-before |
295 (concat "^[ \t]*" java-class-modifier-keyword java-class-keyword) | 290 (concat "^[ \t]*" java-class-modifier-keyword java-class-keyword) |
296 "Regexp preceding the class name in a class definition.") | 291 "Regexp preceding the class name in a class definition.") |
297 | 292 |