Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-8027

Javascript code formatter: invalid indentation when using dojo.own

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Aptana Studio 3.4.2
    • Fix Version/s: None
    • Component/s: Formatting, JS
    • Labels:
    • Environment:

      Eclipse Kepler, Aptana Studio 3 Eclipse plugin 3.4.2.201308081736

      Description

      I recently installed the Aptana Eclipse plugin so we could use proper javascript formatting. This works almost perfectly, except when using the Dojo.own functionality.

      It turns the following (properly formatted) code:

      this.own(
        on(this, 'pageload', lang.hitch(this, function(newIframeUrl) {
          //do something
        })), 
        on(this, 'pageunload', lang.hitch(this, function(newIframeUrl) {
          //do something
        }))
      ); 
      

      Into:

       
      this.own(on(this, 'pageload', lang.hitch(this, function(newIframeUrl) {
        //do something
      })), on(this, 'pageunload', lang.hitch(this, function(newIframeUrl) {
        //do something
      })));
      

      This is invalid because now it seems that the first "}))" marks the end of "this.own". This is not the case.
      So it looks like the indentation is wrong when using dojo.own.

      Expected result: Indentation is preserved when using dojo.own.
      Actual result: Indentation is lost. In fact, the indentation became confusing.

        Attachments

          Activity

            People

            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              Reporter:
              paulrutter Paul.Rutter
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Git Integration