Is there an eclipse plugin that creates an outline view for the “javascript revealing module pattern”?

亡梦爱人 提交于 2019-12-18 12:59:11

问题


I like eclipse, and with some tweaking it can be used for javascript programming. There's syntax completion, linting, formatting, and there's "outlining", albeit only for simple javascript files.

What annoys me is that there is no "Outline View" for files that follow the "revealing module" design pattern. This happens to be my favorite coding style.

Is there a plugin somewhere that adds to Eclipse an "extended" outline view that is able to "see inside" the nested structure of a .js file written in the "revealing module style", showing the encapsulated private functions and members? (The normal "eclipse outline view is usually empty for this type of style).


回答1:


Answering my own question, again:

The javascript functions inside the IIFE must be annotated in the JSDoc style, then they will appear in the outline view.

The whole process is described here, with screenshots:

http://www.kajabity.com/2012/02/how-i-introduced-jsdoc-into-a-javascript-project-and-found-my-eclipse-outline/



来源:https://stackoverflow.com/questions/12600168/is-there-an-eclipse-plugin-that-creates-an-outline-view-for-the-javascript-reve

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