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

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

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

    eagle

    學無止境,細節決定成敗.
    posts - 12, comments - 11, trackbacks - 0, articles - 2
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    RCP 常見問題學習總結

    Posted on 2009-06-05 21:54 月下孤城 閱讀(1595) 評論(0)  編輯  收藏 所屬分類: eclipse RCP

    網站推薦:
    1.一個java方面的博客,里面有很多eclipse的筆記:
    http://liugang594.javaeye.com/category/24822
    http://wokanxing.info/2007/05/undo-support-in-rcp/(user:eagle00001)

    一、Eclipse Product導出產品發生中文亂碼解決方法?
        在build.properties文件中加上“javacDefaultEncoding..=UTF-8”。

    二、讓rcp開發的產品或插件在每次啟動程序時保持最后退出狀態,如何實現?
        在ApplicationWorkbenchAdvisor.class類中重構
        public void initialize(IWorkbenchConfigurer configurer) {
                    ...
                    //以下是新增代碼
                    //是否保存最后程序窗口狀態
                    configurer.setSaveAndRestore(true);
                    ...
          }

        三、Eclispe Application樣式設置(垃圾回收器顯示、特效效果、tab頁面流線顯示)?
               
            在ApplicationWorkbenchAdvisor中添加

                public void initialize(IWorkbenchConfigurer configurer) {
               
                     IPreferenceStore preStore = PlatformUI.getPreferenceStore();
                    //顯示特效
                    //preStore.setDefault(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS, true);
                    //不顯示傳統tab樣式
                    preStore.setDefault(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS,                                         false);
                    //在狀態欄是否顯示垃圾回收器功能
                    preStore.setDefault(IWorkbenchPreferenceConstants.SHOW_MEMORY_MONITOR, true);
                }

     四、 為Action添加Command命令、在Command命令binding快捷鍵、并在PreferencePage系統屬性中統一設置Command和                Key的映射。 
                   
               plugin.xml文件設置Section如下所示:

         //聲明應用'首選項'配置頁面
         <extension
             point="org.eclipse.ui.preferencePages">
            //首選項一般系統參數設置
          <page
                class="rcpdemo.preferences.GeneralPreferencePage"
                id="rcpdemo.preferences.GeneralPreferencePage"
                name="General">
          </page>
            //在首選項頁面中添加應用全局Action快捷鍵設置頁面
          <page
                class="org.eclipse.ui.internal.keys.NewKeysPreferencePage"
                id="rcpdemo.preferences.keys"
                name="Keys"/>
       </extension>
       <extension
             point="org.eclipse.core.runtime.preferences">
          <initializer
                class="rcpdemo.preferences.PreferenceInitializer">
          </initializer>
       </extension>
        //聲明action命令   
       <extension
             point="org.eclipse.ui.commands">
            //命令分類目錄聲明
          <category
                description="Generic Commands Category"
                id="rcpdemo.genericCmdCategory"
                name="常用命令目錄"/>
            /**命令聲明:id對應相應Action類中的唯一標志id.
             * 注意:通過映射了key的Action在ApplicationActionBarAdvisor.java中的makeActions方 
             * 法中一定要通過register方法注冊該Action.
            */      
          <command
                categoryId="rcpdemo.genericCmdCategory"
                description="CustomerViewActionCommand"
                id="rcpdemo.actions.CustomerViewAction"
                name="客戶視圖命令"/>
            //key綁定commandId指定的Command.keySequence指定命令快捷鍵,其中
            //M是對鍵盤功能鍵跨系統平臺的通用處理(M1:Ctrl;M2: Shift;M3:Alt).
          <keyBinding
                commandId="rcpdemo.actions.CustomerViewAction"
                keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration"
                keySequence="M1+M2+A"/>  
          <keyBinding
                commandId="org.eclipse.ui.file.exit"
                keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration"
                keySequence="M1+Q"/>        
       </extension>

       
     五、RCP中一些可重用的Actions、pages、views。
           
           1.重用的Actions可在ActionFactory類中找到。
           2.重用的pages、views可在ExtensionFactory類中找到。
            <extension point="org.eclipse.ui.views">
              <view
                   class="org.eclipse.ui.ExtensionFactory:progressView"
                   icon="icons/progress.gif"
                   id="org.eclipsercp.hyperbola.views.progress"
                   name="Progress"/>
            </extension>
            以上是在plug-in.xml中引用的配置信息。其中view節點的class屬性:
            "org.eclipse.ui.ExtensionFactory:progressView"
            -----'org.eclipse.ui.ExtensionFactory':ExtensionFactory類路徑。
            -----'progressView':ExtensionFactory類中對應靜態熟悉值propressView.




    ---------------------
    月下孤城
    mail:eagle_daiqiang@sina.com

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


    網站導航:
     
    主站蜘蛛池模板: 天天综合亚洲色在线精品| 亚洲人成777在线播放| 亚洲av无码一区二区三区人妖| 在线a免费观看最新网站| 亚洲av永久无码制服河南实里| 久久精品免费大片国产大片| 自拍偷自拍亚洲精品第1页| 一区二区三区在线免费| 国产成人亚洲精品影院 | 亚洲最大的成人网站| 18勿入网站免费永久| 天天爽亚洲中文字幕| 免费看香港一级毛片| 国产成人久久精品亚洲小说| 亚洲区日韩区无码区| 免费播放在线日本感人片| 亚洲短视频男人的影院| 亚洲一区免费视频| 亚洲一级高清在线中文字幕| 男人的好看免费观看在线视频| 亚洲精品无码专区在线| 亚洲第一页日韩专区| 两个人看的www高清免费视频| 亚洲国产精品一区二区久久| 在线永久免费的视频草莓| 亚洲sm另类一区二区三区| 亚洲AV无码乱码在线观看性色扶 | 国产美女精品视频免费观看| 日本永久免费a∨在线视频| 亚洲AV永久无码精品水牛影视| 三年片在线观看免费观看大全一 | 中文字幕视频免费在线观看| 久久精品7亚洲午夜a| 曰批视频免费30分钟成人| 直接进入免费看黄的网站| 亚洲AV无码日韩AV无码导航| 69天堂人成无码麻豆免费视频| 在线观看亚洲视频| 亚洲精选在线观看| 日韩一级视频免费观看| 免费人成网站在线观看不卡|