Skip to main content
Participating Frequently
May 5, 2011
Question

Quick fix is always shown inside a folder

  • May 5, 2011
  • 2 replies
  • 1965 views

I have a project which has many directories. In my webroot I've the structure, CFSelenium/Test/cf9/. Under this directory, in a cfm file a reference is made to a cfc which is directly under the project CFSelenium/selenium.cfc using new CFSelenium.selenium(). This shows a quick fix suggestion in the gutter (where line numbers are usually shown). On clicking the proposal says Create component CFSelenium/selenium. On clicking a message - THIS ALREADY EXISTS is shown, why this suggestion is shown? I already have the cfc and no suggestion should be shown. I can't get Quick fix to work anywhere and I hate to see dirty yellow lines in my code.

What should I do resolve this?

This topic has been closed for replies.

2 replies

12Robots
Participating Frequently
May 19, 2011

I am unable to reproduce this issue. 

I create the folder an directory CFSelenium/selenium.cfc and put a method in it called selenium().  Then I place the following code in my index.cfm in the web root.

<cfset CFSelenium = createObject("component","CFSelenium.selenium") />

<cfset CFSelenium.selenium() />

Quickfix did not come up.

I then removed the selenium() method from the CFC and went back to the index.cfm. Quick fix came up and offered to create the function. I opted for that and it appropriately crated the method in the selenium.cfc.

Are you trying to call CFSelenium.selenium() without creating the object first?

Jason

Participating Frequently
May 19, 2011

First of all thanks for the reply. I've waited for 14 days.

I further investigated this issue and found that the preference option 'Build server settings' under server settings was off, (if I turn it on it will take long hours to index the files since the webroot is too large. I waited for that hours to pass and now I don't see quick fix suggestion).

However,the option 'Index cfcs in your projects' is turned on. Now if I have a cfm in some directory projname/folder/somecfm where in I have specified 'new CFSelenium.selenium()' then it gives out the proposal create component CFSelenium/CFSelenium/component. Is this correct? CFSelenium is my projectname.

Also, while we are on this, if a cfm under a directory has this 'new helloCFC()' (under projname/dir/cfmfile) the first suggestion provided says 'create component projname/helloCFC. This is not correct. How will CFCs get resolved at runtime. Obviously coldfusion will not be able to find the component.

I'm hope this time I get a quick reply.

12Robots
Participating Frequently
May 19, 2011

If you start getting into situations where your paths will be different at runtime than they are in CFBuilder then you need to set up mappings. You need to tell ColdFusion Builder that it should be looking for the CFCs in a different place.

It has been a while since I have needed to set this up, I *think* that if you have App specific mappings that it will be smart enough to use those. Otherwise you may need to right click on the project and set up th mappings in the settings there.

Participating Frequently
May 9, 2011

Oh hello, anyone from Adobe out there? Can you please confirm whether this is a bug. I see Quick fix suggestions all the time inside a folder. Please reply.

Elizabeth.