eclipse plugin 开发 增加classPath

eclipse plugin 开发 增加classPath

这段时间在开发eclipse plugin 时候,要在生成项目的时候自动增加library

其JAVA代码如下:
增加src :

IPath path  =   new  Path( " src/main/java " );
JavaCore.newSourceEntry(fCurrProject.getFolder(path).getFullPath());

增加con

IPath aopPath  =   new  Path( " melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING20_AOP " );
IClasspathEntry lib1 
=  JavaCore.newContainerEntry(aopPath);


<? xml version="1.0" encoding="UTF-8" ?>
< classpath >
    
< classpathentry  kind ="src"  path ="src/main/java" />
    
< classpathentry  kind ="src"  path ="src/test/java" />
    
< classpathentry  kind ="con"  path ="org.eclipse.jdt.launching.JRE_CONTAINER" />
    
< classpathentry  kind ="con"  path ="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING20_AOP" />
    
< classpathentry  kind ="con"  path ="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING20_CORE" />
    
< classpathentry  kind ="con"  path ="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING20_DAO" />
    
< classpathentry  kind ="con"  path ="melibrary.com.genuitec.eclipse.springframework.MYECLIPSE_SPRING20_WEB" />
    
< classpathentry  kind ="lib"  path ="WebRoot/WEB-INF/lib/antlr.jar" />
    
< classpathentry  kind ="lib"  path ="WebRoot/WEB-INF/lib/tecore.jar" />
    
< classpathentry  kind ="con"  path ="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER" />
    
< classpathentry  kind ="output"  path ="WebRoot/WEB-INF/classes" />
</ classpath >

你可能感兴趣的:(eclipse plugin 开发 增加classPath)