This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 106391 - auto insert javadoc
Summary: auto insert javadoc
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 2 votes (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-12 13:36 UTC by Vladimir Voskresensky
Modified: 2012-05-17 16:22 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2007-06-12 13:36:37 UTC
having method 
int foo(type a, type2 b) throws Ex {
}

when type above this method
/**
and press Enter, 
It would be very helpful to see as result:
/**
 * |
 * @param a
 * @param b
 * @return
 * @throws Exception
 */
int foo(type a, type2 b) throws Exception {
}
Comment 1 pohl 2007-12-17 20:52:09 UTC
This is one of the features that I miss the most from my previous java development environment,
JDEE (Java Development Environment for Emacs).

I would like an action that I can bind a key to, like ^j ...   

The action would examine what sort of syntactic entity is under (or to the right of) the
insertion point.   If it is the declaration of a member variable, the appropriate javadoc
would be generated.   If the syntactic entity is a method, then the javadoc for that method
would be stubbed-out including the argument names as shown above.

The keybinding should also be mindful of text selection.  If the selected area includes 
two methods, then each method should get its own javadoc block stubbed out.

If the entire document is selected, then of course all possible javadoc should be stubbed
out.

The action should be non-destructive, of course, meaning that existing blocks of
javadoc comments within the selected region would not be molested...unless it is
to perform obvious cleanups and corrections, such as fixing the names/types of
arguments that a method takes.




Comment 2 markiewb 2012-05-17 16:22:17 UTC
(In reply to comment #0)
> having method 
> int foo(type a, type2 b) throws Ex {
> }
> 
> when type above this method
> /**
> and press Enter, 
> It would be very helpful to see as result:
> /**
>  * |
>  * @param a
>  * @param b
>  * @return
>  * @throws Exception
>  */
> int foo(type a, type2 b) throws Exception {
> }

Works for me. Tested with NetBeans IDE Dev (Build 201205090400) /7.2.