myeclipse 安装插件

在eclipse中配置插件的方法: 
1)将feature和plugins两个文件中的文件拷到eclipse目录下的对应文件夹即可 
2)使用在link连接的方法(具体方法网上一大堆) 
在myeclipse中配置插件 
1)如果你的软件版本是7.0之前的话,那么配置插件的方法和eclipse是一样的。 
2)如果版本为7.0以上,配置插件需要修改安装目录下configuration\org.eclipse.equinox.simpleconfigurator\bundles.info文件,在这个文件中需要写入你插件的具体信息。至于这些信息是什么,我们通过下面的一个java文件来帮我们生成。 
具体方法如下, 
Java代码   收藏代码
  1. package app;     
  2.     
  3. import java.io.File;     
  4. import java.util.ArrayList;     
  5. import java.util.List;     
  6.     
  7. /**   
  8.  * MyEclipse 7.5 (2009-12-1) 插件配置代码生成器   
  9.  *    
  10.  *    
  11.  */    
  12.     
  13. public class PluginConfigCreator     
  14. {     
  15.     
  16.     public PluginConfigCreator()     
  17.     {     
  18.     }     
  19.     
  20.     public void print(String path)     
  21.     {     
  22.         List<String> list = getFileList(path);     
  23.         if (list == null)     
  24.         {     
  25.             return;     
  26.         }     
  27.     
  28.         int length = list.size();     
  29.         for (int i = 0; i < length; i++)     
  30.         {     
  31.             String result = "";     
  32.             String thePath = getFormatPath(getString(list.get(i)));     
  33.             File file = new File(thePath);     
  34.             if (file.isDirectory())     
  35.             {     
  36.                 String fileName = file.getName();     
  37.                 if (fileName.indexOf("_") < 0)     
  38.                 {     
  39.                     print(thePath);     
  40.                     continue;     
  41.                 }     
  42.                 String[] filenames = fileName.split("_");     
  43.                 String filename1 = filenames[0];     
  44.                 String filename2 = filenames[1];     
  45.                 result = filename1 + "," + filename2 + ",file:/" + path + "\\"    
  46.                         + fileName + "\\,4,false";     
  47.                 System.out.println(result);     
  48.             } else if (file.isFile())     
  49.             {     
  50.                 String fileName = file.getName();     
  51.                 if (fileName.indexOf("_") < 0)     
  52.                 {     
  53.                     continue;     
  54.                 }     
  55.                 int last = fileName.lastIndexOf("_");// 最后一个下划线的位置     
  56.                 String filename1 = fileName.substring(0, last);     
  57.                 String filename2 = fileName.substring(last + 1, fileName     
  58.                         .length() - 4);     
  59.                 result = filename1 + "," + filename2 + ",file:/" + path + "\\"    
  60.                         + fileName + ",4,false";     
  61.                 System.out.println(result);     
  62.             }     
  63.     
  64.         }     
  65.     }     
  66.     
  67.     public List<String> getFileList(String path)     
  68.     {     
  69.         path = getFormatPath(path);     
  70.         path = path + "/";     
  71.         File filePath = new File(path);     
  72.         if (!filePath.isDirectory())     
  73.         {     
  74.             return null;     
  75.         }     
  76.         String[] filelist = filePath.list();     
  77.         List<String> filelistFilter = new ArrayList<String>();     
  78.     
  79.         for (int i = 0; i < filelist.length; i++)     
  80.         {     
  81.             String tempfilename = getFormatPath(path + filelist[i]);     
  82.             filelistFilter.add(tempfilename);     
  83.         }     
  84.         return filelistFilter;     
  85.     }     
  86.     
  87.     public String getString(Object object)     
  88.     {     
  89.         if (object == null)     
  90.         {     
  91.             return "";     
  92.         }     
  93.         return String.valueOf(object);     
  94.     }     
  95.     
  96.     public String getFormatPath(String path)     
  97.     {     
  98.         path = path.replaceAll("\\\\", "/");     
  99.         path = path.replaceAll("//""/");     
  100.         return path;     
  101.     }     
  102.     
  103.     public static void main(String[] args)     
  104.     {     
  105.         /*你的插件的安装目录*/    
  106.             String plugin = "E:\\spket\\eclipse";     
  107.         new PluginConfigCreator().print(plugin);     
  108.     }     
  109. }    

执行之后,将控制台的生成的字符串全部拷贝到bundles.info文件中,然后重新启动myeclipse即可
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值