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 234343

Summary: renaming a public class property also renames the file!
Product: php Reporter: ianfp
Component: RefactoringAssignee: Ondrej Brejla <obrejla>
Status: VERIFIED WORKSFORME    
Severity: normal CC: ianfp
Priority: P1    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description ianfp 2013-08-13 18:22:01 UTC
When I use Ctrl+R to rename a public class property, the name of the file (but not the class) is changed, too!

Before:
// In file TestClass.php:

<?php

class TestClass {
    public $myProp;
}

$c = new TestClass();
$c->myProp = 'hi';


After:
// The file is renamed to myProp2.php!!

<?php

class TestClass {
    public $myProp2; // I hit Ctrl+R to rename this
}

$c = new TestClass();
$c->myProp2 = 'hi';


When I hit Undo to reverse this change, it reverts the property name but not the filename!
Comment 1 Ondrej Brejla 2013-08-13 19:23:26 UTC
Sorry, but I'm not able to reproduce that in the dev build. Just field is renamed.

Product Version: NetBeans IDE Dev (Build 20130809-251408f83218)
Java: 1.7.0_13; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_13-b20
System: Mac OS X version 10.8.4 running on x86_64; UTF-8; cs_CZ (nb)
Comment 2 mmolda 2013-08-19 16:41:19 UTC
Can not reproduce it either.

Product Version: NetBeans IDE Dev (Build 201308182300)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)