举一个极端的例子:
require(["dojo/_base/lang", "dojo/dnd/Manager", "js/desktop/desktopAvatar", "dijit/Menu", "dijit/MenuItem", "dojo/has", "dijit/layout/TabController", "js/desktop/desktopCommons", "dijit/layout/StackController", "dojo/dom-construct", "dojo/on", "dojo/query", "dojo/dom-attr", "dojo/dom-class", "dojo/dnd/common", "dojo/request/xhr", "dojo/json", "dojo/dom-form", "js/desktop/desktopSource", "dijit/popup", "js/desktop/desktopBorderContainer", "dojo/ready", "dojo/dom", "dijit/registry", "dojo/parser", "dijit/layout/TabContainer", "dijit/Dialog", "dijit/TooltipDialog", "dojox/layout/ContentPane"], function(lang, Manager, desktopAvatar, Menu, MenuItem, has, TabController, desktopCommons, StackController, domConstruct, on, query, domAttr, domClass, dndCommons, xhr, JSON, domForm, desktopSource, popup, DesktopBorderContainer, ready, dom, registry, parser) {
Eclipse中的默认Javascript编辑器应用以下格式:
require(
[ "dojo/_base/lang", "dojo/dnd/Manager", "js/desktop/desktopAvatar",
"dijit/Menu", "dijit/MenuItem", "dojo/has",
"dijit/layout/TabController", "js/desktop/desktopCommons",
"dijit/layout/StackController", "dojo/dom-construct",
"dojo/on", "dojo/query", "dojo/dom-attr", "dojo/dom-class",
"dojo/dnd/common", "dojo/request/xhr", "dojo/json",
"dojo/dom-form", "js/desktop/desktopSource", "dijit/popup",
"js/desktop/desktopBorderContainer", "dojo/ready", "dojo/dom",
"dijit/registry", "dojo/parser", "dijit/layout/TabContainer",
"dijit/Dialog", "dijit/TooltipDialog",
"dojox/layout/ContentPane" ],
function(lang, Manager, desktopAvatar, Menu, MenuItem, has,
TabController, desktopCommons, StackController, domConstruct,
on, query, domAttr, domClass, dndCommons, xhr, JSON, domForm,
desktopSource, popup, DesktopBorderContainer, ready, dom,
registry, parser) {
对于所有其他格式,Aptana工作得更好,但非常长的第一行使它更难添加新的必需项目等。
有没有一种方法可以使用Aptana Javascript格式,但是长数组和函数输入被分割成行?
1条答案
按热度按时间yyyllmsg1#
我们也在使用Aptana &只需自己设置要求,并在每次输入后休息。
然后它看起来像这样:
这是最简单的方法,使它更清楚。