aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes eclipse, javadoc and ${tags} Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "eclipse, javadoc and ${tags}" Watch "eclipse, javadoc and ${tags}" New topic
Author

eclipse, javadoc and ${tags}

christophe seguinot
Greenhorn

Joined: Oct 19, 2007
Posts: 18
Hello,

In the javadoc template of a method (java -> Code Style -> Code Template : Comments -> Methods) we can have :

Take the following example :



By clicking on ctrl + shift + j, we get :



Extract form the eclipse documentation :
"Comment templates can contain the variable ${tags} that will be substituted by the standard Javadoc tags (@param, @return..) for the commented element."


I would like to customize the template associated to @{tags} in order to add the @link tags.


Does anyone know how to do this or at least if it's possible or maybe the name of the eclipse plugin which is used, some clue perhaps ?

Thanks
Best regards,
Chris
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15628
    
  15

Making a template like what you described is easy. Making the link target point somewhere requires that something be able to figure out where that "somewhere" is going to be.

If you were actually just planning to link to the parameter's datatype javadocs, the link tag would be redundant, since the normal javadoc generator already does that.


Customer surveys are for companies who didn't pay proper attention to begin with.
B Kelly
Greenhorn

Joined: Aug 13, 2012
Posts: 1
Similar question: I'd like to customize ${tags} in auto-generated constructors to reference javadoc I write for fields set in the constructor. I do something similar for auto-getters and setters:

/**
* Get the ${bare_field_name}.
* @return the ${bare_field_name}
* @see #${bare_field_name}
*/

/**
* Set the ${bare_field_name}.
* @param ${param} input ${bare_field_name}
* @see #${bare_field_name}
*/

This would be a big time saver, as I would only have to document the fields once instead of repeat or copy paste for multiple constructors. Any straightforward way to do this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15628
    
  15

Welcome to the JavaRanch B,

Actually, rather than raising a dead topic (zombie), we'd prefer that you start a new one.

It's very easy to customize the autodocs in Eclipse. Just go to Help/Preferences, select Java, Code Style, Code Templates. The items in question are "fields", "getters" and "setters". These are the templates that are used when generating properties and accessor/mutator methods.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: eclipse, javadoc and ${tags}
 
Similar Threads
Need an attribute to be available in different places (SOLVED)
How to retrieve data from database every 10 minutes?
Problem With Algorithm Involving Recursion and String Manipulation
Struts2 newbee - Problem when using form tag
call a stored procedure using eclipselink Problem...