myeclipse svn

http://www.itnose.net/detail/6154416.html
Method 4 just uses my environment, record
Method 4: It is definitely feasible Method

1. Download the latest SVN package:
http://subclipse.tigris.org/ servlets/ProjectDocumentList?folderID=2240
2. Create a folder anywhere on your disk: "myplugins/svn". You can choose any name. For the convenience of plug-in management, it is recommended to use the name "myplugins".
3. Copy the two folders in the decompressed svn to "myplugins/svn".
4. Copy the following java code, modify the path and execute:
package app;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* MyEclipse9 plugin 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("_");// The position of the last underscore
                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)
    {
        / *The installation directory of your plugin*/
            String plugin = "Change to the installation directory//Genuitec//svn";
        new PluginConfigCreator().print(plugin);
    }
}
What needs to be noted here is to modify the path where svn is located. It is recommended Change to absolute path. For example d:/myplugins/svn/. . .
5. Find "$myeclipse_home/configuration /org.eclipse.equinox.simpleconfigurator/" and open the "bundles.inf" file in it. In order to prevent it from being unclear whether it is something we added later, we will return it several times at the end. car, then paste the code after running in step 4, save it
6. Restart myeclipse

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326691592&siteId=291194637