Eclipse平台的協議

來源:互聯網
上載者:User

 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

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.