1. 先将下载好的plugin文件解压
2.执行下面代码
package t;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class Velocity{
public Velocity() {
}
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) {
/* 你的插件路径,即plugin解压的路径 */
String plugin = "C:\\Users\\Administrator\\Desktop\\plugins";
new Velocity().print(plugin);
}
}
3.将控制台输出信息粘贴到 MyEclipse 路径下的
\MyEclipse 9\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
(请做好备份)
分享到:
相关推荐
myeclipse的velocity插件,直接复制到myeclipse的安装目录下,覆盖原有文件夹就可以,重启myeclipse后可以使用。
Myeclipse10手动安装Velocity插件,里面有两个文件,一个是插件文件,一个是txt说明
myeclipse 中 velocity插件的安装配置 1.打开Eclipse--->help--->Software Updates---find and install....---->选第二个ReadButton(Search for new features or install........................) 点next -------...
myeclipse8.5安装velocity插件的方法以及遇到问题的解决方案。供大家参考指正。
myeclipse高版本的加入velocity插件 ,网上的办法试了个遍,都不行,这个是自己在官网找到的,下载下来后放到myeclipse 安装目录的plugins 文件夹下,重启myeclipse 即可
myeclipse Velocity 插件;博文使用说明地址:http://blog.csdn.net/yangkai_hudong/article/details/39673199
NULL 博文链接:https://smallhot.iteye.com/blog/2115643
Myeclipse手动安装Velocity插件具体详细安装可参考:http://blog.csdn.net/janda2011/article/details/43051469
myeclipse10的velocity离线插件
========>压缩包内有文件:com.googlecode.veloeclipse.ui_2.0.8、README.txt(安装教程)
将将附件velocity1.6.zip解压后的文件夹放在\%你的myeclipse安装目录%\\Genuitec\Common\plugins 目录下。 打开\%你的myeclipse安装目录%\Genuitec\MyEclipse 8.5\configuration\org.eclipse.equinox....
该文档详细描述了velocity eclipse安装的方法,以及安装过程中可能遇到的问题,提出了解决方案。