`
dogasshole
  • 浏览: 842603 次
文章分类
社区版块
存档分类
最新评论

MyEclipse 7.5 正式版 中文插件安装指南

 
阅读更多

MyEclipse 7.5 正式版 中文插件安装指南

ACCP教程网 www.accptech.com java和.net方向的视频教学基地

方法一(推荐!)
1.将language文件夹放到你的MyEclipse文件夹下 默认安装位置 C:/Program Files/Genuitec/MyEclipse 7.5
2.新建java工程,新建 CreatePluginsConfig 类,将插件代码生成器的代码粘贴到里面
3.如果你MyEclipse安装时修改了默认的安装位置需要修改代码里面的 汉化包language的位置
C://Program Files//Genuitec//MyEclipse 7.5//language//plugins 修改成你language所在的路径
替换main函数的原先的事例路径.注意粘贴后,要将你的路径的单个/全部改为//或者/
4.运行你的代码
5.将产生的结果,复制到configuration/org.eclipse.equinox.simpleconfigurator/bundles.info文件尾部即可
6.找到myeclipse7的目录下找到myeclipse.ini
用编辑器打开后在最后加上一行 -Duser.language=zh 保存
7.关闭MyEclips7.5在打开


方法二(懒人专用)
ACCP教程网提示:注意用这个方法插件路径必须是:C:/Program Files/Genuitec/MyEclipse 7.5/language/plugins
1.默认安装MyEclipse 7.5后将此包中的language文件夹放到你的MyEclipse7.5文件夹下,然后复制一下代码到
configuration/org.eclipse.equinox.simpleconfigurator/bundles.info文件尾部,然后找到myeclipse7.5的目
录下找到myeclipse.ini 用编辑器打开后在最后加上一行 -Duser.language=zh 保存

安装插件代码生成器:

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class CreatePluginsConfig {

public CreatePluginsConfig() {
}

public void print(String path) {
List 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 getFileList(String path) {
path = getFormatPath(path);
path = path + "/";
File filePath = new File(path);
if (!filePath.isDirectory()) {
return null;
}
String[] filelist = filePath.list();
List filelistFilter = new ArrayList();

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) {
// 插件文件所在目录designer下的目录结构是eclipse/features and plugins的形式
String plugin = "D://Program Files//Genuitec//MyEclipse 7.5//language//plugins";//我的安装目录是D盘
new CreatePluginsConfig().print(plugin);
}

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics