views:

144

answers:

1

I just found an option in the little white down arrow in Eclipse that reads "Visible Categories..."

How can I use this? It seems to me that it could be used to only show functions that have an @category in their comments, but I haven't been able to make the "Visible JavaScript Categories" dialog display the categories that work.

If it did work it would be incredibly useful for separating out Unit Tests from their common-functions and separating them from the setUp and tearDown methods, so what is it really for?

By the way I'm editing a Javascript file in the Eclipse "Javascript Editor", I don't know if that makes any difference or not.

It looks like there's something on that here, just search for Category Support.

But it doesn't seem to work for some reason when I try it in my instance of Eclipse.

I've tried the following above my functions to no avail:

/**
 * @category setter
 *
 */
 CheckoutTest.prototype.setTestFormValues = function(whichTest) {
A: 

Your understanding of the feature is correct - but (sadly) it doesn't appear to work with JavaScript, at least as of Eclipse version 3.5.1. It works exactly as you expect with Java.

In your example, "setter" would appear in the little-white-down-arrow's menu, with a checkmark allowing you to quickly show/hide all methods tagged with an @category setter annotation in their JavaDoc comment block.

For anyone wondering, the Visible Categories feature is a part of Eclipse's Outline view.

Dolph
Any idea where I would submit a bug to, to get this fixed?
leeand00
https://bugs.eclipse.org/bugs/
Dolph
Okay submitted it here: hopefully somebody will hear my crys...https://bugs.eclipse.org/bugs/show_bug.cgi?id=312841
leeand00
P.S. if you see the bug above and want it fixed, vote for it!
leeand00
Crap! I read another answer that said that JSDT is now part of wst.jsdt, I fixed it in the bug report.
leeand00