解决eclipse插件openextern没法打开依赖jar包的问题

适用于eclipse4.x.x,本人环境为eclipse4.2.0java

 一、openexterneclipse

官网:http://code.google.com/p/openextern/maven

源代码:svn checkout http://openextern.googlecode.com/svn/trunk/ openextern-read-onlyide

问题:没法打开maven、jar等外部jar包依赖的问题svn

二、问题解决ui

导入eclipse中,进行调试;发现可以获取路径;在BaseOpenAction.java中,发现方法public String getSelectedFolderPath(ISelection selection)的ISelection已经获取到路径,但不属于判断的资源类型,返回为空。 因此只须要作以下处理便可。google

  
  
           
  
  
  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.             } 

三、打包发布spa

在eclipse中开发plugin时,能够借助eclipse ide生成build.xml,再执行ant build.update.jar便可。调试

关于eclipse中plugin的生成发布,参考:http://tianya23.blog.51cto.com/1081650/611994code

相关文章
相关标签/搜索