Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Exception when refactoring a file

LEGEND ,
Apr 07, 2010 Apr 07, 2010

G'day

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:

refactor.png

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.

--

Adam

TOPICS
Builder
346
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2010 Apr 07, 2010
LATEST

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

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

<cfcomponent>

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

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).

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources