Myeclipse 7 插件安装
2009-01-12 14:00
302 查看
Myeclipse 7 插件安装
Myeclipse 7 的插件安装方式与原先的方式完全不一样了,下面以JBossTools-2.1.2.GA插件安装为例进行说明。
假设
Myeclipse 7的安装路径为:C:/Genuitec
JBossTools-2.1.2.GA插件的路径为: C:/eclipse-plugins/plugins/JBossTools-2.1.2.GA-ALL-win32
将下面这段代码编译后执行:
1
package test;
2
3
import java.io.File;
4
import java.util.ArrayList;
5
import java.util.List;
6
7
8
/** *//**
9
* Descript:
10
*
11
*
12
*/
13
14
public class CreatePluginsConfig
{
15
private String path;
16
17
public CreatePluginsConfig(String path)
{
18
this.path=path;
19
}
20
21
public void print()
{
22
List list=getFileList(path);
23
if(list==null)
{
24
return;
25
}
26
27
int length=list.size();
28
for(int i=0;i<length;i++)
{
29
String result="";
30
String thePath=getFormatPath(getString(list.get(i)));
31
File file=new File(thePath);
32
if(file.isDirectory())
{
33
String fileName=file.getName();
34
if(fileName.indexOf("_")<0)
{
35
continue;
36
}
37
String[] filenames=fileName.split("_");
38
String filename1=filenames[0];
39
String filename2=filenames[1];
40
result=filename1+","+filename2+",file:/"+path+"//"+fileName+"//,4,false";
41
System.out.println(result);
42
}else if(file.isFile())
{
43
String fileName=file.getName();
44
if(fileName.indexOf("_")<0)
{
45
continue;
46
}
47
String[] filenames=fileName.split("_");
48
String filename1=filenames[0];
49
String filename2=filenames[1].substring(0, filenames[1].lastIndexOf("."));
50
result=filename1+","+filename2+",file:/"+path+"//"+fileName+",4,false";
51
System.out.println(result);
52
}
53
54
}
55
}
56
57
public List getFileList(String path)
{
58
path=getFormatPath(path);
59
path=path+"/";
60
File filePath=new File(path);
61
if(!filePath.isDirectory())
{
62
return null;
63
}
64
String[] filelist=filePath.list();
65
List filelistFilter=new ArrayList();
66
67
for(int i=0;i<filelist.length;i++)
{
68
String tempfilename=getFormatPath(path+filelist[i]);
69
filelistFilter.add(tempfilename);
70
}
71
return filelistFilter;
72
}
73
74
public String getString(Object object)
{
75
if(object==null)
{
76
return "";
77
}
78
return String.valueOf(object);
79
}
80
81
public String getFormatPath(String path)
{
82
path = path.replaceAll("////", "/");
83
path = path.replaceAll("//", "/");
84
return path;
85
}
86
87
public static void main(String[] args)
{
88
new CreatePluginsConfig("C://eclipse-plugins//plugins//JBossTools-2.1.2.GA-ALL-win32//eclipse//plugins").print();
89
}
90
}
执行完之后,将控制台中打印出的执行结果,直接复制到下面这个文件中:
C:/Genuitec/MyEclipse 7.0/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
然后用 -clean 命令重新启动Myeclipse即了完成插件的安装。
Myeclipse 7 的插件安装方式与原先的方式完全不一样了,下面以JBossTools-2.1.2.GA插件安装为例进行说明。
假设
Myeclipse 7的安装路径为:C:/Genuitec
JBossTools-2.1.2.GA插件的路径为: C:/eclipse-plugins/plugins/JBossTools-2.1.2.GA-ALL-win32
将下面这段代码编译后执行:
1
package test;
2
3
import java.io.File;
4
import java.util.ArrayList;
5
import java.util.List;
6
7
8
/** *//**
9
* Descript:
10
*
11
*
12
*/
13
14
public class CreatePluginsConfig
{
15
private String path;
16
17
public CreatePluginsConfig(String path)
{
18
this.path=path;
19
}
20
21
public void print()
{
22
List list=getFileList(path);
23
if(list==null)
{
24
return;
25
}
26
27
int length=list.size();
28
for(int i=0;i<length;i++)
{
29
String result="";
30
String thePath=getFormatPath(getString(list.get(i)));
31
File file=new File(thePath);
32
if(file.isDirectory())
{
33
String fileName=file.getName();
34
if(fileName.indexOf("_")<0)
{
35
continue;
36
}
37
String[] filenames=fileName.split("_");
38
String filename1=filenames[0];
39
String filename2=filenames[1];
40
result=filename1+","+filename2+",file:/"+path+"//"+fileName+"//,4,false";
41
System.out.println(result);
42
}else if(file.isFile())
{
43
String fileName=file.getName();
44
if(fileName.indexOf("_")<0)
{
45
continue;
46
}
47
String[] filenames=fileName.split("_");
48
String filename1=filenames[0];
49
String filename2=filenames[1].substring(0, filenames[1].lastIndexOf("."));
50
result=filename1+","+filename2+",file:/"+path+"//"+fileName+",4,false";
51
System.out.println(result);
52
}
53
54
}
55
}
56
57
public List getFileList(String path)
{
58
path=getFormatPath(path);
59
path=path+"/";
60
File filePath=new File(path);
61
if(!filePath.isDirectory())
{
62
return null;
63
}
64
String[] filelist=filePath.list();
65
List filelistFilter=new ArrayList();
66
67
for(int i=0;i<filelist.length;i++)
{
68
String tempfilename=getFormatPath(path+filelist[i]);
69
filelistFilter.add(tempfilename);
70
}
71
return filelistFilter;
72
}
73
74
public String getString(Object object)
{
75
if(object==null)
{
76
return "";
77
}
78
return String.valueOf(object);
79
}
80
81
public String getFormatPath(String path)
{
82
path = path.replaceAll("////", "/");
83
path = path.replaceAll("//", "/");
84
return path;
85
}
86
87
public static void main(String[] args)
{
88
new CreatePluginsConfig("C://eclipse-plugins//plugins//JBossTools-2.1.2.GA-ALL-win32//eclipse//plugins").print();
89
}
90
}
执行完之后,将控制台中打印出的执行结果,直接复制到下面这个文件中:
C:/Genuitec/MyEclipse 7.0/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
然后用 -clean 命令重新启动Myeclipse即了完成插件的安装。
相关文章推荐
- Myeclipse安装插件
- 为MyEclipse8.6 安装Freemarker插件
- 构建工具-----Gradle(二)-----myeclipse 10和myeclipse2015安装gradle插件----其他版本的myeclipse类似
- MyEclipse8.5开发环境配置中SVN插件安装重点解析
- Myeclipse8.5中svn插件安装方法总结
- MyEclipse使用总结——MyEclipse10安装SVN插件
- myeclipse 安装svn插件
- Myeclipse 10 安装反编译插件
- MyEclipse2014安装插件的几种方式(适用于Eclipse或MyEclipse其他版本)
- MyEclipse 8.6反编译插件安装
- MyEclipse、SVN插件、Tomat、jdk、数据库安装
- 安装文件MyEclipse6.5安装与卸载SVN插件方法
- MyEclipse安装SVN的插件
- 在Myeclipse安装Eclipse Color Themes插件
- eclipse myeclipse 安装findbugs插件
- Myeclipse安装svn插件(link方式)
- 在MyEclipse中安装propertiesEdit插件
- MyEclipse6.5安装SVN插件的三种方法
- myeclipse安装svn插件
- MyEclipse 6.X 集成svn插件安装