Hi. No, you’re correct that IC is doing that. It’s in support for *.resource files in metadata format projects and allows IC to determine the actual file type for those files dynamically at runtime based the <contentType> value in the associated *.resource-meta.xml file. That way the static resource is opened in the correct editor, etc., even though the file extension doesn’t provide any insight into the actual file type. IC does similar for other ambiguous file types such as documents, content assets, and email templates.
Of course, that’s not necessary in source format projects where those files are named with the correct extensions on disk, and it sounds like for you this is causing an issue because you have another registation for that extension.
I can certainly allow you to disable the dynamic file type discovery logic if you’re definitely never going to be using metadata format projects. Would you mind logging a bug in the public issue tracker for that so that it’s concretely on my radar?
Regards,
Scott Wells
Kris, do you think you could put together a very simple, standalone source format project that reproduces this behavior for you? I’m just not seeing, and I’m sure it’s because I think I’m modeling exactly what you have, but I’m not. It should hopefully be as simple as a mostly empty source format project with an sfdx-project.json file in the root, a dummy Apex class under force-app/main/default, and a stub license.resource file under robot/automation/....
Apologies for having to ask you to do that, but I think that will help me reproduce and fix the behavior properly quickest.
Regards,
Scott Wells