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 239814

Summary: When clicks "Find usages" shows error alert "Cannot refactor here".
Product: cnd Reporter: artavazd
Component: NavigationAssignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description artavazd 2013-12-26 19:03:42 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

In this (working) piece of code 
" ...
$cfg->max_number_of_passengers = 25;
$cfg->base_price = 3000;
$cfg->reserving_deadline = 30; 
..."

when I select "Find usages" from context menu when cursor is on e.g. $cfg->base_price the IDE shows alert "Cannot refactor here". This configuration script is being included in all other scripts of the project.

The code itself and the whole project is completely working and errorless.
Comment 1 artavazd 2013-12-26 19:03:45 UTC
Created attachment 143472 [details]
IDE log
Comment 2 Vladimir Voskresensky 2014-01-09 15:36:37 UTC
what do you mean by "script"? 
Which language do you use? Is it a valid C++ code?
Comment 3 Vladimir Voskresensky 2014-01-09 15:43:27 UTC
I was able to compile with gcc:

struct MyStruct {
    int max_number_of_passengers;
    int base_price;
    int reserving_deadline;
};

MyStruct* $cfg;

void foo() {
    $cfg->max_number_of_passengers = 25;
    $cfg->base_price = 3000;
    $cfg->reserving_deadline = 30; 
}
Comment 4 Vladimir Voskresensky 2014-01-09 16:04:06 UTC
http://hg.netbeans.org/cnd-main/rev/ef39158a4c56
Comment 5 Quality Engineering 2014-01-14 02:56:24 UTC
Integrated into 'main-silver', will be available in build *201401140002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ef39158a4c56
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #239814 - When clicks "Find usages" shows error alert "Cannot refactor here".
- dollar is a valid symbol for identifiers in gcc and msvc