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

Summary: Undefined Class Method generation
Product: php Reporter: baxter
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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