Bug 226325 - Inconsistent results for Refactor|Preview
Inconsistent results for Refactor|Preview
Status: NEW
Product: groovy
Classification: Unclassified
Component: Refactoring
7.3
PC Linux
: P3 (vote)
: TBD
Assigned To: Martin Janicek
issues@groovy
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo