Aptana Studio
  1. Aptana Studio
  2. APSTUD-4116

Functions with parameters do not display arg assist if they have an associated sdoc block with no @param tags

    Details

    • Story Points:
      8

      Description

      Given the following block of code

      /**
       * @return {Object}
       */
      function abc(a, b, c) {}
      

      We should show arg assist for the "a, b, c" parameters. However, since the sdoc comment does not list the parameters, the type inferencer assumes the function has no arguments. We should perform a sanity check and use what is in the code if no @params are defined. If one or more @params are defined, then the sdoc will win in that case.

        Activity

        Hide
        Kevin Lindsey added a comment -
        • Create a new Web Project
        • Create a new JS file
        • Paste the following code into the JS file
        /**
         * This is a description of abc
         */
        function abc(a, b, c) {}
        
        • Type 'a' on a new line. The content assist popup should appear. If it doesn't, force it to show using ctrl-space
        • Select the "abc" entry in the CA popup

        You should see parameters a, b, and c, each with a type of Object

        Show
        Kevin Lindsey added a comment - Create a new Web Project Create a new JS file Paste the following code into the JS file /** * This is a description of abc */ function abc(a, b, c) {} Type 'a' on a new line. The content assist popup should appear. If it doesn't, force it to show using ctrl-space Select the "abc" entry in the CA popup You should see parameters a, b, and c, each with a type of Object
        Hide
        Shalom Gibly added a comment -

        Verified on Titanium Studio, build: 2.0.2.201204190851

        Show
        Shalom Gibly added a comment - Verified on Titanium Studio, build: 2.0.2.201204190851

          People

          • Assignee:
            Kevin Lindsey
            Reporter:
            Kevin Lindsey
          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: