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 - Opens dialog for rename refactoring when it should do inline refaactoring
Summary: Opens dialog for rename refactoring when it should do inline refaactoring
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-27 16:26 UTC by BullfrogBlues
Modified: 2016-06-10 11:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.