Myeclipse 10 安装及使用SVN

一、安装
      1.下载 Subclipse 最新版 地址:  http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA 
      2.将下载后的压缩文件解压 site-1.x.xx  拷贝其中的  features 和  plugins 文件夹
      3. 在 MyEclipse10 直接在安装目录下的dropins文件夹下新建一个svn文件夹把features和plugins目录放到dropins文件夹下就OK了 
      4.重启myeclipse10,成功会有提示 pulse 。。 detect successfule。。
      如果这种方式失败按以下操作:
      解压SVN包,然后找到其中的两个文件夹:features 和 plugins

3.随意建一个文件夹(位置和名称自己定就好了,我的是E:\myEclipsePlugin\svn),然后把第二步的解压好的features 和 plugins放到这个文件夹下
4.找到myeclipse的安装目录,下面有一个configuration\org.eclipse.equinox.simpleconfigurator\bundles.info 文件。现在需要做的就是在该文件内添加的东西
5.添加的内容用下面的类生成:

Java代码  收藏代码
  1. import java.io.File;       
  2. import java.util.ArrayList;       
  3. import java.util.List;       
  4. /**    
  5.  * MyEclipse9 插件配置代码生成器 
  6.  */      
  7. public class PluginConfigCreator       
  8. {       
  9.     public PluginConfigCreator()       
  10.     {       
  11.     }       
  12.     public void print(String path)       
  13.     {       
  14.         List<String> list = getFileList(path);       
  15.         if (list == null)       
  16.         {       
  17.             return;       
  18.         }       
  19.         int length = list.size();       
  20.         for (int i = 0; i < length; i++)       
  21.         {       
  22.             String result = "";       
  23.             String thePath = getFormatPath(getString(list.get(i)));       
  24.             File file = new File(thePath);       
  25.             if (file.isDirectory())       
  26.             {       
  27.                 String fileName = file.getName();       
  28.                 if (fileName.indexOf("_") < 0)       
  29.                 {       
  30.                     print(thePath);       
  31.                     continue;       
  32.                 }       
  33.                 String[] filenames = fileName.split("_");       
  34.                 String filename1 = filenames[0];       
  35.                 String filename2 = filenames[1];       
  36.                 result = filename1 + "," + filename2 + ",file:/" + path + "/"      
  37.                         + fileName + "\\,4,false";       
  38.                 System.out.println(result);       
  39.             } else if (file.isFile())       
  40.             {       
  41.                 String fileName = file.getName();       
  42.                 if (fileName.indexOf("_") < 0)       
  43.                 {       
  44.                     continue;       
  45.                 }       
  46.                 int last = fileName.lastIndexOf("_");// 最后一个下划线的位置       
  47.                 String filename1 = fileName.substring(0, last);       
  48.                 String filename2 = fileName.substring(last + 1, fileName       
  49.                         .length() - 4);       
  50.                 result = filename1 + "," + filename2 + ",file:/" + path + "/"      
  51.                         + fileName + ",4,false";       
  52.                 System.out.println(result);       
  53.             }       
  54.         }       
  55.     }       
  56.     public List<String> getFileList(String path)       
  57.     {       
  58.         path = getFormatPath(path);       
  59.         path = path + "/";       
  60.         File filePath = new File(path);       
  61.         if (!filePath.isDirectory())       
  62.         {       
  63.             return null;       
  64.         }       
  65.         String[] filelist = filePath.list();       
  66.         List<String> filelistFilter = new ArrayList<String>();       
  67.         for (int i = 0; i < filelist.length; i++)       
  68.         {       
  69.             String tempfilename = getFormatPath(path + filelist[i]);       
  70.             filelistFilter.add(tempfilename);       
  71.         }       
  72.         return filelistFilter;       
  73.     }       
  74.     public String getString(Object object)       
  75.     {       
  76.         if (object == null)       
  77.         {       
  78.             return "";       
  79.         }       
  80.         return String.valueOf(object);       
  81.     }       
  82.     public String getFormatPath(String path)       
  83.     {       
  84.         path = path.replaceAll("\\\\", "/");       
  85.         path = path.replaceAll("//""/");       
  86.         return path;       
  87.     }       
  88.     public static void main(String[] args)       
  89.     {       
  90.         /*你的SVN的features 和 plugins复制后放的目录*/      
  91.             String plugin = "F:\\MyEclipse10.0\\myEclipsePlugin\\svn";       
  92.         new PluginConfigCreator().print(plugin);       
  93.     }       
  94. }  

 6.把以上生成的字符串(一大堆)添加到第四步bundles.info文件的后面,然后重启myeclipse即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值