Community
Participate
Working Groups
Add support in the Java Browsing Perspective for organizing methods/fields using the @category (or @cat - whichever is selected) tag described here: http://java.sun.com/j2se/javadoc/proposed-tags.html and here: http://developer.java.sun.com/developer/bugParade/bugs/4085608.html If the Java Browsing Perspective (or any java-based perspective for that matter) had a new view called "category" or some such that could be placed between the "types" view and the "members" view, I believe it would be very convenient. This category view would display the list of all the @cat/@category values that were provided in the entire .java file. When one of these categories was selected, this would "filter" the members view to only show members that declared themselves with the selected category in their javadoc entry. This is the EXACT same behavior as protocols in most Smalltalk development environments. Examples of possible categories are provided at the Sun enhancement request for @category in the comments (url provided above). copied from Sun enhancement request: ====== Here are a few examples of typical protocols we used to use in Smalltalk, along with a description of the kinds of methods that would be assigned to the protocol: "accessing" - getter and setter methods "converting" - methods that convert the object to another type (e.g., toInteger, toDate, toPolygon) "calculating" - methods that are about computation (e.g., calculateOrderTotal, calculateAverageDuration) "initializing" - methods that do initialization "adding/removing" - methods that add to or remove from a collection maintained by an object (e.g., addCustomer, removeOrder) "testing" - methods that query the state of the object (e.g., isConfirmed, isDirty, includesCustomer) "actions" - methods that command an object to do something (e.g., turnRight, closeConnection) In addition to assisting in organizing Javadocs, having support for a @category or @protocol tag might encourage some vendors with Java code browsers to add by-category filtering of methods. The closer we can get to a Smalltalk code browser, the more productive we will all be (my $0.02). ======== This would make it VERY easy to organize the methods/fields on classes that have MANY, MANY methods into logical groupings. Also, since it follows along with upcoming java standards would be a good choice for support, in my opinion. Thanks!
Would be nice indeed. Not for 2.1 though
What about 3.0?
Nice feature indeed, will tag it for 3.0, no strong promise though, but definitely worth investigating.
Might be worth surfacing in the JavaModel along with javadoc support...
Someone (Chris Grindstaff) actually implemented a plugin that has this behavior. http://gstaff.org/xdoc/ He had the same idea as others, including myself, but he implemented it!
Not for 3.0
Removing milestone of deferred item.
Sorry, neither for 3.1...
Considering 3.2
Current spec for @category tag: http://www.javac.info/doc?n=JavaDoc.CategoryTags
Added APIs IMember#getCategories() and IType#getChildrenForCategory(String). Added tests CompilationUnitTests#testGetCagetories01/11 and testGetChildrenForCategory01/02, and ClassFileTests#testGetCagetories01/03 and testGetChildrenForCategory01
Added IJavaElementDelta#F_CATEGORIES. This flag is set when one or more categories of an element are added/changed/removed. Corresponding tests are in ReconcilerTests#testCategories1/3.
Verified for 3.2 M3 using build I20051025-0800+JDT/Core v_618a. Verified that the regression tests are propertly run.