use of org.eclipse.ceylon.langtools.tools.javac.file.BaseFileObject in project ceylon by eclipse.
the class AbstractDiagnosticFormatter method formatSource.
public String formatSource(JCDiagnostic d, boolean fullname, Locale l) {
JavaFileObject fo = d.getSource();
if (fo == null)
// d should have source set
throw new IllegalArgumentException();
String name;
if (fullname)
name = fo.getName();
else if (fo instanceof BaseFileObject)
name = ((BaseFileObject) fo).getShortName();
else
name = BaseFileObject.getSimpleName(fo);
return OSUtil.color(name, OSUtil.Color.blue);
}
Aggregations