Example usage for org.eclipse.jdt.core JavaCore getUserLibraryNames

List of usage examples for org.eclipse.jdt.core JavaCore getUserLibraryNames

Introduction

In this page you can find the example usage for org.eclipse.jdt.core JavaCore getUserLibraryNames.

Prototype

public static String[] getUserLibraryNames() 

Source Link

Document

Returns the names of all defined user libraries.

Usage

From source file:com.cisco.surf.jenkow.ide.config.UserLibConfigurator.java

License:Open Source License

public boolean isDefined(String userLib) {
    for (String name : JavaCore.getUserLibraryNames()) {
        if (name.equals(userLib))
            return true;
    }//from  w  w  w.java  2s . c o m
    return false;
}

From source file:org.jboss.ide.eclipse.archives.jdt.integration.ui.LibFilesetInfoWizardPage.java

License:Open Source License

protected ArrayList<CPUserLibraryElement> getElementList(IJavaProject fDummyProject) {
    String[] names = JavaCore.getUserLibraryNames();
    ArrayList<CPUserLibraryElement> elements = new ArrayList<CPUserLibraryElement>();
    for (int i = 0; i < names.length; i++) {
        IPath path = new Path(JavaCore.USER_LIBRARY_CONTAINER_ID).append(names[i]);
        try {//from   w  w w  .  j  ava 2  s .c o  m
            IClasspathContainer container = JavaCore.getClasspathContainer(path, fDummyProject);
            elements.add(new CPUserLibraryElement(names[i], container, fDummyProject));
        } catch (JavaModelException e) {
        }
    }
    return elements;
}