<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    RCP學習筆記(RCP Tutorial)
    在一個RCP中,我們將org.eclipse.core.runtime.applications擴展(extension)定義為工程中主程序的id,將org.eclipse.ui.perspectives擴展定義為工程中Perspective的id。

    RCP的最小Plugin集合為org.eclipse.core.runtime、org.eclipse.ui,所以我們肯定要將他們加到Dependencies Tab

    Plugin.xml用到的變量(如:%pluginName)在build.properties里定義,可以通過它實現國際化

    plugin.xml的大體結構:
    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.1"?>
    <plugin
     id="org.eclipse.ui.tutorials.rcp.part1"
     name
     version
     provider-name
     <runtime>
      <library name="yourproject.jar">
       <export name="*">
      </library>
     </runtime>
     <requires>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="org.eclipse.ui"/>
     </requires>

     <extension
      id="RCPApplication"
      point="org.eclipse.core.runtime.applications">
      <application>
       <run
        class="your application path">
       </run>
      </application>
     </extension>
     <extension
      point="org.eclipse.ui.perspectives">
      <perspective
       name="Display Name"
       class=
       id="eclipse.ui.tutorials.rcp.part1.RCPPerspective">
      </perspective>
     </extension>
    </plugin>

    由于歷史原因,eclipse優先考慮plugin的id而不是最頂層元素(如extension)的,所以盡管plugin.xml聲明extension的id為RCPApplication,但這個extension的id還是org.eclipse.ui.tutorials.rcp.part1.RcpApplication。而perspective的id寫在了perspective這個子元素里(不是頂層id),所以他的id要寫成org.eclipse.ui.tutorials.rcp.part1.RCPPerspective,而不能像RCPApplication extension的id那樣縮寫。

    Main program:
    主程序入口由org.eclipse.core.runtime.applications extension指定,告訴Eclipse runtime生成一個它的實例。Main program要實現IPlatformRunnable接口,程序執行代碼放在run()里。


    一個Perspective(視角:由視圖、編輯器、導航器組成)
    至少要定義一個Perspective,實現IPerspectiveFactory,并將它賦值給org.eclipse.ui.perspectives extension。這個接口最主要的方法是createInitialLayout(),他負責管理程序start時views和editor的放置方式等。

    Workbench Advisor管理Workbench上的toolbar、perspectives等的添加和刪除(主要方法:getInitialWindowPerspectiveId()返回默認Perspective的id)

    文章最后提到怎么部署一個獨立的RCP程序,步驟比較煩,3.1M7以上版本可以參考PainFree RCP



    版權所有 羅明
    posted on 2005-06-24 09:25 羅明 閱讀(264) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
     
    主站蜘蛛池模板: 免费a级黄色毛片| 国产小视频在线观看免费| 亚洲午夜无码片在线观看影院猛 | 最新精品亚洲成a人在线观看| 久久亚洲欧美国产精品| 永久免费看bbb| 久久亚洲精品无码av| 国产精品久久免费视频| 污污免费在线观看| 亚洲视频在线一区二区| www在线观看播放免费视频日本| 久久精品国产亚洲Aⅴ蜜臀色欲| eeuss草民免费| 亚洲AV成人精品网站在线播放| 可以免费观看的毛片| 亚洲精品中文字幕无码AV| 在线视频精品免费| 亚洲欧美综合精品成人导航| 又黄又大又爽免费视频| 久草免费福利在线| 97se亚洲综合在线| 成人免费a级毛片| 美女视频免费看一区二区| 精品国产日韩亚洲一区| 国产免费AV片在线观看| 精品亚洲成A人无码成A在线观看| 老司机永久免费网站在线观看| 无遮挡a级毛片免费看| 亚洲精品夜夜夜妓女网| 在线a级毛片免费视频| 毛片亚洲AV无码精品国产午夜| 久久影院亚洲一区| 18国产精品白浆在线观看免费| 国产亚洲欧美在线观看| 久久精品夜色国产亚洲av| 1000部拍拍拍18勿入免费视频下载| 亚洲精华国产精华精华液网站| 亚洲伊人色欲综合网| 毛片a级毛片免费播放100| 国产精品美女久久久免费| 国产亚洲sss在线播放|