代码:
final IPreferenceStore store = TourbookPlugin.getDefault()
.getPreferenceStore();
// 电塔图标注册。
store.setDefault("TowerImageFilePath", (Platform.getInstanceLocation()
.getURL().getPath() + "icons/big.png"));
注意其中的Platform.getInstanceLocation(), 其即为获取数据存储路径的主要代码。