自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

學習筆記:Eclipse中Subversion插件如何使用詳解 下篇

開發(fā) 項目管理
本文介紹Eclipse中如何使用Subversion插件,同時對Eclipse也做了簡單的介紹,希望對大家有所幫助。

本文繼續(xù)上節(jié)文章介紹Subversion插件在Eclipse中是如何使用的,希望大家能學到更多知識,同時也請各位多提寶貴意見,以便共同進步。以下是介紹Subversion插件

【Displayhook銷毀機制】

在Displaydevice中我們看了如下個hook接口:

  1. /**  *Causestherunmethodoftherunnableto  
  2.   *beinvokedbytheuser-erfacethreadjustbeforethe  
  3.   *receiverisdisposed.  
  4.   */   publicvoiddisposeExec(Runnablerunnable){  
  5.        //注冊用戶自定義runnable在displayrelease時候回調(diào)此runnable  
  6.        將runnable注冊到disposeList  
  7.    }  
  8.    disposeList中線程會在displayrelease時候被如下:  
  9.    /***Releasesanyernalresourcesbacktotheoperating  
  10. *systemandclearsallfieldsexceptthedevicehandle.  
  11. */   protectedvoidrelease{……  
  12.        //會執(zhí)行用戶注冊銷毀線程  
  13.        (disposeList!=null){  
  14.           for(i=0;i               (disposeList[i]!=null)disposeList[i].run;  
  15.           }}  
  16.        ……}  

看來SWT并沒有把事情做絕了還是給開發(fā)者留下條后路Display允許開發(fā)者注冊個自定義線程hook到Displayrelease過程開發(fā)者可以用如下方式來確保開發(fā)者使用系統(tǒng)資源在Displayrelease時候被銷毀:

  1.     display.disposeExec(Runnable{  
  2.               publicvoidrun{//銷毀系統(tǒng)資源邏輯代碼  
  3.           image.dispose;  
  4.           ……}}); 

以上方式其實也是JFace中圖片資源管理(ImageRegistry、ResourceManager)能夠確保Displayrelease時候能夠徹底釋放被ImageRegistry托管圖片資源.到這里回顧下SWT中資源釋放途徑吧:
1、覆寫相應Component對應dispose思路方法這有別于Displayhook機制其能夠在Display運行期間(未被release的前)就釋放掉系統(tǒng)資源***方式。
2、利用Displayhook機制確保在Display被release時候能夠銷毀資源注意請不要過多依賴此方式很容易造成在Display被release的前已經(jīng)發(fā)生了系統(tǒng)crash問題。

Eclipse的本身只是一個框架平臺,但是眾多插件的支持使得Eclipse擁有其他功能相對固定的IDE軟件很難具有的靈活性。許多軟件開發(fā)商以Eclipse為框架開發(fā)自己的IDE。

【JFace中圖片資源管理--ImageDescriptor】

前面我們已經(jīng)見過SWT中Image和ImageData類型了在繼續(xù)下面內(nèi)容的前我們先看下在JFace中我們最常用來創(chuàng)建圖片資源個工廠類:ImageDescriptor在ImageDescriptor類型介紹說明中告訴我們有兩種使用ImageDescriptor創(chuàng)建圖片方式分別通過createImage和createResource接口“TherearetwowaystogetanImagefromanImageDescriptor.ThemethodcreateImagewillalwaysaImagewhichmustbedisposedbythecaller.Alternatively,createResourcesasharedImage.WhenthecallerisdonewithanimageobtainedfromcreateResource,theymustcalldestroyResourceratherthandisposingtheImagedirectly.”分析如下:

首先看下createResource方式ImageDescriptor是種DeviceResourceDescriptor后者對外操作如下:

  1. /**   *Createstheresourcedescribedbythisdescriptor    */  
  2.     publicabstractObjectcreateResource(Devicedevice)throwsDeviceResourceException;    /**  
  3.    *Undoeseverythingthatwasdonebyapreviouscalltocreate(...)    */  
  4.     publicabstractvoiddestroyResource(ObjectpreviouslyCreatedObject);  

本篇對Eclipse中如何使用Subversion插件已經(jīng)全部介紹完畢。請關注本文的其他相關報道。

 【編輯推薦】

  1. CentOS系統(tǒng)中安裝subversion并使用svn+ssh訪問
  2. Subversion mod_authz_svn驗證用戶查看受限資源漏洞
  3. 在Linux下subversion和apache安裝配置
  4. 揭露MyEclipse Subversion環(huán)境建立的內(nèi)幕
  5. 學習筆記:剖析Collabnet Subversion集成
責任編輯:佚名
相關推薦

2010-05-18 13:26:16

Subversion插

2010-05-20 18:30:08

Eclipse下使用S

2010-05-17 09:19:03

Subversion

2010-05-18 16:56:03

Tortoise Su

2010-05-14 16:11:52

Subversion命

2010-05-13 14:27:28

Subclipse插件

2010-05-13 15:18:19

Subversion插

2010-05-14 16:57:01

Subversion命

2010-06-12 14:19:00

Eclipse UML

2011-06-17 10:19:11

Qt QWidge QSetting

2011-06-17 09:58:26

Qt Chapter QObject

2010-05-19 11:17:53

Subversion插

2010-05-20 18:00:52

Eclipse下使用S

2010-05-13 10:47:20

Collabnet S

2010-05-18 09:59:06

Subversion安

2009-06-17 17:44:41

Eclipse插件Sp

2010-05-12 15:46:51

Subversion客

2010-05-21 08:57:43

Subversion

2010-05-13 10:26:42

Subversion配

2011-08-09 13:34:53

SubversionXCodeMac
點贊
收藏

51CTO技術棧公眾號