linkå®è£
å®è£
subclipse, MyEclipse9.0 SVNæ件
1ãä»å®ç½ä¸è½½site-1.6.10.zipæ件,ç½åæ¯:subclipse.tigris.org,
2ãä»ä¸è§£ååºfeaturesä¸ pluginsæ件夹ï¼å¤å¶å°E:\MyEclipse\myPlugin\svnéé¢ï¼å
¶å®ç*.xmlæ件ä¸è¦ã
3ãå¨ E:\MyEclipse\MyEclipse9.0\dropinsä¸æ°å»ºæ件svn.link,å
容æ¯:path=E:\\MyEclipse \\myPlugin\\svnä¿åã
4ã(ååå¿:è¿ä¸æ¥ä¸ç¡®å®ï¼å
ä¸è¦å é¤)å é¤E:\MyEclipse\MyEclipse8.5\configuration \org.eclipse.updateæ件夹
5ãéå¯myeclipseå°±ä¸åæ£å¸¸äºã[/size]
以ä¸ä¸¤ç§æ¹æ³é½å°è¯æå
æ¹æ³ä¸:ç´æ¥è§£å
ä¸è½½SVNæ件ï¼site-1.6.10.zip
解ååå°å
¶å
¨é¨æ件æ·è´è³ï¼D:\Program Files\Genuitec\MyEclipse 8.5\dropinsï¼MyEclipseçå®è£
ç®å½ï¼
éå¯MyEclipseå³å¯åºç°SVNï¼
æ¹æ³åï¼è¯å®å¯è¡çæ¹æ³
1ãä¸è½½ææ°çSVNå
ï¼
http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=22402ãå¨ä½ çç£çä¸ä»»æä½ç½®å建æ件夹ï¼âmyplugins/svnâãååå¯ä»¥ä»»åï¼ä¸ºäºæ¹ä¾¿æ件管çï¼å»ºè®®å称为âmypluginsâã
3ãå°è§£åçsvnéç两个æ件夹æ·è´å°âmyplugins/svnâä¸ã
4ãå¤å¶ä¸åjava代ç ï¼ä¿®æ¹è·¯å¾å¹¶æ§è¡ï¼
package app;
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())
{
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 = "æ¹æå®è£
ç®å½//Genuitec//svn";
new PluginConfigCreator().print(plugin);
}
}
è¿ééè¦æ³¨æçæ¯ä¿®æ¹æ为åæsvnæå¨è·¯å¾ï¼å»ºè®®æ¹ä¸ºç»å¯¹è·¯å¾ãæ¯å¦d:/myplugins/svn/ããã
5ã æ¾å°â$myeclipse_home/configuration
/org.eclipse.equinox.simpleconfigurator/âï¼æå¼å
¶ä¸çâbundles.infâæ件ï¼ä¸ºäºé²æ¢åä¸æ¸
æ¯ä¸
æ¯æ们èªå·±åå çä¸è¥¿ï¼å¨æåé¢å¤åå 次车ï¼ç¶åç²è´´ç¬¬4æ¥è¿è¡åç代ç ï¼ä¿å
6ãéå¯myeclipse