platfrom:config , platform:base等
不仅可在代码中直接使用,还可以在配置文件中使用
eg:
//Eclipse平台协议
URL url = new URL("Platform:config/abc.txt");//相对于rcp的configuration目录下的资源
// URL url = new URL("Platform:base/abc.txt");//,相对于rcp根目录下的资源
System.out.println(FileLocator.toFileURL(url).getFile());;
URL url = new URL("platform:config/themes/" + "Default" + "/"
+ valueStr);
url = FileLocator.toFileURL(url);
在plugin.xml中使用
eg:
<extension
id="product1"
point="org.eclipse.core.runtime.products">
<product
application="cn.com.xyz.workbench.application"
name="前端系统">
<property
name="aboutImage"
value="icon/client.gif">
</property>
<property
name="appName"
value="前端系统">
</property>
<property
name="preferenceCustomization"
value="platform:config/xyz.properties">
</property>
</product>
</extension>
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="cn.com.xyz.workbench.application"
name="综合前端系统">
<property
name="aboutImage"
value="platform:/plugin/cn.com.xyz.workbench/icon/client.gif">
</property>
<property
name="appName"
value="前端系统">
</property>
</product>
</extension>
在config.ini中使用
osgi.splashPath=platform:/base/plugins/cn.com.sinoufc.workbench
eclipse.product=cn.com.sinoufc.workbench.product1
osgi.bundles.defaultStartLevel=4
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start