偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

學(xué)習(xí)筆記:Eclipse中Subversion插件如何使用詳解 下篇

開(kāi)發(fā) 項(xiàng)目管理
本文介紹Eclipse中如何使用Subversion插件,同時(shí)對(duì)Eclipse也做了簡(jiǎn)單的介紹,希望對(duì)大家有所幫助。

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

【Displayhook銷(xiāo)毀機(jī)制】

在Displaydevice中我們看了如下個(gè)hook接口:

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

看來(lái)SWT并沒(méi)有把事情做絕了還是給開(kāi)發(fā)者留下條后路Display允許開(kāi)發(fā)者注冊(cè)個(gè)自定義線(xiàn)程hook到Displayrelease過(guò)程開(kāi)發(fā)者可以用如下方式來(lái)確保開(kāi)發(fā)者使用系統(tǒng)資源在Displayrelease時(shí)候被銷(xiāo)毀:

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

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

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

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

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

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

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

本篇對(duì)Eclipse中如何使用Subversion插件已經(jīng)全部介紹完畢。請(qǐng)關(guān)注本文的其他相關(guān)報(bào)道。

 【編輯推薦】

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

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 15:18:19

Subversion插

2010-05-13 14:27:28

Subclipse插件

2011-06-17 10:19:11

Qt QWidge QSetting

2011-06-17 09:58:26

Qt Chapter QObject

2010-06-12 14:19:00

Eclipse UML

2010-05-14 16:57:01

Subversion命

2010-05-20 18:00:52

Eclipse下使用S

2010-05-19 11:17:53

Subversion插

2010-05-13 10:47:20

Collabnet S

2010-05-18 09:59:06

Subversion安

2010-05-21 08:57:43

Subversion

2010-05-12 15:46:51

Subversion客

2010-05-13 10:26:42

Subversion配

2009-06-17 17:44:41

Eclipse插件Sp

2011-08-09 13:34:53

SubversionXCodeMac
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)