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

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

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

    eagle

    學(xué)無止境,細(xì)節(jié)決定成敗.
    posts - 12, comments - 11, trackbacks - 0, articles - 2
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    RCP 常見問題學(xué)習(xí)總結(jié)

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

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

    一、Eclipse Product導(dǎo)出產(chǎn)品發(fā)生中文亂碼解決方法?
        在build.properties文件中加上“javacDefaultEncoding..=UTF-8”。

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

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

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

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

         //聲明應(yīng)用'首選項(xiàng)'配置頁面
         <extension
             point="org.eclipse.ui.preferencePages">
            //首選項(xiàng)一般系統(tǒng)參數(shù)設(shè)置
          <page
                class="rcpdemo.preferences.GeneralPreferencePage"
                id="rcpdemo.preferences.GeneralPreferencePage"
                name="General">
          </page>
            //在首選項(xiàng)頁面中添加應(yīng)用全局Action快捷鍵設(shè)置頁面
          <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對(duì)應(yīng)相應(yīng)Action類中的唯一標(biāo)志id.
             * 注意:通過映射了key的Action在ApplicationActionBarAdvisor.java中的makeActions方 
             * 法中一定要通過register方法注冊(cè)該Action.
            */      
          <command
                categoryId="rcpdemo.genericCmdCategory"
                description="CustomerViewActionCommand"
                id="rcpdemo.actions.CustomerViewAction"
                name="客戶視圖命令"/>
            //key綁定commandId指定的Command.keySequence指定命令快捷鍵,其中
            //M是對(duì)鍵盤功能鍵跨系統(tǒng)平臺(tái)的通用處理(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節(jié)點(diǎn)的class屬性:
            "org.eclipse.ui.ExtensionFactory:progressView"
            -----'org.eclipse.ui.ExtensionFactory':ExtensionFactory類路徑。
            -----'progressView':ExtensionFactory類中對(duì)應(yīng)靜態(tài)熟悉值propressView.




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

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
    博客園   IT新聞   Chat2DB   C++博客   博問  
     
    主站蜘蛛池模板: 久久久久久久久免费看无码| 四虎AV永久在线精品免费观看| 亚洲jjzzjjzz在线观看| 国产免费看插插插视频| 国产一级高青免费| 国产成人精品亚洲2020| 亚洲VA综合VA国产产VA中| 久久久精品免费视频| 欧美色欧美亚洲另类二区| 亚洲国产综合无码一区| 四虎成人免费观看在线网址| 最好免费观看高清在线| 亚洲熟妇无码AV| 亚洲av无码精品网站| 国产视频精品免费| 美女内射无套日韩免费播放| 粉色视频免费入口| 亚洲av日韩av无码av| 亚洲熟妇无码八AV在线播放| 在线观看日本免费a∨视频| 最近免费字幕中文大全| 久久久久亚洲精品无码网址色欲 | 国产亚洲真人做受在线观看| 性色av无码免费一区二区三区| 国产一级淫片a免费播放口| 国产精品手机在线亚洲| 亚洲人成7777影视在线观看| 国产成人综合亚洲亚洲国产第一页| 成人免费无码视频在线网站| 国产啪精品视频网站免费尤物| 国产精品久久久久久亚洲小说| 亚洲熟妇av一区二区三区下载| 国产亚洲精品无码拍拍拍色欲| 老司机永久免费网站在线观看| 88av免费观看| 一区二区三区免费在线视频| 亚洲人成网站在线在线观看| 亚洲国产成人91精品| 亚洲国产成人久久综合碰碰动漫3d | 国产电影午夜成年免费视频| 免费日本一区二区|