Eclipse平台的协议

 Platfrom平台协议
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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值