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 文件中


- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01