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.
Product Version = NetBeans IDE Dev (Build 201011210001) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.6.0_22 Runtime = Java HotSpot(TM) Client VM 17.1-b03 This code : // Get prco try { $prco = Project::GetByIdAndOrg( $_GET['proj_id'], $org ); } catch ( Exception $e ) { return $this->ShowError( Messages::GetMessage( 'CommonNonExistant' ) ); } The static method GetByIdAndOrg doesnt exit so when i use the button create method to create it in the class but then i get this : /** * Customer * @param Customer $val Setter * @return Customer */ public function Customer( $val = false ) { if ( $val !== false ) { if ( !($val instanceof Customer ) ) { throw new Exception( "Wrong object type!" ); } $this->_cust = $val; public static function GetByIdAndOrg($_GET, $org) { } } if ( !isset( $this->_cust ) ) { $this->_cust = Customer::Get($this->_cust_id); } return $this->_cust; } It creates the funtion within an existing function + not on one line aswell , when i do CTRL+Z on the class i get : /** * Customer * @param Customer $val Setter * @return Customer */ public function Customer( $val = false ) { if ( $val !== false ) { if ( !($val instanceof Customer ) ) { throw new Exception( "Wrong object type!" ); } $this->_cust = $val; public static function GetByIdAndOrg($_GET, $org) { } } if ( !isset( $this->_cust ) ) { $this->_cust = Customer::Get($this->_cust_id); } return $this->_cust; } I set to P2 because i think this is quite critical
This belongs to CND I guess. Guys, please evaluate. Thanks!
Oh, sorry. I meant another bug. Reassigning to PHP for evaluation.
I'm sorry but I'm not able to reproduce the issue from above steps. Could you please be more specific? For example I would like to know a class name where the first code snippet (marked as "This code:") belongs into and what a button you mean in the sentence "when i use the button create method".
The class name is a cammelcase class name, i've had it in multiple classes so i dont think the name is emportant. You could use SubCategory. With the button i mean the red icon on the left side (where the line numbers are )
I have tried to reproduce the bug as well without a success. It worked for me correctly. Is it possible to attach your file where it fails? It strange that you get an error (red square). There shouldn't be an error during such refactoring. The error is probably the reason why it's not working for you. What's the error is saying?
I don't have enough informations for this. Please reopen when you will be able to reproduce or provide more information. IMHO the wrong behavior was because the file already was wrong before the refactoring.