1. Download the installed plug-ins you need, the structure needs to be consistent with link installation:
+yourpluginname (Your plugin filename--parent)
----Plugins (folder required by default--child)
----Features (folder required by default--child)
2. Copy the plugin folder to the Custom plugins folder (which is your own easy to manage, self-built folder, this article is in D:/program Files/genuitec/common/myplugin)
3. Use MyEclipse to create a new Java file with the following code:
The code is as follows |
Copy Code |
Package app; Import Java.io.File; Import java.util.ArrayList; Import java.util.List; /** * MyEclipse 7.5 (2009-11-16) plug-in Configuration code generator */ 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 ("_");//Final underline position 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) { /* Your plugin's installation directory. Parameter string plugin the content is the absolute path of the plugin you want to install. Install the only need to replace their own plug-in path can be * * * String plugin = "D://program files//genuitec//common//myplugin"; New Pluginconfigcreator (). print (plugin); } } |
4. Run the above code to copy the contents of the console output to D:/program files/genuitec/myeclipse 7.5/configuration/ Org.eclipse.equinox.simpleconfigurator/bundles.info file.
5. Reboot MyEclipse Complete installation.