Install plug-ins in eclipse and myeclipse 8.0

Source: Internet
Author: User

Recently, various methods have not been used to install aspectj plug-ins in myeclipse8.0. Finally, I triedCodeThe method works. This is recorded for future reference.

The method is as follows:

Plug-in location: D: \ Program Files \ myeclipse 8.x latest \ myplugins \ aspectj

The structure of the aspectj folder is Eclipse/features (and plugins)

Run the following code and copy the output to the end of the bundles.info file in the. \ myeclipse 8.x latest \ Configuration \ org. Eclipse. Equinox. simpleconfigurator folder.

Enable myeclipse.

The Code is as follows (use someone else's --!)

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

Public Class Createpluginsconfig {

Public Createpluginsconfig (){
}

Public Void Print (string path ){
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 = 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 ( " _ " ); // Position of the last underline
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 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 ){
// The directory in which the plug-in files are located is in the form of Eclipse/features and Plugins.
String plugin = " D: \ Program Files \ myeclipse 8.x latest \ myplugins \ aspectj " ;
New Createpluginsconfig (). Print (plugin );
}
}

In addition, it is relatively simple to install Eclipse plug-ins, but remember:

Create a. Link file in the dropins folder under the eclipse directory and specify the plug-in path, for example:

Path = D:/program files/Eclipse/myplugins/aspectj (this is the directory of features and plugins)

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.