Eclipse: Storing info in .project file(Eclipse:将信息存储在 .project 文件中)
问题描述
我正在尝试将信息与项目(某些属性)相关联.我尝试使用持久存储(getPersistentProperty() 和 setPersistentProperty()).
这样做的问题是,当我导出项目并将其重新导入到不同的工作区时,这些属性就消失了(因为它们存储在工作区的 .metadata 文件夹中的某个位置).
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).
所以我在想,如果有办法将信息存储在 .project 文件中,那么这将解决我的问题,因为导出项目时始终包含该文件.
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.
是否有 API 可以做到这一点?
Is there an API to do that?
任何指针将不胜感激!谢谢!
Any pointers would be appreciated! Thank you!
问候,T
推荐答案
您可能需要考虑使用 配置范围 跨工作区存储首选项.
请参阅 项目范围偏好.
使用 Store(如 this thread 中所述),您还获取有关配置性质的一些详细信息在此常见问题解答中一个>.
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 文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Eclipse:将信息存储在 .project 文件中
基础教程推荐
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
