获取当前RCP应用路径数据存储路径

来源:互联网 发布:希拉里 坐牢 知乎 编辑:程序博客网 时间:2024/05/22 06:37

代码:

final IPreferenceStore store = TourbookPlugin.getDefault().getPreferenceStore();// 电塔图标注册。store.setDefault("TowerImageFilePath", (Platform.getInstanceLocation().getURL().getPath() + "icons/big.png"));


注意其中的Platform.getInstanceLocation(), 其即为获取数据存储路径的主要代码。



原创粉丝点击