Platfrom Platform Protocol
Platfrom: config, platform: Base, etc.
It can be used not only in the code, but also in the configuration file.
Eg:
// Eclipse Platform Protocol
URL url = new URL ("Platform: config/abc.txt"); // relative to resources in the configuration directory of RCP
// URL url = new URL ("Platform: base/abc.txt"); //, relative to the resources in the RCP root directory
System. Out. println (filelocator. tofileurl (URL). GetFile ());;
URL url = new URL ("Platform: config/themes/" + "default" + "/"
+ Valuestr );
Url = filelocator. tofileurl (URL );
Use in plugin. xml
Eg:
<Extension
Id = "product1"
Point = "org. Eclipse. Core. runtime. Products">
<Product
Application = "cn.com. XYZ. workbench. Application"
Name = "front-end system">
<Property
Name = "aboutimage"
Value = "icon/client.gif">
</Property>
<Property
Name = "appname"
Value = "front-end system">
</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 = "Integrated front-end system">
<Property
Name = "aboutimage"
Value = "Platform:/plugin/cn.com. XYZ. workbench/icon/client.gif">
</Property>
<Property
Name = "appname"
Value = "front-end system">
</Property>
</Product>
</Extension>
Use 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. aggregator @ 3: Start, org. Eclipse. Core. runtime @ start