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 255640 - Rename variable with multiple assigment hint
Summary: Rename variable with multiple assigment hint
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-01 09:32 UTC by fiala.premysl
Modified: 2015-10-01 09:32 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 fiala.premysl 2015-10-01 09:32:29 UTC
Simplified scenario:

1... $x = 1;
2... $x++;
3... $x = $x +1;
4... echo $x;

There is a warning about multiple assigment (line 3).

I want to rename variable $x. So put (mouse or arrows) cursor on variable $x on line 3.

Press Alt+R
now all $x are selected (lines 1-4). So the renaming toll can't be used here.

It would be much nicer to:
Select only left side of assigment AND the following $x (first $x on line 3 and $x on line 4). Previous $x (and right side of assigment) will be left untouch.

Condition: Select variable to rename AND the multiple assigment hint is present on it (line 3)