首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

myeclipse 十 优化

2012-07-25 
myeclipse 10 优化一、Myeclipse10修改字体 MyEclipse10是基于Eclipse3.7内核,但在Eclipse的Preferences-〉g

myeclipse 10 优化

一、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


?

?

    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即可。

热点排行