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 226799

Summary: Opens dialog for rename refactoring when it should do inline refaactoring
Product: php Reporter: BullfrogBlues
Component: RefactoringAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal CC: sdedic
Priority: P4    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description BullfrogBlues 2013-02-27 16:26:34 UTC
TEST CASE
---------

function testNetbeansIDE()
{
    $variableName = "test";
}

If the cursor is on "variableName" Ctrl+R will put us in inline refactoring mode.

However, if you put the cursor at |$variableName Ctrl+R opens a "Reanme" dialog for refactoring. It doesn't need to open the dialog, it should be inline refactoring.
Comment 1 Ondrej Brejla 2013-02-28 09:34:57 UTC
Not so easy as it looked like :) Will have to solve it together with CSL infrastructure, which provides a mechanism for instant rename.
Comment 2 Ondrej Brejla 2013-02-28 11:07:41 UTC
We need a change in CSL API (introduce new InstantRenamer2 interface which will provide a method for getting an OffsetRange which will be used as a reference to region, where physical rename will be applied).

E.g.

public interface InstantRenamer2 extends InstantRenamer {
    
    @NonNull
    OffsetRange getReferenceRegion(@NonNull ParserResult parserResult, int caretOffset);
    
}
Comment 3 Tomas Mysik 2016-06-10 11:29:56 UTC
Not a P3 IMHO.

Thanks for reporting.