formatting javadoc comments: start in front of every line after filling

2003-12-15 Thread Martin Monsorno
Hi *,

I found many info on this, but I was not able to find a solution :-(

The problem is the following: when having a javadoc comment in a
java-file like this:

,
| /**
|  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla 
bla bla bla bla bla bla
|  *
`

I move the point to the second line and press M-q (c-fill-paragraph),
I get this:

,
| /**
|  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
|bla bla bla bla bla bla bla
`

but I would like to get this:

,
| /**
|  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
|  * bla bla bla bla bla bla bla
`

(stars in front of every comment line)

How can I achieve this?  

(I think I can remember a time, when this worked out of the box, but
now it does not any longer.)

-- 
Martin


Re: cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-12-15 Thread Michael Schierl
On Tue, 9 Dec 2003 18:03:26 -0500, Paul Kinnucan wrote:
> Michael Schierl writes:
>  > On Thu, 6 Nov 2003 13:17:50 -0500, Paul Kinnucan wrote:
>  > 
>  > When I use that one with cedet-1.0beta1c on emacs-21.3 (Windows), it works
>  > as long as i only edit one file. When I open the second file (or do a M-x
>  > jde-mode RET in the first one), I see 
>  > 
> 
> I was not able to get cedet-1.0beta1c to load on my Windows system, let alone
> work with the JDEE 2.3.3.

Hmm, my windows system (w/ cygwin) did not make any problems. just run make
and then add the line mentioned in the INSTALL file into .emacs (it will
create the needed load path itself).

Some investigation with lots of (message)s and edebug-sessions later, i
noticed that the error does not occur when i disable
jde-project-context-switching-enabled-p. It does not occur either when i
load the project manually afterwards (huh?).

After some stepping through jde-set-variables-init-value, the problem is 
(funcall set symbol val-to-set) on jde-enable-senator.

So the shortest hack to make it work with latest cedet seems to be changing
the set function for jde-enable-senator.

Now i simply use:

(defcustom jde-enable-senator t
  "Enable senator minor mode.
This mode provides Java-aware buffer navigation and searching
commands."
  :group 'jde-project
  :type 'boolean
  :set '(lambda (sym val)
  ;; Starting with version 1.4 beta 12 Semantic can globally
  ;; enable `senator-minor-mode'.  So don't override the
  ;; global setting in JDE's buffers.
  (or (and (boundp 'global-senator-minor-mode)
   global-senator-minor-mode)
  t ;; < added by me
  (mapc 
   (lambda (buff)
 (save-excursion   
   (set-buffer buff)
   (senator-minor-mode (if val 1 -1
   (jde-get-java-source-buffers)))
  (set-default sym val)))

which seems to work as expected (although i might have broken senator, but
I don't care about that on my machine). 

Perhaps that helps tracking down the bug (which occurs on my Linux box as
well).

Another bug: Since jde-2.3.3 jde-build-ant-command uses ' chars here
instead of " to enclose the build file name - however ant (or my shell,
which is plain old command.com) does not like that... Would be helpful to
have a custom option for that. 

Michael



Re: formatting javadoc comments: start in front of every line after filling

2003-12-15 Thread Jeffery B. Rancier
Martin Monsorno <[EMAIL PROTECTED]> writes:

> Hi *,
>
> I found many info on this, but I was not able to find a solution :-(
>
> The problem is the following: when having a javadoc comment in a
> java-file like this:
>
> ,
> | /**
> |  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla 
> bla bla bla bla bla bla
> |  *
> `
>
> I move the point to the second line and press M-q (c-fill-paragraph),
> I get this:
>
> ,
> | /**
> |  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
> |bla bla bla bla bla bla bla
> `
>
> but I would like to get this:
>
> ,
> | /**
> |  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
> |  * bla bla bla bla bla bla bla
> `
>
> (stars in front of every comment line)
>
> How can I achieve this?  
>
> (I think I can remember a time, when this worked out of the box, but
> now it does not any longer.)

Perhaps,

,[ C-h f indent-new-comment-line RET ]
| indent-new-comment-line is an alias for `comment-indent-new-line' in `newcomment'.
| (indent-new-comment-line &optional SOFT)
| 
| Break line at point and indent, continuing comment if within one.
| This indents the body of the continued comment
| under the previous comment line.
| 
| This command is intended for styles where you write a comment per line,
| starting a new comment (and terminating it if necessary) on each line.
| If you want to continue one comment across several lines, use C-j.
| 
| If a fill column is specified, it overrides the use of the comment column
| or comment indentation.
| 
| The inserted newline is marked hard if variable `use-hard-newlines' is true,
| unless optional argument SOFT is non-nil.
`

Bound to M-j is what you want.
-- 
Thanks,
Jeff




RE: formatting javadoc comments: start in front of every line after filling

2003-12-15 Thread Jeff Jensen
That works right for me.  Without testing, my guess is it is "filladapt",
which is outside of JDE.  Are you using it?

You may want to add some more filladapt tokens for better formatting of
Javadoc.  Klaus Berndl has an old email in the archive on settings for
those.


> -Original Message-
> From: Martin Monsorno [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 3:29 AM
> To: [EMAIL PROTECTED]
> Subject: formatting javadoc comments: start in front of every
> line after
> filling
>
>
> Hi *,
>
> I found many info on this, but I was not able to find a solution :-(
>
> The problem is the following: when having a javadoc comment in a
> java-file like this:
>
> ,
> | /**
> |  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla
> bla bla bla bla bla bla bla bla bla bla bla bla
> |  *
> `
>
> I move the point to the second line and press M-q (c-fill-paragraph),
> I get this:
>
> ,
> | /**
> |  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla
> bla bla bla bla bla
> |bla bla bla bla bla bla bla
> `
>
> but I would like to get this:
>
> ,
> | /**
> |  * bla bla bla bla bla bla bla bla bla bla bla bla bla bla
> bla bla bla bla bla
> |  * bla bla bla bla bla bla bla
> `
>
> (stars in front of every comment line)
>
> How can I achieve this?
>
> (I think I can remember a time, when this worked out of the box, but
> now it does not any longer.)
>
> --
> Martin