Zend Studio for Eclipse不能開啟檔案
經常有時候會出現工程裡的某一個檔案打不開,總是出現:
Could not open the editor: Editor could not be initialized.
的提示資訊。
產生原因:聽說是由於檔案外部修改導致,參考說法如下:
Could not open the editor: Editor could not be initialized when opening files. Huh? If you look at the java exception, available as error details, it only means the resource or file have been changed from outside of Zend Studio. To open it you need to refresh the file through F5.
因為我在使用zend studio的時候,還會用 Editplus 或 source insight 來查看或者編輯php檔案,所以同意問題原因產生的說法。
問題分析:
憑我的經驗,感覺好像是工程在每次啟動時,沒有對用非Zend studio for Eclipse編輯器編輯的的檔案進行重新整理,工程檔案沒有進行有效初始化,除了上面的方法,最近我常採用的方法就是:
解決辦法1:(推薦)
先關掉所有的已經開啟的標籤,選擇出錯的工程檔案夾,然後用F5重新整理工程檔案,基本上可以解決上述問題!
解決方案2:將打不開的檔案拷貝出來,然後將其刪除,最後再將其拷貝回去。然後重啟ZendStudio for Eclipse.
解決辦法3:如果上面兩個辦法還不行,再提供一條終極解決辦法,保證絕對可行:
刪除該工程(但是不刪除工程檔案夾裡面的內容)》》去工程檔案夾刪除 .settings,.projects,.cache》》重建立工程》》選擇project contents時的時候,去掉use default 選項前面的勾,選擇以前的工程檔案夾》》finish》》在出現的對話方塊,選擇第一個選項(即在原來的工程檔案夾直接建,而不需要在原工程檔案夾下再建一個檔案夾)》》OK。
本文來自CSDN部落格,轉載請標明出處:http://blog.csdn.net/onsrs/archive/2009/06/19/4282695.aspx