What's a good way to view dojo javascript source files in Eclipse with Aptana?

I have Aptana installed in Eclipse. I am working on a project with dojo 1.2 JavaScript library installed.

When I open one of the dojo files dijit.js, the code is formatted in a rather difficult-to-read form. The Eclipse Outline view shows a list of functions with names like "_2" and "ew". Not very friendly.

I'm talking about source code that looks like this:

dojo.declare ("dijit.InlineEditBox", dijit._Widget, {edit: false, Autosave: true, buttonSave: ", buttonCancel:" ", renderAsHtml: false, editor:" dijit.form.TextBox ", editorParams: {} , OnChange: function (-1) {}, OnCancel: function () {}, width: "100%", value: ", noValueIndicator:" ✍ ", constructor: function () {this.editorParams = {};} , PostMixInProperties: function () {this.inherited (arguments); this.displayNode = this.srcNodeRef; var _2 = {ondijitclick: "_ onClick", onmouseover: "_ onMouseOver", onmouseout: "_ onMouseOut", onfocus: " _ onMouseOver ", onblur:" _ onMouseOut "}; for (var _3 in _2) {this.connect (this.displayNode, _3, _2 [_3]);} dijit.setWaiRole (this.displayNode," button "); if (! this.displayNode.getAttribute ("TabIndex")) {this.displayNode.setAttribute ("TabIndex", 0); } this.attr ("value", this.value || this.displayNode.innerHTML); }, SetDisabled: function (_4) {dojo.deprecated ("dijit.InlineEditBox.setDisabled () is deprecated. Use attr ('disabled', bool) instead.", "", "2.0"); this.attr ("disabled", _ 4);

How do I get a clearer, "friendly" view of such a .js file?

+1


source to share


2 answers


You should be able to upload uncompressed versions of the library to dojotoolkit.org . Here is the source tree for 1.2.2.



+1


source


You must download the source dojo distribution because the "standard" version is compressed using the dojo ShrinkSafe tool (something similar to the Rhino-based yui compression method), which is 100% safe and saves about 20% space. In the original archive, you will find a Util folder with utils for unit testing, compressing, building and documenting :)



http://download.dojotoolkit.org/ - here you will find a list of all downloadable distributions

0


source







All Articles