Eclipse: Storing info in .project file

為{幸葍}努か 提交于 2019-12-19 16:27:22

问题


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, T


回答1:


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.



来源:https://stackoverflow.com/questions/3525213/eclipse-storing-info-in-project-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!