Eclipse:将信息存储在.project文件中 [英] Eclipse: Storing info in .project file
问题描述
我正在尝试将信息与项目(某些属性)相关联。我尝试使用持久性存储( getPersistentProperty()
和 setPersistentProperty()
)。
问题在于,当我导出项目并将其重新导入到不同的工作区时,这些属性已经消失了(因为它们被存储在 .metadata
文件夹中的某个位置工作空间)。
所以我在想,如果有一种方法可以将信息存储在 .project
文件中这将解决我的问题,因为在导出项目时始终包含此文件。
有没有API?
$ b $任何指针都将不胜感激!谢谢!
Regards,
Tamer
您可能需要考虑使用 配置范围 来存储首选项工作区。
请参阅 项目范围首选项 。
使用Store(如这个线程),你还可以得到一些关于配置性质的细节此常见问题。
I'm trying to associate information with projects (certain properties). I tried using the persistence store (getPersistentProperty()
and setPersistentProperty()
).
The problem with that is that when I export the project and re-import it in a different workspace, those properties are gone (since they are stored somewhere in the .metadata
folder of the workspace).
So I was thinking that if there's a way to store the info in the .project
file then this would solve my problem because this file is always included when projects are exported.
Is there an API to do that?
Any pointers would be appreciated! Thank you!
Regards, Tamer
You may need to consider using a configuration scope to store preferences across workspace.
See project scope preferences.
Using Store (as discussed in this thread), you also get some details on the nature of a configuration in this FAQ.
这篇关于Eclipse:将信息存储在.project文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!