This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200286 - Undefined Class Method generation
Summary: Undefined Class Method generation
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 13:37 UTC by baxter
Modified: 2012-04-24 15:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description baxter 2011-07-21 13:37:05 UTC
I believe a productive enhancement to the netbeans editor would be to allow developers to generate methods within a class that are currently not defined, as well as a visual clue for class methods that aren't defined to reduce typo errors, this would be disabled for class structures that have the __call function defined.

The usage is for class structures that are prototyped first and then developed

Example:

Developer prototypes the main functino

class Something {
   public function run()
   {
       $this->initAdapter();

       $something = $this->grabSomething();

       if ($something instanceof SomeOtherClass) 
       {
           $this->runTask($something);
       }
   }
}

class Http {
   //alt + insert here would show a menu "Insert Undefined Methods" simular to 
   //the create Getters + Setters menu, possibly with an option for visibility
}

Result:

class Something {
   public function run()
   {
       $this->initAdapter();

       $something = $this->grabSomething();

       if ($something instanceof SomeOtherClass) 
       {
           $this->runTask($something);
       }
   }

   public function initAdapter()
   {

   }
   
   /**
   *  @return SomeOtherClass
   **/
   public function grabSomething()
   {

   }

   public function runTask(SomeOtherClass $task) 
   {

   }
}

Thanks for a great editor!

Chers,

Jason