Links安裝:
推薦使用此種安裝方式,因為它便于插件的管理
①在eclipse根目錄下新建文件夾links,這樣就得到了eclipse\links
②在eclipse\links下新建一個link文件(需要為每個插件建一個.link文件),比如svn.link,在這里我的插件安裝目錄結構為F:\eclipsePlugins\svn\,所以link文件名我命名為svn.link
③在svn.link中寫入如下一句話
path=F:/EclipsePlugins/svn或者path=F:\\EclipsePlugins\\svn
即path=你的插件安裝目錄(代表eclipse去哪個路徑加載查件)
④重新啟動eclipse(如果你的Eclipse安裝SVN插件之前啟動過需要先把eclipse關掉)
注意:
1、路徑的寫法使用“/”或者“\\”而不是用“\”取代。此處容易出錯。
2、如果發現插件沒有安裝成功,則刪除eclipse目錄下的configuration目錄中的文件夾org.eclipse.update(這是一個記錄插件更新情況的文件夾,其中的platform.xml文件是當前使用的插件),刪除掉這個文件夾后,eclipse會重新掃描所有的插件,此時再重新啟動eclipse時可能會比剛才稍微慢點。
原文來自:http://www.cnblogs.com/bbcyyb/archive/2012/02/22/2363929.html
方法二
1、下載最新的SVN包:
http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
2、在你的磁盤上任意位置創建文件夾:“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 + "http://,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("http:////", "/");
path = path.replaceAll("http://", "/");
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