1 Reply Latest reply on Apr 7, 2010 4:09 AM by Adam Cameron.

    Exception when refactoring a file

    Adam Cameron. Level 5


      I just tried to use CFB's refactoring to rename one of my CFCs.  The only place the CFC was referenced in my project was in its own init() method (as the returntype).  The refactoring system correctly identified this.


      When I ran the refactoring, I got this error msg:




      Whats that mean then?  The CFC is 900-odd lines long, and reference to the CFC is on line 24 (which is the eighth line of actual code in the file).


      There are fewer than 100 files in the project.




        • 1. Re: Exception when refactoring a file
          Adam Cameron. Level 5

          As a follow-up to this, I tested renaming a very simple CFC file, thus:


          <!--- Foo.cfc --->



              <cffunction name="init" returntype="com.mycompany.myapp.components.Foo">
                  <cfreturn this>


          I refactored this so the file name was Bar.cfc.  This all worked, except it did not rename the file, it created a new file with the new file name.  The old file is still there.  This is not what the process of "renaming" should do.  Bug?


          It did, however, rename the CFC reference in the returntype (in both Foo.cfc and Bar.cfc).