Bug 43374 - [typing] Javadoc: Easy way to add <code></code> around types and classes
Summary: [typing] Javadoc: Easy way to add <code></code> around types and classes
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-19 14:48 EDT by Tonny Madsen CLA
Modified: 2003-09-24 03:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tonny Madsen CLA 2003-09-19 14:48:54 EDT
One of the more well-established conventions of javadoc is the 
<code>...</code> construct used for all or nearly all type and classes. As it 
is quite tredious to add this to all type and classes it could be nice to have 
a automatic or semi-automatic way of doing this. E.g. via a new option for the 
Javadoc formatting :-)

I believe eclipse already have all the necessary information about the names 
of all types and classes for a specific project.
Comment 1 Dani Megert CLA 2003-09-22 04:15:57 EDT
There's already a quite easy way of doing this:
1. type <
2. use code assist (default: Ctrl+Space)
3. select template <code> - <code></code>
4. use code assist (default: Ctrl+Space) to select the type

We could add an option which automatically wraps inserted types with <code></code>

It should not be part of formatting since formatting only changes white-spacing.
Comment 2 Tonny Madsen CLA 2003-09-23 14:31:18 EDT
I know about the possible use of code assist for this job, but doing this all 
the time for the different relevant types, is very hard on my hands and 
fingers...

I would prefer to let eclipse do the job... It should be possible.

Also note that it should be possible to make eclipse re-parse a comment to 
pick up new types where possible. That was the reason to let the formatting 
code do it as it already had to parse the comment to some extend.
Comment 3 Dani Megert CLA 2003-09-24 03:36:47 EDT
As I wrote we in comment 1, we could auto-wrap with code. It must not be part of
format since this should really only touch white-spaces. If code itself is
touched then this is often called "Clean up", "Tidy", "Beautify", ...

But, again: I agree that this is a useful feature.

Note: The tag which warps the type/member should be configurable for those who
use custom tags.