您的当前位置:首页正文

各个版本eclipse安装svn插件

2021-12-01 来源:个人技术集锦


方法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 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 + \ + 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 + \+ path + \"\\\\\" + fileName + \

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) {

/*你的插件的安装目录*/

String plugin \"C:\\\\app\\\\AppData\\\\Local\\\\Genuitec\\\\MyEclipse-9.0M1\\\\svn\"; 要注意

new PluginConfigCreator().print(plugin);

}

}

=

//这里的目录路径

因篇幅问题不能全部显示,请点此查看更多更全内容