NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[fixed] Code completion problem in included file


Joined: 06 Apr 2007
Posts: 48
Location: Gdansk, POLAND
Reply with quote
I have a problem with code completion on included files. It's common solution to include files in MVC frameworks, like this:

class.php:
Code:
<?php
   class AModel
   {
      function showMe() { }
   }
   
   class AController
   {
      /**
      * @return AModel
      */
      function getModel()
      {
         return new AModel();
      }
      
      function showView()
      {
         include('view.html');
      }
   }
   
   $x = new AController();
   $x->showView();
?>


view.html: (html is assigned as PHP5, changing name to view.php doesn't work either)
Code:
<?
   /**
   * @var AController
   */
   $this;
   
   // Code completion works here:
   $myModel = $this->getModel();
   
   // Unfortunately it doesn't follow:
   // Failed to identify type of "$myModel" global variable.
   $myModel->|
?>


It properly recognizes $this and completes its methods, but for some reason, it does not do the same with $myModel. It is supposed to recognize it as AModel instance, as stated in @return for getModel() method. Of course both files are in the same project.

Please let me know if it's going to be fixed - it's very important feature to me Sad.
View user's profileFind all posts by NatanielSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
sure, it will be fixed as well as the problem you reported before.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Apr 2007
Posts: 48
Location: Gdansk, POLAND
Reply with quote
Great, I'm looking forward to it!
View user's profileFind all posts by NatanielSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
fixed Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[fixed] Code completion problem in included file
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic