• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javadoc: asterisk(*) intermixed with comments

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Problem:
-------
The DataFactory.html Javadoc generated includes asterisks intermixed in the comments as follows (note the asterisk between 'It' and 'guarantees; and at the end of the sentence:

suncertify.db
Class DataFactory
java.lang.Object
|
+--suncertify.db.DataFactory

--------------------------------------------------------------------------------
public class DataFactory
extends java.lang.Object
This singleton class provides access to Data objects. It * guarantees only one instance of Data per database file. *

Codes for this class is:
The javadoc command issued is:
Q. Why do the asterisks in the javadoc comments appears in the generated html file?
java version used is 1.4.1_02:

Any help is appreciated.
rgds,
derek
[ February 20, 2004: Message edited by: Derek Canaan ]
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Derek,
I'll take a whack at it. To me it looks like you don't have newlines at the end of your lines of code so javadoc sees your comments as one long string of characters on a single line. I believe javadoc removes asterisks when they are the first non-whitespace character on a line, so not having newlines could be the source of this problem.
This could be something related to your editor. Some editors (like jEdit, for example) do soft linebreaks or automatic wrapping, so you type until the end of the line and at some column less than 80 your editor automatically wraps, then you press tab to align the * and keep typing on the next line without inserting a newline. Soft linebreaks generally don't insert a newline when you save them so you get the one long line effect mentioned above.
Hope this helps,
Regards,
jb
 
Derek Canaan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jay,
You're absolutely right
I'm using UltraEdit. When i copy and paste the entire file onto NotePad and saved it as the same filename, run javadoc again, the problem disappears.
Now i have to find out which UltraEdit settings to change so that i don't have to do the same thing (copy, paste, and re-saved) for the rest of the files.
I would have never figured this asterisk-problem out. Thanks Jay .. you're great.
rgds,
derek
[ February 20, 2004: Message edited by: Derek Canaan ]
 
Jay Bromley
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Derek,
Glad to have been of help. I'm not familiar with UltraEdit but you might look for something that mentions soft/hard line breaks. Sometimes this is tied up with auto-wrapping as well: soft linebreaks facilitate auto-wrapping since a newline doesn't have to be moved around when you change a line, breaking lines becomes purely a display trick. Good luck in finding the appropriate settings.
Regards,
jb
 
reply
    Bookmark Topic Watch Topic
  • New Topic