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 197700

Summary: refactor tool "Rename" do not work by context menu
Product: php Reporter: interrobang
Component: RefactoringAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: normal CC: josef.sabl, therefromhere, viktorc
Priority: P3 Keywords: PLATFORM
Version: 6.x   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:

Description interrobang 2011-04-13 10:14:23 UTC
Hi,
with the shortcut "Ctrl+R" it is able to rename variables on my source code, if variable is selected.
This option is also available at menu "Refactor". But if i choose "Rename" by using the mouse, a message appear "The Rename refactoring cannot be applied in this context". I guess its a bug.
Comment 1 Jan Becicka 2011-04-18 14:15:19 UTC
It works for me. Please provide steps to reproduce...
Comment 2 interrobang 2011-04-18 14:36:20 UTC
(In reply to comment #1)
> It works for me. Please provide steps to reproduce...

1. create new php file "test"
2. put this into "test":
$foo = 'bar';
echo $foo;

3. click (left) on $foo (it should be get another background color)
3. click (right) on $foo.
3.1 select "Refactor"
3.2 choose "Rename"
4. a message appear "The Rename refactoring cannot be applied in... "

... i've testet on two different computers.
Comment 3 Jan Becicka 2011-04-18 19:31:30 UTC
thanks
Comment 4 Marian Mirilovic 2011-05-18 20:10:34 UTC
*** Bug 190161 has been marked as a duplicate of this bug. ***
Comment 5 Marian Mirilovic 2011-05-18 20:18:05 UTC
*** Bug 197901 has been marked as a duplicate of this bug. ***
Comment 6 Marian Mirilovic 2011-05-18 20:18:13 UTC
*** Bug 188058 has been marked as a duplicate of this bug. ***
Comment 7 Petr Pisl 2011-06-22 14:38:45 UTC
Do you still have this problem some one with current build? I'm not able to reproduce in dev build.
Comment 8 viktorc 2011-06-23 06:10:11 UTC
Hello,

in NetBeans 7.0 (Build 201104080000, PHP) is this bug fixed. Refactor rename called from main menu Refactor -> Rename, context menu Refactor -> Rename or Ctrl+R works correctly.
Thank you.
Comment 9 Petr Pisl 2011-06-23 08:20:47 UTC
Thanks for the message.