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)