myeclipse插件安装

2011-12-18 413 0

myeclipse7以前都是可以很容易通过link方式来安装eclipse的插件的,自从myeclipse7以后,myeclipse修改的安装配置的方式,直接用link方式安装插件很麻烦,这里找到一个用link方式的插件配置代码的生成器,用这个安装,简单的一米,推荐必备软件。

步骤如下

1.比如给myeclipse10安装hibernate的插件,我的hibernate插件之前是eclipse3.2的版本安装的里面。

在D:toolsMyEclipse 10MyEclipse 10建立myplugins文件,将hibernate插件放入文件中,不要有eclipse的目录。

hibernate插件目录如下    

D:toolsMyEclipse 10MyEclipse 10mypluginshibernatepluginscom.hudson.hibernatesynchronizer_3.1.9_lclgv1.0

2.使用MyEclipse插件配置代码生成器,修改里面的路径


import java.io.File;

import java.util.ArrayList;

import java.util.List;

/**
*
*

  • @ClassName : PluginConfigCreator
  • @ClassDescription : MyEclipse插件配置代码生成器
  • @Author : dapeng
  • @CreateTime : 2011-12-18 下午8:39:31
  • */

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 = fileName.lastIndexOf("_");// 最后一个下划线的位 置            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:/Users/Administrator/AppData/Local/MyEclipse Blue Edition/MyEclipse Blue Edition 10/My-plugins/findbugs-1.3.8";    new PluginConfigCreator().print(plugin);}

}

 

3.复制配置信息

 

MyEclipse插件配置代码生成器会生成一串配置信息

 

com.hudson.hibernatesynchronizer,3.1.9,file:/D:/tools/MyEclipse 10/MyEclipse 10/myplugins/hibernate/plugins/com.hudson.hibernatesynchronizer_3.1.9_lclgv1.0,4,false

 

4.添加配置信息

 

  用文本编辑器打开D:toolsMyEclipse 10MyEclipse 10configurationorg.eclipse.equinox.simpleconfiguratorbundles.info

 

  将那段配置信息添加到bundles.info最后

 

重启myeclipse,查看hibernate插件,ok!完成了!

相关文章

15年来的手艺之路:手艺人赵鹏的自述
纪念 Google 25 周年:从搜索引擎到科技巨头的演变之路
1小时编写一个支持七牛上传的 markdown 客户端3(打包发布篇)
1小时编写一个支持七牛上传的 markdown 客户端2(代码优化篇)
1小时编写一个支持七牛上传的 markdown 客户端1(技术实现篇)
从 wordpress 转移到 hexo

Leave a Reply