如何在 Eclipse 中使用(共享)项目范围的拼写检查字典?
对于多开发人员 Eclipse 项目来说拥有用户词典是没有意义的,因此我正在寻找一种解决方案,允许我与所有用户共享拼写检查词典。
正如您可以想象的那样,每个用户的结帐和日食位置可能不同。
另外,字典应该保留在项目目录中,因为我想将它添加到项目使用的版本控制系统中。
这个问题针对的是最新发布的Eclipse 3.7版本
It doesn't make sense to have user dictionaries for multi-developer Eclipse projects, so I'm looking for a solution that would allow me to share a spell-check dictionary with all users.
As you can imagine the checkout and eclipse locations can be different for each user.
Also the dictionary should stay inside project directory because I want to add it to the version control system used by the project.
This question is targeted to the latest released version of Eclipse 3.7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要在所有项目中使用项目特定的字典,您可以在项目的根目录下创建一个文件
.dictionary
,并将“用户定义的字典”的值设置为 (General- >编辑器->文本编辑器->拼写
)到${project_loc}/.dictionary
。我不知道如何同时拥有全局词典和特定于项目的词典,因为相关的首选项页面仅允许一个“用户定义的词典”。注意:当项目中没有定义 .dictionary 文件时,可能会出现一些非常令人困惑的行为。该行为取决于拼写检查实现的某些隐藏缓存行为以及您之前的操作,并且可能被视为 Eclipse bug。
如果您刚刚打开 Eclipse,进入一个没有
.dictionary
的项目,编辑一些文件,并向字典添加拼写,Eclipse 将创建.dictionary
文件。这很奇怪,因为它甚至不会从主向导页面执行此操作。您必须先手动创建该文件,然后才能指定它。如果您第一次工作的项目有有
.dictionary
,然后切换到另一个没有的项目,编辑一个文件,并添加拼写,Eclipse 会将其添加到原始项目中的.dictionary
!无论刷新项目或文件,删除词典中的全部内容或删除词典文件都不会导致添加的单词被重新标记为拼写错误。然而,关闭并收割 Eclipse 确实会恢复单词的“拼写错误”状态。
仅供参考,我正在使用 Eclipse Indigo Service Release 1; Mac OS X lion 上的内部版本号:20110916-0149。
To use project-specific dictionaries in all your projects, you could create a file
.dictionary
at the root of your project, and set the value of the "User defined dictionary" at (General->Editors->Text Editors->Spelling
) to${project_loc}/.dictionary
. I don't know how to have BOTH a global dictionary and a project-specific dictionary, as the relevant preference page allows only one "User defined dictionary".Note: that there can be some very confusing behavior when you don't have .dictionary files defined in a project. The behavior depends on some hidden cache behavior of the spell-checking implementation and your previous actions, and might be considered an Eclipse bug.
If you have just opened Eclipse, go to a project without a
.dictionary
, edit some file, and add a spelling to the dictionary, Eclipse will create the.dictionary
file. That is strange because it won't even do that from the main wizard page. You have to create the file manually first before you can specify it.If you were first working in project that does have a
.dictionary
, then switch to a different project without one, edit a file, and add a spelling, Eclipse will add it to the.dictionary
in the original project!Deleting entires in the dictionary or deleting the dictionary file will not cause the added words to be relabeled as misspelled, regardless of refreshing the project or file. Closing and reaping Eclipse does, however, restore the "misspelled" status of words.
FYI, I am using Eclipse Indigo Service Release 1; Build id: 20110916-0149 on Mac OS X lion.