1.首先下载SVN包:site -1.8.7
http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
2.解压SVN包,然后找到其中的两个文件夹:features 和 plugins
3.随意建一个文件夹(最好容易管理点的,我的是D:\Java\Plugin\SVN),然后把第二步的解压好的features 和 plugins放到这个文件夹下
4.找到myeclipse的安装目录,下面有一个configuration\org.eclipse.equinox.simpleconfigurator\bundles.info 文件。现在需要做的就是在该文件内添加的东西
5.添加的内容用下面的类生成:
1 import java.io.File; 2 import java.util.ArrayList; 3 import java.util.List; 4 /** 5 * MyEclipse9 插件配置代码生成器 6 * 7 * 8 */ 9 public class PluginConfigCreator 10 { 11 public PluginConfigCreator() 12 { 13 } 14 public void print(String path) 15 { 16 List list = getFileList(path); 17 if (list == null) 18 { 19 return; 20 } 21 int length = list.size(); 22 for (int i = 0; i < length; i++) 23 { 24 String result = ""; 25 String thePath = getFormatPath(getString(list.get(i))); 26 File file = new File(thePath); 27 if (file.isDirectory()) 28 { 29 String fileName = file.getName(); 30 if (fileName.indexOf("_") < 0) 31 { 32 print(thePath); 33 continue; 34 } 35 String[] filenames = fileName.split("_"); 36 String filename1 = filenames[0]; 37 String filename2 = filenames[1]; 38 result = filename1 + "," + filename2 + ",file:/" + path + "/" 39 + fileName + "\\,4,false"; 40 System.out.println(result); 41 } else if (file.isFile()) 42 { 43 String fileName = file.getName(); 44 if (fileName.indexOf("_") < 0) 45 { 46 continue; 47 } 48 int last = fileName.lastIndexOf("_");// 最后一个下划线的位置 49 String filename1 = fileName.substring(0, last); 50 String filename2 = fileName.substring(last + 1, fileName 51 .length() - 4); 52 result = filename1 + "," + filename2 + ",file:/" + path + "/" 53 + fileName + ",4,false"; 54 System.out.println(result); 55 } 56 } 57 } 58 public List getFileList(String path) 59 { 60 path = getFormatPath(path); 61 path = path + “/”; 62 File filePath = new File(path); 63 if (!filePath.isDirectory()) 64 { 65 return null; 66 } 67 String[] filelist = filePath.list(); 68 List filelistFilter = new ArrayList(); 69 for (int i = 0; i < filelist.length; i++) 70 { 71 String tempfilename = getFormatPath(path + filelist[i]); 72 filelistFilter.add(tempfilename); 73 } 74 return filelistFilter; 75 } 76 public String getString(Object object) 77 { 78 if (object == null) 79 { 80 return ""; 81 } 82 return String.valueOf(object); 83 } 84 public String getFormatPath(String path) 85 { 86 path = path.replaceAll("\\\\", "/"); 87 path = path.replaceAll("//", "/"); 88 return path; 89 } 90 public static void main(String[] args) 91 { 92 /*你的SVN的features 和 plugins复制后放的目录*/ 93 String plugin = "D:\Java\Plugin\SVN"; 94 new PluginConfigCreator().print(plugin); 95 } 96 }
复制以上代码
6.把以上生成的字符串(如何生成就不解释了)添加到第四步bundles.info文件的后面,然后重启myeclipse即可。(估计其他插件的安装方法估计应该差不多)
myeclipse9安装SVN插件,布布扣,bubuko.com
原文:http://www.cnblogs.com/yuanhui69/p/3593390.html