Integration of myeclipse and SVN (version 8.6 test OK)

Source: Internet
Author: User
Tags collabnet

1. You first download a SVN package name is site-1.6.2.1.zip in Baidu search will have

2. Write a piece of Java code
Create a Java project and write a class in it. The class name is createpluginsconfig. The package name is called DD by myself.

The Code is as follows:

Package dd;

Import java. Io. file;
Import java. util. arraylist;
Import java. util. List;

/**
* Install plug-in code generator for myeclipse 7.0g
* @ Author Administrator
*
*/
Public class createpluginsconfig {
Private string path;

Public createpluginsconfig (string path ){
This. Path = path;
}

@ Suppresswarnings ("unchecked ")
Public void print (){
List 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 ){
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;
}
String [] filenames = filename. Split ("_");
String filename1 = filenames [0];
String filename2 = filenames [1]. substring (0, filenames [1]
. Lastindexof ("."));
Result = filename1 + "," + filename2 + ", file:/" + path + "\\"
+ Filename + ", 4, false ";
System. Out. println (result );
}

}
}

Public list getfilelist (string path ){
Path = getformatpath (PATH );
Path = path + "/";
File filepath = new file (PATH );
If (! Filepath. isdirectory ()){
Return NULL;
}
String [] filelist = filepath. List ();
List filelistfilter = new arraylist ();

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 ){
System. Out. println ("============= Jad ========= ");
New createpluginsconfig (
"D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins ")
. Print (); // Plug-In Path

}
}

Among them, D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins is the decompression path of my SVN, which should be easily located in the myeclipse directory while compiling, the following output is displayed at the end of running the project:

Com. collabnet. subversion. merge, 1.9.0.4, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ com. collabnet. subversion. merge_1.9.0.4.jar, 4, false
Com. Sun. JNA, 3.0.9, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ com. Sun. jna_3.0.9.jar, 4, false
Org. tigris. subversion. clientadapter. javahl. win32, 1.6.3, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. clientadapter. javahl. win32_1.6.3.jar, 4, false
Org. tigris. subversion. clientadapter. javahl, 1.6.3, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. clientadapter. javahl_1.6.3.jar, 4, false
Org. tigris. subversion. clientadapter. svnkit, 1.6.2, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. clientadapter. svnkit_1.6.2.jar, 4, false
Org. Tigris. subversion. clientadapter, 1.6.0.2, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ org. Tigris. subversion. clientadapter_1.6.0.2.jar, 4, false
Org. tigris. subversion. subclipse. core, 1.6.2, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. subclipse. core_1.6.2.jar, 4, false
Org.tigris.subversion.subclipse.doc, 1.3.0, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ org.tigris.subversion.subclipse.doc _ 1.3.0.jar, 4
Org. tigris. subversion. subclipse. graph, 1.0.7, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. subclipse. graph_1.0.7.jar, 4, false
Org. tigris. subversion. subclipse. mylyn, 3.0.0, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. subclipse. mylyn_3.0.0.jar, 4, false
Org. tigris. subversion. subclipse. UI, 1.6.2, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ Org. tigris. subversion. subclipse. ui_1.6.2.jar, 4, false
Org. tmatesoft. svnkit, 1.3.0.5847, file:/D: \ Program Files \ genuitec \ myeclipse 7.0 \ subversion \ plugins \ org. tmatesoft. svnkit_1.3.0.5847.jar, 4, false

Copy the above Code to the end of Configuration \ org. Eclipse. Equinox. simpleconfigurator \ bundles.info file under myeclipse. Close myeclipse. Then run myeclipse in-Cleanup mode, and you will find that SVN is successfully loaded. Check the svn option in Windows ----- showviews --- others ..

So far .. Developers with the same problem are welcome to come and talk with me ..

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.