是否有一个eclipse插件为“javascript显示模块模式”创建一个大纲视图? [英] Is there an eclipse plugin that creates an outline view for the "javascript revealing module pattern"?

查看:177
本文介绍了是否有一个eclipse插件为“javascript显示模块模式”创建一个大纲视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢eclipse,并且通过一些调整它可以用于JavaScript编程。有语法完成,linting,格式化,并且有大纲,虽然只是简单的javascript文件。



令人讨厌的是,文件没有大纲视图遵循揭示模块的设计模式。这恰好是我最喜欢的编码风格。



是否有一个插件在某个地方添加了一个扩展大纲视图,可以查看内部嵌入式结构的.js文件中写入显示模块样式,显示封装的私有功能和成员? (正常的eclipse大纲视图对于这种类型的样式通常是空的)。

解决方案

再次回答我自己的问题: / p>

IIFE中的JavaScript函数必须以JSDoc样式注释,然后它们将显示在大纲视图中。



整个过程在这里描述,屏幕截图如下:



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


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

解决方案

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/

这篇关于是否有一个eclipse插件为“javascript显示模块模式”创建一个大纲视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆