适用于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
- /**
- * dependency jar folder
- */
- String fullname = sel.toString();
- int firstIndexOfBlank = fullname.indexOf(" ");
- String fullJarPath = fullname.substring(0, firstIndexOfBlank);
- if(!"".equals(fullJarPath)){
- return fullJarPath;
- }
三、打包发布spa
在eclipse中开发plugin时,能够借助eclipse ide生成build.xml,再执行ant build.update.jar便可。调试
关于eclipse中plugin的生成发布,参考:http://tianya23.blog.51cto.com/1081650/611994code