Applicable to eclipse4.x. x. The environment is eclipse4.2.0.
1. openextern
Official Website: http://code.google.com/p/openextern/
Source code: svn checkout http://openextern.googlecode.com/svn/trunk/ openextern-read-only
Problem: Unable to open external jar package dependencies such as maven and jar
2. Problem Solving
Import it to eclipse for debugging. You can obtain the path. In BaseOpenAction. in java, it is found that the ISelection of the public String getSelectedFolderPath (ISelection selection) method has obtained the path, but is not of the determined resource type. The return value is null. Therefore, you only need to do the following.
- /**
- * dependency jar folder
- */
- String fullname = sel.toString();
- int firstIndexOfBlank = fullname.indexOf(" ");
- String fullJarPath = fullname.substring(0, firstIndexOfBlank);
- if(!"".equals(fullJarPath)){
- return fullJarPath;
- }
3. Package and release
When developing plugin in eclipse, you can use eclipse ide to generate build. xml, and then execute ant build. update. jar.
For the generation and release of plug-in eclipse, refer to: http://tianya23.blog.51cto.com/1081650/611994