Example usage for org.eclipse.jdt.internal.core UserLibraryManager UserLibraryManager

List of usage examples for org.eclipse.jdt.internal.core UserLibraryManager UserLibraryManager

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core UserLibraryManager UserLibraryManager.

Prototype

public UserLibraryManager() 

Source Link

Usage

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

License:Open Source License

private IClasspathContainer getClasspathContainer(final String name, final File jarFileOrDir)
        throws JavaModelException {
    List<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
    if (isDefined(name)) {
        UserLibrary userLibrary = new UserLibraryManager().getUserLibrary(name);
        Collections.addAll(list, userLibrary.getEntries());
    }//w  w w  .j  a  v a2s  .c o m
    return createClasspathContainer(name, getClasspathEntries(jarFileOrDir, list));
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

public static UserLibraryManager getUserLibraryManager() {
    if (MANAGER.userLibraryManager == null) {
        UserLibraryManager libraryManager = new UserLibraryManager();
        synchronized (MANAGER) {
            if (MANAGER.userLibraryManager == null) { // ensure another library manager was not set while creating the instance above
                MANAGER.userLibraryManager = libraryManager;
            }//from ww  w  . j av  a2  s .c  o  m
        }
    }
    return MANAGER.userLibraryManager;
}