Aptana Studio
  1. Aptana Studio
  2. APSTUD-1714

php @var type-hinting has no effect on code assist

    Details

      Description

      {html}<div><p>When using a @var annotation no code assist is being displayed
      on a variable not otherwise explicitly declared in current
      scope.</p>
      <pre>
      <code class="php"><?php
      class Foo {
      public function bar() {}
      }

      $foo = new Foo();
      $foo->bar(); // When typing $foo-> code assist shows bar() as option

      /* @var $definedOutsideScope Foo */
      $definedOutsideScope->bar(); // After typing $definedOutsideScope-> I would expect the same code assist

      $arrayOfFoo = array(new Foo(), new Foo(), new Foo());
      foreach ($arrayOfFoo as $oneFoo) { /* @var $oneFoo Foo */ $oneFoo->bar(); // Again, after typing $oneFoo-> I would expect the code assist the appear }
      ?></code>
      </pre></div>{html}

        Issue Links

          Activity

          No builds found.
          Joram van den Boezem created issue -
          Joram van den Boezem made changes -
          Field Original Value New Value
          Labels 3 aptana codeassist php phpdoc
          Ingo Muschenetz made changes -
          Assignee Ingo Muschenetz [ ingo ] Shalom Gibly [ sgibly ]
          Fix Version/s Aptana Studio 3.1 [ 11505 ]
          Priority Major [ 3 ] Trivial [ 5 ]
          Ingo Muschenetz made changes -
          Labels 3 aptana codeassist php phpdoc 3 aptana codeassist editors php phpdoc typing
          Ingo Muschenetz made changes -
          Fix Version/s Aptana Studio 3.0.5 [ 11504 ]
          Fix Version/s Aptana Studio 3.1 [ 11505 ]
          Nikolai Derzhak made changes -
          Workflow Copy of jira (LH migration) [ 83177 ] Appc-Jira [ 84550 ]
          Hide
          Matej Szendi added a comment -

          I like this feature in others IDE, so +1, please.

          Show
          Matej Szendi added a comment - I like this feature in others IDE, so +1, please.
          Ingo Muschenetz made changes -
          Fix Version/s Aptana Studio 3.0.5 [ 11504 ]
          Shalom Gibly made changes -
          Fix Version/s Aptana Studio 3.1 [ 11505 ]
          Component/s content-assist [ 10711 ]
          Component/s editor [ 10704 ]
          Component/s php [ 10709 ]
          Hide
          Shalom Gibly added a comment -

          Implemented this support for 3.1.
          We actually had in place some support for that, but it was quite awkward. For example:

          /*
           * @var Foo
           */
           $myVar; // Redundant...
           $myVar -> // CA for Foo's functions
          

          The fixed implementation adds support for the PDT syntax:

          /* @var $myVar Foo */
          $myVar -> // CA for Foo's functions
          

          We now support both ways.

          Show
          Shalom Gibly added a comment - Implemented this support for 3.1. We actually had in place some support for that, but it was quite awkward. For example: /* * @var Foo */ $myVar; // Redundant... $myVar -> // CA for Foo's functions The fixed implementation adds support for the PDT syntax: /* @var $myVar Foo */ $myVar -> // CA for Foo's functions We now support both ways.
          Shalom Gibly made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Shalom Gibly made changes -
          Summary php @var annotation has no effect on code assist php @var type-hinting has no effect on code assist
          Ingo Muschenetz made changes -
          Fix Version/s Aptana Studio 3.0.6 [ 12271 ]
          Fix Version/s Aptana Studio 3.1 [ 11505 ]
          Ingo Muschenetz made changes -
          Fix Version/s Aptana Studio 3.0.7 [ 12373 ]
          Fix Version/s Aptana Studio 3.0.6 [ 12271 ]
          Hide
          Joel Witt (Inactive) added a comment -

          Aptana Studio 3, build: 3.0.7.201111182245
          Windows 7

          Confirmed support of the @var annotation (please see capture at http://www.screencast.com/t/rQi28nqumaS).

          Show
          Joel Witt (Inactive) added a comment - Aptana Studio 3, build: 3.0.7.201111182245 Windows 7 Confirmed support of the @var annotation (please see capture at http://www.screencast.com/t/rQi28nqumaS ).
          Joel Witt (Inactive) made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Nikolai Derzhak made changes -
          Workflow Appc-Jira [ 84550 ]  PyDev migration copy of Appc-Jira [ 114846 ]
          Nikolai Derzhak made changes -
          Workflow  PyDev migration copy of Appc-Jira [ 114846 ] Appc-Jira [ 122488 ]
          Rael Gugelmin Cunha made changes -
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          78d 14h 9m 1 Shalom Gibly 25/Aug/11 9:37 AM
          Resolved Resolved Closed Closed
          86d 21h 46m 1 Joel Witt (Inactive) 20/Nov/11 6:24 AM

            People

            • Assignee:
              Shalom Gibly
              Reporter:
              Joram van den Boezem
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development