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 226325 - Inconsistent results for Refactor|Preview
Summary: Inconsistent results for Refactor|Preview
Status: NEW
Alias: None
Product: groovy
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 12:47 UTC by Vladimir Riha
Modified: 2013-02-19 12:47 UTC (History)
0 users

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 Vladimir Riha 2013-02-19 12:47:13 UTC
This is a bit confusing, let's say I have 2 groovy classes, each in separate file:

class Foo {
     def id
      String test(){
           return this.id
      }
}

and

class Bar {
    def id
    String test(){
        def d = new Foo() 
        d.id
        return this.id
    }
	
}


Now in Bar.groovy, place cursor on line with "return this.id" inside the "id" and try to refactor it and then preview button.

=> Displayed results of preview action do not list Foo.groovy file at all but the show the "d.id" where "d" is instance of Foo. However, if you try the same but with cursor in "d.i|d" (again Bar.groovy), it shows preview results from both files. I think it should act the same in both cases, either offer results from both files  or (if supported) resolve type of "d" and do not show it at all.


Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.6.0_39; Java HotSpot(TM) Client VM 20.14-b01
Runtime: Java(TM) SE Runtime Environment 1.6.0_39-b04
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)