Hi all. I have a question about CFC folder mapping...
# ide
l
Hi all. I have a question about CFC folder mappings in CFB extension in VSC: We have per-application mappings defined in Application.cfc, for example: <cfset This.mappings["/myplace"] = "/some/path/to/place"> We use this in our code to instantiate components like this: <cfset fruits=CreateObject("component","myplace.fruits")> In CFB 2018 (in Eclipse), there is a per-project setting "CFC Mappings -> CFC Folder Mappings" which can be used to "teach" CFB about the per-application mappings. I can add "myplace -> /some/path/to/place" in the list of such mappings. This allows CFB 2018 to correctly resolve "myplace.fruits" and recognise it as a valid CFC. It can also provide Code Assist, for example it can correctly offer assistance with method calls on the "fruits" object. In CFB extension in VSC, currently the "fruits" instantiation line above shows up as a problem, with the message: "Unresolved component myplace.fruits". It is also putting brown squiggles under "myplace.fruits" in the editor. I would like to set up the per-project mappings like in CFB 2018, but I can't find the equivalent setting in the VSC extension. I found some minimal per-project properties like the name and CFML dictionary version when I edit the project properties, but nothing about mappings. What's the solution?
Just to add, in a large existing project currently many files are showing up with "problems" on many lines because the CFB extension does not recognise the CFCs being accessed via a mapping like above. This is causing a large amount of spam in VSC's "Problems" view, making it hard to see actual problems. If CFB in VSC can't be taught about the mappings, is there at least a way to suppress "problems" due to these unrecognised CFCs?