Can anyone tell me why it's useful to use Java categories in Eclipse?
When looking in the 'outline' window, if I click the menu arrow in the top right and select visible categories I get an option to show certain Java categories, why would I ever want to do this?
Thanks
Well lets not forget that eclipse is an IDE for Java (i am talking only for Java). A Java file could be a human written Java file or it could be a generated file.
If you have some experience with any rational software or JavaCC or Antlr or if you are using MDD (Model Driven Development) then what I am saying will be crystal clear :).
So at times the above mentioned tools generate some skeleton Java files and requiring developer to fill in the gap. Now it would be difficult to find your own method among the auto generated methods and variables (and for big models (MDA) they really generate a large amount of code). So a standard and well behaved generator will generate something like this:
/**
* This is generated method
* @category Generated
*/
public void generatedMethod()
{
// do something fancy
}
/**
* This is not a generated method
* @author James Gosling
*/
public void notAGeneratedMethod()
{
// do something fancy
}
Now from the menu arrow in the top right, you can select the visible categories.
Also in collaborative environment. Where two or more people are working on the same Java class; you can define a @category
as author name or group name, to help developer(s) in quickly navigating.
Hope this will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With