当前位置:文档之家› 各个版本eclipse安装svn插件

各个版本eclipse安装svn插件

方法1:
适合Myeclipse6.0左右
Myeclipse-eclipse 下
D:\Myeclipse\eclipse\links 下svnForEclipse3-1.4.7.link
D:\Myeclipse\eclipse\svnForEclipse3-1.4.7下
D:\Myeclipse\eclipse\svnForEclipse3-1.4.7\eclipse下
在svnForEclipse3-1.4.7下面建个eclipse然后在eclipse里面再引入features和plugins Links文件下面建svnForEclipse3-1.4.7.link
里面内容path=D:\\Myeclipse\\eclipse\\svnForEclipse3-1.4.7
方法2:
适合Myeclipse6.0左右
把插件中这2个文件中所有包,复制到D:\MyEclipse5.5\eclipse目录下相应的文件夹里面
方法3:适合Myeclipse8.5左右新建svn文件夹
把插件中文件复制到此文件下面。

记住:不要把size.xml文件复制进来。

D:\MyEclipse85\dropins路径下新建svn.link
path=D:\\MyEclipse85\\svn
9.0以上版本PluginConfigCreator.java 允许这个文件注意main方法里面的路径
10 版本和8一样但是svn路径需要多加一层
如:path=D:\\MyEclipse85\\svn
那么存放svn的实际路径为path=D:\\MyEclipse85\\svn\\eclipse
eclipse中添加
svnForEclipse3-1.4.7文件夹放到eclipse路径下不要加size.xml
D:\eclipse\dropins下添加svn.link
里面内容为path=D:\\eclipse\\svnForEclipse3-1.4.7
PluginConfigCreator.java 代码
import java.io.File;
import java.util.ArrayList;
import java.util.List;
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 = stIndexOf("_");// 最后一个下划线的位置
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) {
/*你的插件的安装目录*/
String plugin = "C:\\app\\AppData\\Local\\Genuitec\\MyEclipse-9.0M1\\svn"; //这里的目录路径要注意
new PluginConfigCreator().print(plugin);
}
}。

相关主题