Filter.add(tempfilename); 74. } 75. return filelistFilter; 76. } 77. public String getString(Object object) 78. { 79. if (object == null) 80. { 81. return ""; 82. } 83. return String.valueOf(object); 84. } 85. public String getFormatPath(String path) 86. { 87. path = path.replaceAll("////", "/"); 88. path = path.replaceAll("//", "/"); 89. return path; 90. } 91. public static void main(String[] args) 92. { 93. /*你新建的含有svn压缩文件的目录*/ 94. String plugin = "改成含有svn压缩文件的目录"; 95. new PluginConfigCreator().print(plugin); 96. } 97.} package csh.bzu.test; import java.io.File; import java.util.ArrayList; import java.util.List; /** * MyEclipse9 插件配置代码生成器 * * */ 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()) { &n上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
|