Community
Participate
Working Groups
The syntax for defining file associations is miss leading. The "*" in a definition like "*.txt" in NOT a wildcard as expected, but only a placeholder. When trying to use "*_c.txt", this definition is ignored at all. When generating code to be included in source or header files, it would be handy to have regular expressions for file name definition.
To match the file "config.h.in", the pattern "*.in" works, but "*.h.in" does not. See following Stack Overflow question: https://stackoverflow.com/q/50161965/6505250
(In reply to Christian Waldmann from comment #0) > When generating code to be included in source or header files, it would be > handy to have regular expressions for file name definition. That would be nice, but I would really like to see a quick fix for this in the form of at least having the wildcard work the way it's supposed to - and at least for a single wildcard. So even without any UI changes this should not be a hard fix. (PS - I'm the person who asked the SO question.)
I can't find it right now, but I recall having a discussion about this somewhere, and concluding that the relevant code that would need changes is inside the Eclipse Platform itself, not CDT.
In particular, for the .h.in case, note that ContentTypeManager.getFileExtension() is implemented using lastIndexOf('.') [1]. I believe that would need to change. [1] http://git.eclipse.org/c/gerrit/platform/eclipse.platform.runtime.git/tree/bundles/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentTypeManager.java#n107