Bug 178236 - Refactoring does not update overridden functions
Refactoring does not update overridden functions
Status: VERIFIED FIXED
Product: javafx
Classification: Unclassified
Component: Unsupported
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: J Bachorik
issues@javafx
68patch1-verified
:
Depends on:
Blocks: 173077
  Show dependency treegraph
 
Reported: 2009-12-07 06:18 UTC by Alexandr Scherbatiy
Modified: 2010-02-02 03:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-12-07 06:18:40 UTC
JavaFX 1.3
Build  #58 Dec 7, 2009 12:00:35 AM

  Product Version         = NetBeans IDE 6.8 (Build 200912041610)
(#ec9be6a6486c)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun
Microsystems Inc.

Steps to reproduce:

- Create A class:
--------------  A.fx  ----------------------
public abstract class A{
    public var name:String = "A";
    public abstract function f():Void;
}
--------------------------------------------

- Create B class:
--------------  B.fx  ----------------------
class B extends A{
    override var name = "B";
    override function f() {
        println("H");
    }
}
--------------------------------------------

- Refactor -> Rename the 'f' function to 'g' in the A class

B.fx:11: Function f() declared 'override' but does not override another function.
    override function f() {

B.fx:9: javafxapplication1.B is not abstract and does not override abstract method g() in javafxapplication1.A
class B extends A{

2 errors
Comment 1 J Bachorik 2009-12-10 03:00:31 UTC
fixed in http://hg.netbeans.org/javafx/rev/798b6ea682f7
Comment 2 Alexandr Scherbatiy 2009-12-14 07:00:55 UTC
The issue is still reproduced in NetBeans-JavaFX-Soma: #65 Dec 14, 2009 12:00:35 AM
Comment 3 J Bachorik 2009-12-14 07:10:11 UTC
Are you testing it on a clean user dir? This issue depends on scanned data which will be missing if not using a clean userdir or not making change to class B and saving.
Comment 4 Alexandr Scherbatiy 2009-12-14 07:21:55 UTC
Yes, I cleaned the userdir. It does not help.
I also saved all files before refactoring.


I use the NetBeans IDE 6.8 RC1 (Build 200911252200)
and install the JavaFX plugin NetBeans-JavaFX-Soma: #65

Should I use the new NetBeans build?
Comment 5 J Bachorik 2009-12-15 02:21:06 UTC
I can confirm the bug. Working on resolution.
Comment 6 J Bachorik 2009-12-15 03:41:06 UTC
Changeset: 995a134bb124
Author:    Jaroslav Bachorik <yardus@netbeans.org>
Date:      2009-12-15 11:40
Message:   Issue #178236 - Refactoring does not update overridden functions
use sypertypes when searching for overriden methods and variables
Comment 7 Alexandr Scherbatiy 2009-12-18 03:41:13 UTC
verified in  NetBeans-JavaFX-Soma: #69
Comment 8 rbalada 2010-01-21 03:11:40 UTC
The fix has been ported to branch release68_fixes
http://hg.netbeans.org/javafx/rev/108f46bcff39
Comment 9 Alexandr Scherbatiy 2010-01-26 04:21:01 UTC
The issue is reproduced in NB 6.8 patch1 2010-01-25_21-27-59

In NB 6.9 Build 201001190201 shows message "Cannot rename here".
So it is not possible to rename overridden function in NB 6.9 now.
Comment 10 rbalada 2010-01-27 09:15:40 UTC
Unable to reproduce in Nb 6.8 Patch 1 after merging the TreePathHandle -> ElementLocation refactoring of "Refactoring".

http://hg.netbeans.org/javafx/rev/430337942c2b
Comment 11 Alexandr Scherbatiy 2010-01-28 03:41:23 UTC
Verified in NB 6.8 Patch1 2010-01-28_00-36-51
Comment 12 Alexandr Scherbatiy 2010-02-02 03:50:19 UTC
verified in NetBeans-JavaFX-Soma: #140


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