private void initContext() { context.put(JavacTaskImpl.class, this); if (context.get(TaskListener.class) != null) context.put(TaskListener.class, (TaskListener) null); if (taskListener != null) context.put(TaskListener.class, ccw.wrap(taskListener)); // initialize compiler's default locale context.put(Locale.class, locale); }
public boolean setLocation(Location location, Iterable<? extends File> path) { try { getStdManager().setLocation(location, path); } catch (IOException e) { myContext.reportMessage(Diagnostic.Kind.ERROR, e.getMessage()); return false; } return true; }
/** * Construct a JavaFileObject from the given file. * * <p><b>TODO: this method is useless here</b> * * @param file a file * @return a JavaFileObject from the standard file manager. */ public JavaFileObject asJavaFileObject(File file) { JavacFileManager fm = (JavacFileManager) context.get(JavaFileManager.class); return fm.getRegularFile(file); }
public JavacFileManager(Context context) { super(context.getStandardFileManager()); myContext = context; }