Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 226325 - Inconsistent results for Refactor|Preview
Inconsistent results for Refactor|Preview
Status: NEW
Product: groovy
Classification: Unclassified
Component: Refactoring
PC Linux
: P3 (vote)
Assigned To: Martin Janicek
Depends on:
  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


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(){


class Bar {
    def id
    String test(){
        def d = new Foo()

Now in Bar.groovy, place cursor on line with "return" 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 "" 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. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo