use of com.redhat.ceylon.common.StatusPrinter in project ceylon-compiler by ceylon.
the class LanguageCompiler method getStatusPrinterInstance.
/** Get the StatusPrinter instance for this context. */
public static StatusPrinter getStatusPrinterInstance(Context context) {
StatusPrinter statusPrinter = context.get(statusPrinterKey);
if (statusPrinter == null) {
statusPrinter = new StatusPrinter();
context.put(statusPrinterKey, statusPrinter);
}
return statusPrinter;
}
use of com.redhat.ceylon.common.StatusPrinter in project ceylon-compiler by ceylon.
the class CeyloncCompilerDelegate method typeCheck.
@Override
public void typeCheck(java.util.List<PhasedUnit> listOfUnits) {
StatusPrinter sp = getStatusPrinter();
int size = listOfUnits.size();
int i = 1;
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 1, i++, size, pu);
pu.validateTree();
pu.scanDeclarations();
}
i = 1;
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 2, i++, size, pu);
pu.scanTypeDeclarations();
}
i = 1;
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 3, i++, size, pu);
pu.validateRefinement();
}
i = 1;
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 4, i++, size, pu);
pu.analyseTypes();
}
i = 1;
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 5, i++, size, pu);
pu.analyseFlow();
}
i = 1;
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 6, i++, size, pu);
pu.analyseUsage();
}
i = 1;
UnknownTypeCollector utc = new UnknownTypeCollector();
for (PhasedUnit pu : listOfUnits) {
if (sp != null)
progress(sp, 7, i++, size, pu);
pu.getCompilationUnit().visit(utc);
}
}
use of com.redhat.ceylon.common.StatusPrinter in project ceylon-compiler by ceylon.
the class CeyloncCompilerDelegate method resolveModuleDependencies.
@Override
public void resolveModuleDependencies(PhasedUnits phasedUnits) {
final StatusPrinter sp = getStatusPrinter();
com.redhat.ceylon.compiler.typechecker.context.Context ceylonContext = LanguageCompiler.getCeylonContextInstance(context);
final ModuleValidator validator = new ModuleValidator(ceylonContext, phasedUnits);
if (sp != null) {
validator.setListener(new StatusPrinterProgressListener(validator, sp));
sp.clearLine();
sp.log("Starting resolving");
}
validator.verifyModuleDependencyTree();
if (sp != null) {
sp.clearLine();
sp.log("Done resolving");
}
}
Aggregations