我用的是myeclipse10.0做的優化,早起版本8.5、8.5也都大同小異
一、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
這個問題的解決辦法是關閉自動更新
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等等,我們沒有必要全部都去自動校驗一下,
只是需要的時候才會手工校驗一 下,速度立馬提升好幾個檔次
windows–>perferences–>myeclipse–>validation
把 除了manual 下面的全部點掉,build下只留 classpath dependency Validator
windows–>perferences–>general–>validation->editors->Text Editors->spelling -->Enable spell checking
所以可以將一些不使用的模塊禁止 加載啟動。
Window > Preferences > General > Startup andy Shutdown 在這里列出的是MyEclipse啟動時加載的模塊
我這里只讓它加載tomcat5 勾選 MyEclipse EASIE Tomcat 5 。
怎樣才能知道哪些啟動項有用呢?我現在把我知道的啟動項用處說一下,還有很多不懂的,
希望大家懂的回復在下面 啊:
WTP :一個跟myeclipse差不多的東西,主要差別是 WTP 是免費的,如果使用myeclipse,這個可以取消
Mylyn:組隊任務管理工具,類似於 CVS ,以任務為單位管理項目進度,沒用到的可以取消
Derby:一種保存成 jar 形式的數據庫,我沒用到,取消
一大排以 MyEclipse EASIE 打頭的啟動項:myeclipse 支持的服務器,只選自己用的,其他取消,
比如我只選了 tomcat 。
十一、加大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.添加的內容用下面的類生成:
- import java.io.File;
- import java.util.ArrayList;
- import java.util.List;
- /**
- * MyEclipse9 插件配置代碼生成器
- */
- public class PluginConfigCreator
- {
- public PluginConfigCreator()
- {
- }
- public void print(String path)
- {
- List<String> list = getFileList(path);
- if (list == null)
- {
- return;
- }
- int length = list.size();
- for (int i = 0; i < length; i++)
- {
- String result = "";
- String thePath = getFormatPath(getString(list.get(i)));
- File file = new File(thePath);
- if (file.isDirectory())
- {
- String fileName = file.getName();
- if (fileName.indexOf("_") < 0)
- {
- print(thePath);
- continue;
- }
- String[] filenames = fileName.split("_");
- String filename1 = filenames[0];
- String filename2 = filenames[1];
- result = filename1 + "," + filename2 + ",file:/" + path + "/"
- + fileName + "\\,4,false";
- System.out.println(result);
- } else if (file.isFile())
- {
- String fileName = file.getName();
- if (fileName.indexOf("_") < 0)
- {
- continue;
- }
- int last = fileName.lastIndexOf("_");// 最后一個下划線的位置
- String filename1 = fileName.substring(0, last);
- String filename2 = fileName.substring(last + 1, fileName
- .length() - 4);
- result = filename1 + "," + filename2 + ",file:/" + path + "/"
- + fileName + ",4,false";
- System.out.println(result);
- }
- }
- }
- public List<String> getFileList(String path)
- {
- path = getFormatPath(path);
- path = path + "/";
- File filePath = new File(path);
- if (!filePath.isDirectory())
- {
- return null;
- }
- String[] filelist = filePath.list();
- List<String> filelistFilter = new ArrayList<String>();
- for (int i = 0; i < filelist.length; i++)
- {
- String tempfilename = getFormatPath(path + filelist[i]);
- filelistFilter.add(tempfilename);
- }
- return filelistFilter;
- }
- public String getString(Object object)
- {
- if (object == null)
- {
- return "";
- }
- return String.valueOf(object);
- }
- public String getFormatPath(String path)
- {
- path = path.replaceAll("\\\\", "/");
- path = path.replaceAll("//", "/");
- return path;
- }
- public static void main(String[] args)
- {
- /*你的SVN的features 和 plugins復制后放的目錄*/
- String plugin = "F:\\MyEclipse10.0\\myEclipsePlugin\\svn";
- new PluginConfigCreator().print(plugin);
- }
- }
6.把以上生成的字符串(一大堆)添加到第四步bundles.info文件的后面,然后重啟myeclipse即可。