AW: How to use jikes

2003-08-04 Thread Albert, Jürgen
Create an environment variable with the name JIKESPATH and add tools.jar and
rt.jar to it (just like in the CLASSPATH variable).

 -Ursprüngliche Nachricht-
 Von: Martin Monsorno [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 31. Juli 2003 17:12
 An: [EMAIL PROTECTED]
 Betreff: How to use jikes
 
 
 Hi *,
 
 I want to use jikes to compile my classes, but it complains that it
 does not find the java standard library classes.  The compilation
 buffer says:
 
 ,
 | cd /home/monsorno/java
 | jikes -classpath /home/monsorno/java/lib/bla.jar 
 -sourcepath /home/monsorno/java/src -d 
 /home/monsorno/java/classes Dings.java
 | 
 | Found 2 system errors:
 | 
 | *** Error: Could not find package java/util in:
 | /home/monsorno/java/lib/bla.jar
 `
 
 Must I add $JAVA_HOME/jre/lib/rt.jar manually to my project's
 classpath?  And if yes, how can I use $JAVA_HOME to make it
 independant from my local environment?  Or wouldn't it be better if
 JDEE would add this automatically to the classpath, if jikes is set as
 the compiler?
 
 (I'm using xemacs 21.4.13 on Linux, JDEE 2.2.8 and jikes 1.15)
 
 -- 
 Martin
 


Problems setting ant build directory

2003-08-04 Thread tomasflyer
Hi,

I an occasional JDEE user, using JDEE 2.3.3-beta5 from Cygwin/XFree86 2.0 on Windows 
2000.

I want to use jde-ant as build method, e.g. to get ant target auto-completion. But I 
have not succeeded to set the ant build home to my project top level directory (where 
my build.xml as well as prj.el resides).

Typically the build command starts with a cd to the location of the current Java 
source file and the build.xml is not found. If I set jde-ant-enable-find to off, the 
build.xml is found, but ant is still run from deep down in src file tree.

I have found posts about this earlier in the mail archive, the recommendation then was 
then to use make as build method and give ant as build program. This is my current 
setting, but I have to hard-code the path to my project directory to get it to work as 
I want.

Generally in specifying JDEE directory locations, are there ways to specify paths 
relative to the prj.el and/or build.xml locations that works together with Cygwin path 
translation?

Kind regards

Tomas

__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


RE: Useful helper functions

2003-08-04 Thread Paul Kinnucan
Nascif Abousalh-Neto writes:
  Cool stuff, thanks for sharing.
  
  Would there be a way to implement the try/catch wrapper with a more precise
  catch statement? I guess it would require some introspection on the method
  calls inside the region. Is that information easily available somewhere in
  JDEE, say in the new xref database?
  

The JDEE already includes a function for wrapping a region
in a try-catch form. See the doc string for 
jde-gen-try-catch-wrapper. It does not try to guess the
exception that you want to catch.

- Paul


  Regards,
   Nascif
  
   -Original Message-
   From: Robert Mecklenburg [mailto:[EMAIL PROTECTED] 
   Sent: Monday, July 28, 2003 12:31 AM
   To: JDE Users
   Subject: Useful helper functions
   
   
   Here is some code I've written that seems useful here.  
   Include it in JDEE if you feel any are worthy.  There's quite 
   a span of time represented by these so some use more or less 
   advanced features as my understanding evolved.  If you'd like 
   me to rework them for jdee, give me specific poniters and 
   I'll resubmit with changes.
   
   
   
   (defun insert-fully-qualified-name (name)
 Transform the class name at point into a fully qualified 
   name. This is useful when writing @{link name} and name is 
   not in the import list.
 (interactive (list (read-string Class name:  
   (thing-at-point 'word
 (save-excursion
   (save-window-excursion
 (let* ((full-name (jde-parse-select-qualified-class-name name)))
  (if (not (looking-at \\))
(forward-word -1))
  (kill-word 1)
  (insert-before-markers full-name)
   
   
   (defun make-word-a-link ()
   Transform the class name at point into a javadoc @link.  If 
   the class name does not occur in the current package insert 
   the fully qualified name, too.
 (interactive)
 (if (not (looking-at \\))
 (forward-word -1))
 (insert [EMAIL PROTECTED] )
 (let ((word (buffer-substring (point) (save-excursion 
   (forward-word 1) (point)
   (if (not (file-exists-p (concat word .java)))
  (progn 
(insert-fully-qualified-name word)
(insert   word)))
   (insert })))
   
   
   
   (defun wrap-region-in-try-catch (start end)
 (interactive r)
 (save-excursion
   (goto-char start)
   (beginning-of-line)
   (let (region-ends-with-newline (e (make-marker)))
 (set-marker e end)
 (insert try\n{\n)
 (goto-char e)
 (setq region-ends-with-newline (eolp))
 (if region-ends-with-newline
(insert \n))
 (insert }\ncatch ( Exception error )\n{\n})
 (if (not region-ends-with-newline)
(insert \n))
 (set-marker e (point))
 (goto-char start)
 (forward-line -2)
 (c-indent-region (point) e
   
   
   
   (defun jde-run-with-arguments (arg)
   Run the class in the current buffer.  If a prefix argument 
   is given, prompt for different command line arguments and 
   remember them for subsequent runs.
 (interactive P)
 (if arg
 (jde-run-set-app-args (read-string Enter arguments: )))
 (jde-run nil))
   
   
   
   (defun jde-replace-in-defun (old-word new-word)
   Replace the word under the cursor within the current method.
 (interactive
  (list (read-string Query replace:  (car 
   (semantic-ctxt-current-symbol)))
   (read-string Replace with: )))
 (senator-mark-defun)
 (perform-replace old-word new-word t nil t nil nil (point) (mark)))
   
   
   
   ;;; This uses the hash method from Josh Bloch's Effective 
   Java Programming. (jde-gen-define-abbrev-template hash-code-method
  '(private int hashCode() ' 'n 
{ ''n
int result = 17; ''n
result = result * 37 + /* 
   data member */; ''n
/* Add more result lines 
   here */ ''n
return result; ''n
} '))
   
   (jde-gen-define-abbrev-template equals-method
  '(private boolean equals( 
   Object o ) ' 'n 
{ ''n
if ( this == o ) ''n
{ ''n
return true; ''n
} ''n ''n
if ( ! ( o instanceof 
(file-name-sans-extension
 (file-name-nondirectory 
   buffer-file-name))
 ) ) ''n
 

Re: Implement interface wizard.

2003-08-04 Thread Paul Kinnucan
Ole Arndt writes:
  Andy, Eric, Paul,
  
  [EMAIL PROTECTED] writes:
  
   I'd like to point out that if a method from an interface has no javadoc, the
   javadoc program will copy the documentation from the interface itself.
   Consequently, it might be a reasonable default to generate no javadoc at all
   in the implement interface wizard, or at least to make it optional.
  
  an alternative is to use the [EMAIL PROTECTED] inline tag. A combined
  solution would look like this:
  
  /**
   * [EMAIL PROTECTED]
   *
   * @see package.Class#origMethod
   */
  


The @see tag seems redundant to me. Also please note that @inheritDoc
will not work for JDK releases earlier than JDK 1.4. So I'd like to
offer an alternative proposal:

If the JDK version used to generate the skeleton method implementation
is earlier than 1.4, generate the skeleton without a comment. Otherwise,
generate the skeleton with the following comment:

  /**
* [EMAIL PROTECTED]
*/

- Paul



RE: Implement interface wizard.

2003-08-04 Thread Eric . D . Friedman
Sounds good to me.

-Original Message-
From: Paul Kinnucan [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2003 10:16 AM
To: Ole Arndt
Cc: jde
Subject: Re: Implement interface wizard.


Ole Arndt writes:
  Andy, Eric, Paul,
  
  [EMAIL PROTECTED] writes:
  
   I'd like to point out that if a method from an interface has no
javadoc, the
   javadoc program will copy the documentation from the interface itself.
   Consequently, it might be a reasonable default to generate no javadoc
at all
   in the implement interface wizard, or at least to make it optional.
  
  an alternative is to use the [EMAIL PROTECTED] inline tag. A combined
  solution would look like this:
  
  /**
   * [EMAIL PROTECTED]
   *
   * @see package.Class#origMethod
   */
  


The @see tag seems redundant to me. Also please note that @inheritDoc
will not work for JDK releases earlier than JDK 1.4. So I'd like to
offer an alternative proposal:

If the JDK version used to generate the skeleton method implementation
is earlier than 1.4, generate the skeleton without a comment. Otherwise,
generate the skeleton with the following comment:

  /**
* [EMAIL PROTECTED]
*/

- Paul


RE: Useful helper functions

2003-08-04 Thread Chitale, Sandip V
Paul,

Actually I have a question about region based cflow templates. How do I
use them?

I ask because, with region, as soon as I type first letter of 'if' or
'try' the mark (region) is deactivated.

Or the only way to use the functionality is by marking a region and then
doing one of:

1. M-x jde-gen-try-catch-wrapper RET
2. Bing the function to some key or menu and use that keystroke/menu
selection

Am I missing something here?

cheers,
sandip

 -Original Message-
 From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 04, 2003 9:45 AM
 To: Nascif Abousalh-Neto
 Cc: Robert Mecklenburg; JDE Users
 Subject: RE: Useful helper functions
 
 
 Nascif Abousalh-Neto writes:
   Cool stuff, thanks for sharing.
   
   Would there be a way to implement the try/catch wrapper 
 with a more precise   catch statement? I guess it would 
 require some introspection on the method   calls inside the 
 region. Is that information easily available somewhere in   
 JDEE, say in the new xref database?   
 
 The JDEE already includes a function for wrapping a region
 in a try-catch form. See the doc string for 
 jde-gen-try-catch-wrapper. It does not try to guess the 
 exception that you want to catch.
 
 - Paul
 
 
   Regards,
  Nascif
   
-Original Message-
From: Robert Mecklenburg [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 12:31 AM
To: JDE Users
Subject: Useful helper functions


Here is some code I've written that seems useful here.  
Include it in JDEE if you feel any are worthy.  There's quite 
a span of time represented by these so some use more or less 
advanced features as my understanding evolved.  If you'd like 
me to rework them for jdee, give me specific poniters and 
I'll resubmit with changes.



(defun insert-fully-qualified-name (name)
  Transform the class name at point into a fully qualified 
name. This is useful when writing @{link name} and name is 
not in the import list.
  (interactive (list (read-string Class name:  
(thing-at-point 'word
  (save-excursion
(save-window-excursion
  (let* ((full-name 
 (jde-parse-select-qualified-class-name name)))
 (if (not (looking-at \\))
   (forward-word -1))
 (kill-word 1)
 (insert-before-markers full-name)


(defun make-word-a-link ()
Transform the class name at point into a javadoc @link.  If 
the class name does not occur in the current package insert 
the fully qualified name, too.
  (interactive)
  (if (not (looking-at \\))
  (forward-word -1))
  (insert [EMAIL PROTECTED] )
  (let ((word (buffer-substring (point) (save-excursion 
(forward-word 1) (point)
(if (not (file-exists-p (concat word .java)))
 (progn 
   (insert-fully-qualified-name word)
   (insert   word)))
(insert })))



(defun wrap-region-in-try-catch (start end)
  (interactive r)
  (save-excursion
(goto-char start)
(beginning-of-line)
(let (region-ends-with-newline (e (make-marker)))
  (set-marker e end)
  (insert try\n{\n)
  (goto-char e)
  (setq region-ends-with-newline (eolp))
  (if region-ends-with-newline
   (insert \n))
  (insert }\ncatch ( Exception error )\n{\n})
  (if (not region-ends-with-newline)
   (insert \n))
  (set-marker e (point))
  (goto-char start)
  (forward-line -2)
  (c-indent-region (point) e



(defun jde-run-with-arguments (arg)
Run the class in the current buffer.  If a prefix argument 
is given, prompt for different command line arguments and 
remember them for subsequent runs.
  (interactive P)
  (if arg
  (jde-run-set-app-args (read-string Enter arguments: )))
  (jde-run nil))



(defun jde-replace-in-defun (old-word new-word)
Replace the word under the cursor within the current method.
  (interactive
   (list (read-string Query replace:  (car 
(semantic-ctxt-current-symbol)))
  (read-string Replace with: )))
  (senator-mark-defun)
  (perform-replace old-word new-word t nil t nil nil 
 (point) (mark)))



;;; This uses the hash method from Josh Bloch's Effective 
Java Programming. (jde-gen-define-abbrev-template 
 hash-code-method
 '(private int hashCode() ' 'n 
   { ''n
   int result = 17; ''n
   result = result * 37 + /* 
data 

RE: Useful helper functions

2003-08-04 Thread Paul Kinnucan
Chitale, Sandip V writes:
  Paul,
  
  Actually I have a question about region based cflow templates. How do I
  use them?
  
  I ask because, with region, as soon as I type first letter of 'if' or
  'try' the mark (region) is deactivated.
  
  Or the only way to use the functionality is by marking a region and then
  doing one of:
  
  1. M-x jde-gen-try-catch-wrapper RET
  2. Bing the function to some key or menu and use that keystroke/menu
  selection
  
  Am I missing something here?
  

No. The cflow templates do not currently support wrapping 
a region in a cflow construct. The try-catch, if-then, etc.
templates do include a tempo region element so it appears
that the author's intention was to support region wrapping.
To activate this requires setting tempo-insert-region to
a nonnil value. However, when I try this with the if-then
template, the template simply deleted the region and generates
the final brace above the if line. There seems to be a bug
in the template or tempo. I will look into this further and
try to get the templates to wrap themselves around a region 
if a region is selected.

Paul

  cheers,
  sandip
  
   -Original Message-
   From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
   Sent: Monday, August 04, 2003 9:45 AM
   To: Nascif Abousalh-Neto
   Cc: Robert Mecklenburg; JDE Users
   Subject: RE: Useful helper functions
   
   
   Nascif Abousalh-Neto writes:
 Cool stuff, thanks for sharing.
 
 Would there be a way to implement the try/catch wrapper 
   with a more precise   catch statement? I guess it would 
   require some introspection on the method   calls inside the 
   region. Is that information easily available somewhere in   
   JDEE, say in the new xref database?   
   
   The JDEE already includes a function for wrapping a region
   in a try-catch form. See the doc string for 
   jde-gen-try-catch-wrapper. It does not try to guess the 
   exception that you want to catch.
   
   - Paul
   
   
 Regards,
 Nascif
 
  -Original Message-
  From: Robert Mecklenburg [mailto:[EMAIL PROTECTED] 
  Sent: Monday, July 28, 2003 12:31 AM
  To: JDE Users
  Subject: Useful helper functions
  
  
  Here is some code I've written that seems useful here.  
  Include it in JDEE if you feel any are worthy.  There's quite 
  a span of time represented by these so some use more or less 
  advanced features as my understanding evolved.  If you'd like 
  me to rework them for jdee, give me specific poniters and 
  I'll resubmit with changes.
  
  
  
  (defun insert-fully-qualified-name (name)
Transform the class name at point into a fully qualified 
  name. This is useful when writing @{link name} and name is 
  not in the import list.
(interactive (list (read-string Class name:  
  (thing-at-point 'word
(save-excursion
  (save-window-excursion
(let* ((full-name 
   (jde-parse-select-qualified-class-name name)))
(if (not (looking-at \\))
  (forward-word -1))
(kill-word 1)
(insert-before-markers full-name)
  
  
  (defun make-word-a-link ()
  Transform the class name at point into a javadoc @link.  If 
  the class name does not occur in the current package insert 
  the fully qualified name, too.
(interactive)
(if (not (looking-at \\))
(forward-word -1))
(insert [EMAIL PROTECTED] )
(let ((word (buffer-substring (point) (save-excursion 
  (forward-word 1) (point)
  (if (not (file-exists-p (concat word .java)))
(progn 
  (insert-fully-qualified-name word)
  (insert   word)))
  (insert })))
  
  
  
  (defun wrap-region-in-try-catch (start end)
(interactive r)
(save-excursion
  (goto-char start)
  (beginning-of-line)
  (let (region-ends-with-newline (e (make-marker)))
(set-marker e end)
(insert try\n{\n)
(goto-char e)
(setq region-ends-with-newline (eolp))
(if region-ends-with-newline
  (insert \n))
(insert }\ncatch ( Exception error )\n{\n})
(if (not region-ends-with-newline)
  (insert \n))
(set-marker e (point))
(goto-char start)
(forward-line -2)
(c-indent-region (point) e
  
  
  
  (defun jde-run-with-arguments (arg)
  Run the class in the current buffer.  If a prefix argument 
  is given, prompt for different command line arguments and 
  remember them for subsequent runs.
(interactive P)
(if arg
 

RE: Useful helper functions - region based jde-gen-try

2003-08-04 Thread Chitale, Sandip V
Interesting

I have:

tempo-insert-region's value is nil
transient-mark-mode's value is t

If I have a region around -

x = x/0;

and then type -

M-x jde-gen-try RET Throwable RET

I get -

try {
x = x/0;|
} catch (Throwable e) {

}

with cursor where | is.

My original question was can I avoid

M-x jde-gen-try RET Throwable RET

and simply type t r y SPC with region around -

x = x/0;

and get the same behaviour as above.

Any thoughts?

sandip

-Original Message-
From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 11:17 AM
To: Chitale, Sandip V
Cc: Paul Kinnucan; JDE Users
Subject: RE: Useful helper functions


Chitale, Sandip V writes:
  Paul,
  
  Actually I have a question about region based cflow templates. How do
I   use them?   
  I ask because, with region, as soon as I type first letter of 'if' or
 'try' the mark (region) is deactivated.   
  Or the only way to use the functionality is by marking a region and
then   doing one of:   
  1. M-x jde-gen-try-catch-wrapper RET
  2. Bing the function to some key or menu and use that keystroke/menu
 selection   
  Am I missing something here?
  

No. The cflow templates do not currently support wrapping 
a region in a cflow construct. The try-catch, if-then, etc. templates do
include a tempo region element so it appears that the author's intention
was to support region wrapping. To activate this requires setting
tempo-insert-region to a nonnil value. However, when I try this with the
if-then template, the template simply deleted the region and generates
the final brace above the if line. There seems to be a bug in the
template or tempo. I will look into this further and try to get the
templates to wrap themselves around a region 
if a region is selected.

Paul

  cheers,
  sandip
  
   -Original Message-
   From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
   Sent: Monday, August 04, 2003 9:45 AM
   To: Nascif Abousalh-Neto
   Cc: Robert Mecklenburg; JDE Users
   Subject: RE: Useful helper functions
   
   
   Nascif Abousalh-Neto writes:
 Cool stuff, thanks for sharing.
 
 Would there be a way to implement the try/catch wrapper 
   with a more precise   catch statement? I guess it would 
   require some introspection on the method   calls inside the 
   region. Is that information easily available somewhere in   
   JDEE, say in the new xref database?   
   
   The JDEE already includes a function for wrapping a regionin
a try-catch form. See the doc string for 
   jde-gen-try-catch-wrapper. It does not try to guess the 
   exception that you want to catch.
   
   - Paul
   
   
 Regards,
 Nascif
 
  -Original Message-
  From: Robert Mecklenburg [mailto:[EMAIL PROTECTED] 
  Sent: Monday, July 28, 2003 12:31 AM
  To: JDE Users
  Subject: Useful helper functions
  
  
  Here is some code I've written that seems useful here.  
  Include it in JDEE if you feel any are worthy.  There's quite 
  a span of time represented by these so some use more or less 
  advanced features as my understanding evolved.  If you'd like 
  me to rework them for jdee, give me specific poniters and 
  I'll resubmit with changes.
  
 

  
  (defun insert-fully-qualified-name (name)
Transform the class name at point into a fully qualified 
  name. This is useful when writing @{link name} and name is 
  not in the import list.
(interactive (list (read-string Class name:  
  (thing-at-point 'word
(save-excursion
  (save-window-excursion
(let* ((full-name 
   (jde-parse-select-qualified-class-name name)))
(if (not (looking-at \\))
  (forward-word -1))
(kill-word 1)
(insert-before-markers full-name)
  
  
  (defun make-word-a-link ()
  Transform the class name at point into a javadoc @link.  If 
  the class name does not occur in the current package insert 
  the fully qualified name, too.
(interactive)
(if (not (looking-at \\))
(forward-word -1))
(insert [EMAIL PROTECTED] )
(let ((word (buffer-substring (point) (save-excursion 
  (forward-word 1) (point)
  (if (not (file-exists-p (concat word .java)))
(progn 
  (insert-fully-qualified-name word)
  (insert   word)))
  (insert })))
  
 

  
  (defun wrap-region-in-try-catch (start end)
(interactive r)
(save-excursion
  (goto-char start)
  (beginning-of-line)
  (let (region-ends-with-newline (e (make-marker)))
(set-marker e end)
(insert try\n{\n)
(goto-char e)
(setq 

RE: Useful helper functions - region based jde-gen-try

2003-08-04 Thread Paul Kinnucan
Chitale, Sandip V writes:
  Interesting
  
  I have:
  
  tempo-insert-region's value is nil
  transient-mark-mode's value is t
  
  If I have a region around -
  
   x = x/0;
  
  and then type -
  
  M-x jde-gen-try RET Throwable RET
  
  I get -
  
  try {
   x = x/0;|
  } catch (Throwable e) {
   
  }
  
  with cursor where | is.
  
  My original question was can I avoid
  
  M-x jde-gen-try RET Throwable RET
  
  and simply type t r y SPC with region around -
  
   x = x/0;
  
  and get the same behaviour as above.
  
  Any thoughts?

I verified that the cflow templates do indeed work if you execute them
directly but not if you invoke them via abbrev mode expansion. I do
not know if there is a way to get them to work when invoked via
abbrev-mode expansion.  If not, I could write a set of wrapper
functions that locally set tempo-insert-region on and then invoke the
corresponding template, e.g.,

(defun jde-wrap-if ()
  (interactive)
  (let ((tempo-insert-region t))
 (jde-gen-if)))

- Paul


  
  sandip
  
  -Original Message-
  From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
  Sent: Monday, August 04, 2003 11:17 AM
  To: Chitale, Sandip V
  Cc: Paul Kinnucan; JDE Users
  Subject: RE: Useful helper functions
  
  
  Chitale, Sandip V writes:
Paul,

Actually I have a question about region based cflow templates. How do
  I   use them?   
I ask because, with region, as soon as I type first letter of 'if' or
   'try' the mark (region) is deactivated.   
Or the only way to use the functionality is by marking a region and
  then   doing one of:   
1. M-x jde-gen-try-catch-wrapper RET
2. Bing the function to some key or menu and use that keystroke/menu
   selection   
Am I missing something here?

  
  No. The cflow templates do not currently support wrapping 
  a region in a cflow construct. The try-catch, if-then, etc. templates do
  include a tempo region element so it appears that the author's intention
  was to support region wrapping. To activate this requires setting
  tempo-insert-region to a nonnil value. However, when I try this with the
  if-then template, the template simply deleted the region and generates
  the final brace above the if line. There seems to be a bug in the
  template or tempo. I will look into this further and try to get the
  templates to wrap themselves around a region 
  if a region is selected.
  
  Paul
  
cheers,
sandip

 -Original Message-
 From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 04, 2003 9:45 AM
 To: Nascif Abousalh-Neto
 Cc: Robert Mecklenburg; JDE Users
 Subject: RE: Useful helper functions
 
 
 Nascif Abousalh-Neto writes:
   Cool stuff, thanks for sharing.
   
   Would there be a way to implement the try/catch wrapper 
 with a more precise   catch statement? I guess it would 
 require some introspection on the method   calls inside the 
 region. Is that information easily available somewhere in   
 JDEE, say in the new xref database?   
 
 The JDEE already includes a function for wrapping a regionin
  a try-catch form. See the doc string for 
 jde-gen-try-catch-wrapper. It does not try to guess the 
 exception that you want to catch.
 
 - Paul
 
 
   Regards,
Nascif
   
-Original Message-
From: Robert Mecklenburg [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 12:31 AM
To: JDE Users
Subject: Useful helper functions


Here is some code I've written that seems useful here.  
Include it in JDEE if you feel any are worthy.  There's quite 
a span of time represented by these so some use more or less 
advanced features as my understanding evolved.  If you'd like 
me to rework them for jdee, give me specific poniters and 
I'll resubmit with changes.

   
  

(defun insert-fully-qualified-name (name)
  Transform the class name at point into a fully qualified 
name. This is useful when writing @{link name} and name is 
not in the import list.
  (interactive (list (read-string Class name:  
(thing-at-point 'word
  (save-excursion
(save-window-excursion
  (let* ((full-name 
 (jde-parse-select-qualified-class-name name)))
   (if (not (looking-at \\))
 (forward-word -1))
   (kill-word 1)
   (insert-before-markers full-name)


(defun make-word-a-link ()
Transform the class name at point into a javadoc @link.  If 
the class name does not occur in the current package insert 
the fully qualified name, too.
  (interactive)
  (if (not (looking-at \\))
  

Re: Useful helper functions - region based jde-gen-try

2003-08-04 Thread Andrew Hyatt
Chitale, Sandip V [EMAIL PROTECTED] writes:

 My original question was can I avoid

 M-x jde-gen-try RET Throwable RET

 and simply type t r y SPC with region around -

   x = x/0;

 and get the same behaviour as above.

 Any thoughts?

 sandip


I'm guessing that hard to do without intercepting every keystroke.
For the reason you stated, once you start typing, the region will be
deactivated.   I'd say it's possible with emacs, but we'd have to
implement a previous-region variable, and if a user types a
non-command key then if there is a region, it stores it in the
previous-region variable.  And once a completion fails (a user types
in a non-keyword), we'd have to clear that previous region function.

So, possible, but difficult.  Unless a facility for storing previous
regions exists already, but I was unable to find it.






Re: Implement interface wizard.

2003-08-04 Thread Ole Arndt
Hi,

Paul Kinnucan [EMAIL PROTECTED] writes:

 The @see tag seems redundant to me. Also please note that @inheritDoc
 will not work for JDK releases earlier than JDK 1.4. So I'd like to
 offer an alternative proposal:

 If the JDK version used to generate the skeleton method implementation
 is earlier than 1.4, generate the skeleton without a comment. Otherwise,
 generate the skeleton with the following comment:

   /**
 * [EMAIL PROTECTED]
 */


No objections.

Ole

PS. Sorry Paul for the duplicate mail. As I said to Eric already, this
list should have a Reply-To header.

-- 
Ole Arndt http://www.sugarshark.com
---
Diplomacy is the art of letting the other party have things your way.
-- Daniele Vare