Search in sources :

Example 1 with StandardLocation

use of org.eclipse.ceylon.javax.tools.StandardLocation in project ceylon by eclipse.

the class JavacPathFileManager method setDefaultForLocation.

private void setDefaultForLocation(Location locn) {
    Collection<File> files = null;
    if (locn instanceof StandardLocation) {
        switch((StandardLocation) locn) {
            case CLASS_PATH:
                files = locations.userClassPath();
                break;
            case PLATFORM_CLASS_PATH:
                files = locations.bootClassPath();
                break;
            case SOURCE_PATH:
                files = locations.sourcePath();
                break;
            case CLASS_OUTPUT:
                {
                    String arg = options.get(D);
                    files = (arg == null ? null : Collections.singleton(new File(arg)));
                    break;
                }
            case SOURCE_OUTPUT:
                {
                    String arg = options.get(S);
                    files = (arg == null ? null : Collections.singleton(new File(arg)));
                    break;
                }
        }
    }
    PathsForLocation pl = new PathsForLocation();
    if (files != null) {
        for (File f : files) pl.add(f.toPath());
    }
    if (!pl.isEmpty())
        pathsForLocation.put(locn, pl);
}
Also used : StandardLocation(org.eclipse.ceylon.javax.tools.StandardLocation) File(java.io.File)

Aggregations

File (java.io.File)1 StandardLocation (org.eclipse.ceylon.javax.tools.StandardLocation)1