Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在eclipse插件开发中获得项目的引用库列表?_Eclipse_Eclipse Plugin - Fatal编程技术网

如何在eclipse插件开发中获得项目的引用库列表?

如何在eclipse插件开发中获得项目的引用库列表?,eclipse,eclipse-plugin,Eclipse,Eclipse Plugin,我能够在eclipse中获得对项目的引用。像这样 公共无效选择已更改(IAction操作、ISelection选择){ 但我需要得到该项目中引用库的列表。谷歌没有帮助。请帮忙 谢谢。你所说的“引用库”是什么意思?这是插件依赖项吗?Java构建路径吗? I found the solution: IStructuredSelection ss = (IStructuredSelection) selection; IResource resource = (IResource)

我能够在eclipse中获得对项目的引用。像这样

公共无效选择已更改(IAction操作、ISelection选择){

但我需要得到该项目中引用库的列表。谷歌没有帮助。请帮忙


谢谢。

你所说的“引用库”是什么意思?这是插件依赖项吗?Java构建路径吗?
I found the solution:

    IStructuredSelection ss = (IStructuredSelection) selection;
    IResource resource = (IResource) ss.getFirstElement();
    project=  resource.getProject();

    IJavaProject javaProject= JavaCore.create(project); 


   classpath= javaProject.getRawClasspath();

   for (IClasspathEntry entry : classpath) {


          if (entry.getEntryKind() ==  IClasspathEntry.CPE_LIBRARY) {

               libs [i] = entry.getPath();

  }
I found the solution:

    IStructuredSelection ss = (IStructuredSelection) selection;
    IResource resource = (IResource) ss.getFirstElement();
    project=  resource.getProject();

    IJavaProject javaProject= JavaCore.create(project); 


   classpath= javaProject.getRawClasspath();

   for (IClasspathEntry entry : classpath) {


          if (entry.getEntryKind() ==  IClasspathEntry.CPE_LIBRARY) {

               libs [i] = entry.getPath();

  }