myeclipse10.0做的優化

myeclipse10.0優化


一、Myeclipse10修改字體 

 

 
 
MyEclipse10是基於Eclipse3.7內核,但在Eclipse的Preferences-〉general-〉 Appearance->Colors and Fonts 中並沒有找到Courier New字體,它採用的是Consolas字體,中文看着非常小非常彆扭,在Windows7下,系統自帶雖然有Courier New字體,但是並沒有激活顯示,需要手動激活,才能在軟件中使用

激活方法如下:
在win7的控制面板->字體,找到Courier New,右鍵,顯示。 Courier 常規 ,右鍵,顯示。
window-->preferences-->搜索font-->Color and Font-->Basic-->Text Font-->Edit--> Courier New-->常規-->四號 

二、myeclipse修改jsp、xml默認打開方式 
window-->preferences-->General-->Editors-->File Associations-->選擇File Type-->
Associated editors選擇默認的打開方式(Default) 

三、Myeclipse修改編譯兼容級別_Compiler compliance Level 
Window-->Preferences-->Java-->Compiler --> Compiler compliance Level-->1.6

四、修改Myeclipse編碼方式:text+jsp 
1.  window-->preferences-->搜索JSP-->Myeclipse-->Files and Editors-->JSP-->encoding-->UTF-8
2.  window-->preferences-->General-->Workspace-->Text file encoding-->Other-->UTF-8

五、myeclipse修改Jboss內存大小 
myeclipse菜單欄:Preferences-->搜索Jboss-->Jboss7.X下-->JDK--Optional java VM arguments加入如下代碼:
-Xms512m -Xmx1024m -XX:MaxNewSize=256m -XX:MaxPermSize=256m


 

 

六、老是彈出Quick update error 、關閉myeclipse的Quick Update自動更新功能 
這個問題的解決辦法是關閉自動更新 
Windows > Preferences > MyEclipse Enterprise Workbench > Community Essentials, 
把選項 "Search for new features on startup"的前勾去掉即可。
 

七 、關閉updating indexes 
Window > Preferences > Myeclipse Enterprise Workbench > Maven4Myeclipse > Maven> 
禁用Download repository index updates on startup 。
注意:強調一個問題,很多人發現無法找到這個,原因其實是它已經關閉了。 

八 、關閉MyEclipse的自動validation 
validation有一堆,什麼xml、jsp、jsf、js等等,我們沒有必要全部都去自動校驗一下, 
只是需要的時候纔會手工校驗一 下,速度立馬提升好幾個檔次 

8.1取消MyEclipse在啓動時自動驗證項目配置文件
默 認情況下MyEclipse在啓動的時候會自動驗證每個項目的配置文件,這是一個非常耗時的過程,可以在Preferences窗口依次選擇 MyEclipse - Validation,然後在右側的Validator列表中只保留 Manual 項就可以了。如果需要驗證的時候只需要選中文件,然後右鍵選擇 MyEclipse - Run Validation就可以了。 
windows–>perferences–>myeclipse–>validation
把 除了manual 下面的全部點掉,build下只留 classpath dependency Validator

8.2手工驗證方法:
在要驗證的文件上,單擊鼠標右鍵–>myeclipse–>run validation

九 、關閉拼寫檢查
拼寫檢查會給我們帶來不少的麻煩,我們的方法命名都會是單詞的縮寫,他也會提示有錯,所以最好去掉,沒有多大的用處:
windows–>perferences–>general–>validation->editors->Text Editors->spelling
 -->Enable spell checking

十、 啓動優化,關閉不需要使用的模塊
一個系統20%的功能往往能夠滿足80%的需求,MyEclipse也不例外,我們在大多數時候只需要20%的系統功能, 
所以可以將一些不使用的模塊禁止 加載啓動。 
Window > Preferences > General > Startup andy Shutdown 在這裏列出的是MyEclipse啓動時加載的模塊 
我這裏只讓它加載tomcat5 勾選 MyEclipse EASIE Tomcat 5 。 
怎樣才能知道哪些啓動項有用呢?我現在把我知道的啓動項用處說一下,還有很多不懂的, 
希望大家懂的回覆在下面 啊: 
WTP :一個跟myeclipse差不多的東西,主要差別是 WTP 是免費的,如果使用myeclipse,這個可以取消 
Mylyn:組隊任務管理工具,類似於 CVS ,以任務爲單位管理項目進度,沒用到的可以取消 
Derby:一種保存成 jar 形式的數據庫,我沒用到,取消 
一大排以 MyEclipse EASIE 打頭的啓動項:myeclipse 支持的服務器,只選自己用的,其他取消, 
比如我只選了 tomcat 。
(個人配置: MyEclipse EASIE只保留tomcat6和Jboss7,其他的不動 )

十一、加大JVM的非堆內存

打開 myeclipse.ini 
-startup 
../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar 
--launcher.library 
../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731 
-clean 
-configuration 
configuration 
-vm 
C:\Users\lenovo\AppData\Local\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll 
-vmargs 
-Xmx384m 
-XX:MaxPermSize=384m 
-XX:ReservedCodeCacheSize=96m

以上是我的myeclipse.ini,需要修改是 -Xmx,-XX:MaxPermSize,-XX:ReservedCodeCacheSize, 
將這三項的值調大,但並不是越大越好,曾經在相同的條件下做過測試(內存2GB),-Xmx,-XX:MaxPermSize的值爲384m時比512m時要快(視具體的計算機而定), 
-Xmx,-XX:MaxPermSize 的值設爲同樣大小且兩者之和不能超出你的計算機本身的內存大小


十二、myeclipse10加入svn插件

說到插件,myeclipse自8.X開始,插件安裝就變得巨難用,通常最好還是用離線安裝,在線安裝很可能出問題,下面僅以SVN安裝爲例,其他諸如ADT15,Aptana等都可採用

1.首先下載SVN包:svn-1.6 
2.解壓SVN包,然後找到其中的兩個文件夾:features 和 plugins
3.隨意建一個文件夾(位置和名稱自己定就好了,我的是E:\myEclipsePlugin\svn),然後把第二步的解壓好的features 和 plugins放到這個文件夾下
4.找到myeclipse的安裝目錄,下面有一個configuration\org.eclipse.equinox.simpleconfigurator\bundles.info 文件。現在需要做的就是在該文件內添加的東西
5.添加的內容用下面的類生成:

 

  1. package mm.DB;  
  2.  
  3. import java.io.File;         
  4. import java.util.ArrayList;         
  5. import java.util.List;         
  6. /**      
  7.  * MyEclipse9 插件配置代碼生成器   
  8.  */        
  9. public class PluginConfigCreator {  
  10.      public PluginConfigCreator()         
  11.         {         
  12.         }         
  13.         public void print(String path)         
  14.         {         
  15.             List<String> list = getFileList(path);         
  16.             if (list == null)         
  17.             {         
  18.                 return;         
  19.             }         
  20.             int length = list.size();         
  21.             for (int i = 0; i < length; i++)         
  22.             {         
  23.                 String result = "";         
  24.                 String thePath = getFormatPath(getString(list.get(i)));         
  25.                 File file = new File(thePath);         
  26.                 if (file.isDirectory())         
  27.                 {         
  28.                     String fileName = file.getName();         
  29.                     if (fileName.indexOf("_") < 0)         
  30.                     {         
  31.                         print(thePath);         
  32.                         continue;         
  33.                     }         
  34.                     String[] filenames = fileName.split("_");         
  35.                     String filename1 = filenames[0];         
  36.                     String filename2 = filenames[1];         
  37.                     result = filename1 + "," + filename2 + ",file:/" + path + "/"        
  38.                             + fileName + "\\,4,false";         
  39.                     System.out.println(result);         
  40.                 } else if (file.isFile())         
  41.                 {         
  42.                     String fileName = file.getName();         
  43.                     if (fileName.indexOf("_") < 0)         
  44.                     {         
  45.                         continue;         
  46.                     }         
  47.                     int last = fileName.lastIndexOf("_");// 最後一個下劃線的位置         
  48.                     String filename1 = fileName.substring(0, last);         
  49.                     String filename2 = fileName.substring(last + 1, fileName         
  50.                             .length() - 4);         
  51.                     result = filename1 + "," + filename2 + ",file:/" + path + "/"        
  52.                             + fileName + ",4,false";         
  53.                     System.out.println(result);         
  54.                 }         
  55.             }         
  56.         }         
  57.         public List<String> getFileList(String path)         
  58.         {         
  59.             path = getFormatPath(path);         
  60.             path = path + "/";         
  61.             File filePath = new File(path);         
  62.             if (!filePath.isDirectory())         
  63.             {         
  64.                 return null;         
  65.             }         
  66.             String[] filelist = filePath.list();         
  67.             List<String> filelistFilter = new ArrayList<String>();         
  68.             for (int i = 0; i < filelist.length; i++)         
  69.             {         
  70.                 String tempfilename = getFormatPath(path + filelist[i]);         
  71.                 filelistFilter.add(tempfilename);         
  72.             }         
  73.             return filelistFilter;         
  74.         }         
  75.         public String getString(Object object)         
  76.         {         
  77.             if (object == null)         
  78.             {         
  79.                 return "";         
  80.             }         
  81.             return String.valueOf(object);         
  82.         }         
  83.         public String getFormatPath(String path)         
  84.         {         
  85.             path = path.replaceAll("\\\\", "/");         
  86.             path = path.replaceAll("//""/");         
  87.             return path;         
  88.         }         
  89.         public static void main(String[] args)         
  90.         {         
  91.             /*你的SVN的features 和 plugins複製後放的目錄*/        
  92.                 String plugin = "E:/myEclipsePlugin/svn";         
  93.             new PluginConfigCreator().print(plugin);         
  94.         }         
  95. }  

6.把以上生成的字符串(一大堆)添加到第四步bundles.info文件的後面,然後重啓myeclipse即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章