Solve the problem that the eclipse plug-in openextern cannot open the dependent jar package

Source: Internet
Author: User

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.

 
 
  1. /** 
  2.              * dependency jar folder 
  3.              */ 
  4.             String fullname = sel.toString(); 
  5.             int firstIndexOfBlank = fullname.indexOf(" "); 
  6.             String fullJarPath = fullname.substring(0, firstIndexOfBlank); 
  7.             if(!"".equals(fullJarPath)){ 
  8.                 return fullJarPath; 
  9.             } 

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

 

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.