1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
Make paths of directories and jar files configurable.
Part of this patch was taken from Debian and heavily modified, see:
http://patch-tracking.debian.net/patch/series/view/jde/2.3.5.1-5/0005-Set-the-location-of-needed-files-for-beanshell.el-an.patch
--- jde-orig/lisp/beanshell.el
+++ jde/lisp/beanshell.el
@@ -891,14 +891,21 @@
(add-to-list 'auto-mode-alist '("\\.bsh\\'" . bsh-script-mode))
+(defcustom bsh-html-directory
+ (let ((jde-dir (jde-find-jde-doc-directory)))
+ (if jde-dir
+ (expand-file-name "doc/html/bsh-ug" jde-dir)))
+ "Directory of the beanshell HTML documentation."
+ :group 'bsh
+ :type 'directory)
+
;;;###autoload
(defun bsh-script-help ()
"Display BeanShell User's Guide."
(interactive)
- (let* ((jde-dir (jde-find-jde-doc-directory))
- (bsh-help
- (if jde-dir
- (expand-file-name "doc/html/bsh-ug/bsh-ug.html" jde-dir))))
+ (let ((bsh-help
+ (if bsh-html-directory
+ (expand-file-name "bsh-ug.html" bsh-html-directory))))
(if (and
bsh-help
(file-exists-p bsh-help))
--- jde-orig/lisp/jde-bsh.el
+++ jde/lisp/jde-bsh.el
@@ -91,22 +91,59 @@
"The single instance of the JDEE's BeanShell."))
"Class of JDEE BeanShells. There is only one per Emacs session.")
+(defcustom jde-java-directory
+ (expand-file-name "java" (jde-find-jde-data-directory))
+ "Top-level directory of JDE Java files."
+ :group 'jde-project
+ :type 'directory)
+
+(defcustom jde-bsh-commands-directory
+ (expand-file-name "bsh-commands" jde-java-directory)
+ "Directory of beanshell commands."
+ :group 'bsh
+ :type 'directory)
+
+(defcustom jde-classes-directory
+ (expand-file-name "classes" jde-java-directory)
+ "Directory of JDE classes."
+ :group 'jde-project
+ :type 'directory)
+
+(defcustom jde-checkstyle-jar-file
+ (expand-file-name "lib/checkstyle-all.jar" jde-java-directory)
+ "Path of the checkstyle-jar file."
+ :group 'jde-project
+ :type 'file)
+
+(defcustom jde-regexp-jar-file
+ (expand-file-name "lib/jakarta-regexp.jar" jde-java-directory)
+ "Path of the regexp-jar file."
+ :group 'jde-project
+ :type 'file)
+
+(defcustom jde-jde-jar-file
+ (expand-file-name "lib/jde.jar" jde-java-directory)
+ "Path of the jde-jar file."
+ :group 'jde-project
+ :type 'file)
+
+(defcustom jde-bsh-jar-file
+ (expand-file-name "lib/bsh.jar" jde-java-directory)
+ "Path of the bsh-jar file."
+ :group 'jde-project
+ :type 'file)
+
(defmethod initialize-instance ((this jde-bsh) &rest fields)
"Constructor for the JDEE BeanShell instance."
(call-next-method)
- (let* ((jde-java-directory
- (concat
- (jde-find-jde-data-directory)
- "java/")))
-
- (oset this bsh-cmd-dir (expand-file-name "bsh-commands" jde-java-directory))
- (oset this checkstyle-jar (expand-file-name "lib/checkstyle-all.jar" jde-java-directory))
- (oset this regexp-jar (expand-file-name "lib/jakarta-regexp.jar" jde-java-directory))
- (oset this jde-classes-dir (expand-file-name "classes" jde-java-directory))
- (oset this jde-jar (expand-file-name "lib/jde.jar" jde-java-directory))
- (oset this jar (expand-file-name "lib/bsh.jar" jde-java-directory))
- (oset this separate-error-buffer jde-bsh-separate-buffer)
- (oset-default 'jde-bsh the-bsh this)))
+ (oset this bsh-cmd-dir jde-bsh-commands-directory)
+ (oset this checkstyle-jar jde-checkstyle-jar-file)
+ (oset this regexp-jar jde-regexp-jar-file)
+ (oset this jde-classes-dir jde-classes-directory)
+ (oset this jde-jar jde-jde-jar-file)
+ (oset this jar jde-bsh-jar-file)
+ (oset this separate-error-buffer jde-bsh-separate-buffer)
+ (oset-default 'jde-bsh the-bsh this))
(defmethod bsh-create-buffer ((this jde-bsh))
"Creates the JDEE's beanshell buffer."
@@ -150,6 +187,7 @@
(jde-get-tools-jar)
(if ant-home (expand-file-name "lib" ant-home)))
(jde-pi-get-bsh-classpath)
+ bsh-classpath
(jde-expand-classpath (jde-get-global-classpath)))))))
;; Create the BeanShell wrapper object.
--- jde-orig/lisp/jde-bug.el
+++ jde/lisp/jde-bug.el
@@ -2438,10 +2438,10 @@
(defun jde-bug-help ()
"Displays the JDEbug User's Guide."
(interactive)
- (let* ((jde-dir (jde-find-jde-doc-directory))
- (jdebug-help
- (if jde-dir
- (expand-file-name "doc/html/jdebug-ug/jdebug-ug.html" jde-dir))))
+ (let ((jdebug-help
+ (if jde-html-directory
+ (expand-file-name "jdebug-ug/jdebug-ug.html"
+ jde-html-directory))))
(if (and
jdebug-help
(file-exists-p jdebug-help))
--- jde-orig/lisp/jde-checkstyle.el
+++ jde/lisp/jde-checkstyle.el
@@ -322,10 +322,6 @@
(vm-path (oref (jde-run-get-vm) :path))
(source-file
(concat (file-name-nondirectory buffer-file-name)))
- (jde-java-directory
- (concat
- (jde-find-jde-data-directory)
- "java/"))
(args (append
(unless jde-checkstyle-expanded-properties-file
(jde-checkstyle-get-property-args this))
@@ -333,13 +329,13 @@
(list "-classpath"
(if jde-checkstyle-classpath
(jde-build-classpath jde-checkstyle-classpath)
- (jde-normalize-path
- (expand-file-name "lib/checkstyle-all.jar" jde-java-directory))))
+ (jde-normalize-path jde-checkstyle-jar-file)))
(list jde-checkstyle-class)
(list "-c"
(if jde-checkstyle-style
(jde-normalize-path jde-checkstyle-style)
- (concat (jde-find-jde-data-directory) "java/lib/sun_checks.xml")))
+ (expand-file-name "lib/sun_checks.xml"
+ jde-java-directory)))
(if jde-checkstyle-expanded-properties-file
(list "-p" (jde-normalize-path jde-checkstyle-expanded-properties-file)))
(if jde-checkstyle-module-package-names-file
--- jde-orig/lisp/jde-dbs.el
+++ jde/lisp/jde-dbs.el
@@ -907,9 +907,6 @@
(jde-normalize-path 'jde-run-working-directory)
source-directory))
(vm (oref (jde-run-get-vm) :path))
- (jde-java-directory
- (expand-file-name "java"
- (jde-find-jde-data-directory)))
(vm-args
(let (args)
(setq args
--- jde-orig/lisp/jde.el
+++ jde/lisp/jde.el
@@ -1722,14 +1722,19 @@
jde.el."
(jde-find-jde-data-directory))
+(defcustom jde-html-directory
+ (expand-file-name "doc/html" (jde-find-jde-doc-directory))
+ "Directory of the JDE HTML documentation."
+ :group 'jde-project
+ :type 'directory)
+
;;;###autoload
(defun jde-show-help ()
"Displays the JDE User's Guide in a browser."
(interactive)
- (let* ((jde-dir (jde-find-jde-doc-directory))
- (jde-help
- (if jde-dir
- (expand-file-name "doc/html/jde-ug/jde-ug.html" jde-dir))))
+ (let ((jde-help
+ (if jde-html-directory
+ (expand-file-name "jde-ug/jde-ug.html" jde-html-directory))))
(if (and
jde-help
(file-exists-p jde-help))
--- jde-orig/lisp/jde-jdb.el
+++ jde/lisp/jde-jdb.el
@@ -1459,10 +1459,10 @@
(defun jde-jdb-help ()
(interactive)
- (let* ((jde-dir (jde-find-jde-doc-directory))
- (jdb-ug-path
- (if jde-dir
- (expand-file-name "doc/html/jdb-ug/jdb-ug-frame.html" jde-dir))))
+ (let ((jdb-ug-path
+ (if jde-html-directory
+ (expand-file-name "jdb-ug/jdb-ug-frame.html"
+ jde-html-directory))))
(if (and
jdb-ug-path
(file-exists-p jdb-ug-path))
|