Example usage for org.eclipse.jdt.apt.core.internal.util FactoryPathUtil getFactoryPath

List of usage examples for org.eclipse.jdt.apt.core.internal.util FactoryPathUtil getFactoryPath

Introduction

In this page you can find the example usage for org.eclipse.jdt.apt.core.internal.util FactoryPathUtil getFactoryPath.

Prototype

public static FactoryPath getFactoryPath(IJavaProject jproj) 

Source Link

Usage

From source file:org.eclipse.ajdt.internal.core.ajde.CoreCompilerConfiguration.java

License:Open Source License

public String getProcessorPath() {
    // Grab the factory entries from the Java Compiler annotation project properties page
    IJavaProject jp = JavaCore.create(project);
    FactoryPath fp = FactoryPathUtil.getFactoryPath(jp);
    Map<FactoryContainer, FactoryPath.Attributes> containers = fp.getEnabledContainers();
    ArrayList<File> fileList = new ArrayList<File>(containers.size());
    for (Map.Entry<FactoryContainer, FactoryPath.Attributes> entry : containers.entrySet()) {
        FactoryPath.Attributes attr = entry.getValue();
        FactoryContainer fc = entry.getKey();
        if (!attr.runInBatchMode() && fc instanceof JarFactoryContainer) {
            JarFactoryContainer jfc = (JarFactoryContainer) fc;
            fileList.add(jfc.getJarFile());
        }/*from   w ww . ja va 2  s . c  o m*/
    }
    StringBuilder fcp = new StringBuilder();
    for (File f : fileList) {
        fcp.append(f.getAbsolutePath());
    }
    return fcp.toString();
}