开发者

Wildcard for file encoding in org.eclipse.core.resources.prefs?

We have a file naming convention in our CVS project to end a file name with .utf8.txt for text files that use UTF-8 encoding. The problem is I currently have to manually tell Eclipse the file encoding every time I create one of these files by right-clicking the file, selecting 'Properties', then changing the encoding in the drop-down. Now I have a project where I need to add and remove these files often, and it's become quite a pain to have to do this by hand. I'd like to be able to specify somewhere once and for all that files with a name ending in .utf8.txt shall use the UTF-8 encoding.

I've noticed when I make the preference change, Eclipse modifies the org.eclipse.core.resources.prefs Settings file to add the following line:

encoding/file.utf8.txt=UTF-8

So naturally, the first thing I tried was using an asterisk wildcard. However, neither of these worked:

encoding/*.utf8.txt=UTF-8

encoding/**.utf8.txt=UTF-8

Is what I want eve开发者_如何学运维n possible in Eclipse? Also, is the file format for org.eclipse.core.resources.prefs documented somewhere?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜