Eclipse Outline View - Visible JavaScript Categories in Eclipse?

旧城冷巷雨未停 提交于 2019-12-11 06:39:18

问题


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) {

回答1:


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.



来源:https://stackoverflow.com/questions/2830027/eclipse-outline-view-visible-javascript-categories-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!