import org.simantics.scl.osgi.internal.Activator;
import org.simantics.scl.osgi.internal.ServiceBasedModuleSourceRepository;
import org.simantics.scl.osgi.internal.ServiceBasedTestRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.procedure.TObjectProcedure;
public class SCLOsgi {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SCLOsgi.class);
+
private SCLOsgi() {}
public static ModuleSourceRepository SOURCE_REPOSITORY = new ServiceBasedModuleSourceRepository(Activator.getContext());
}
});
}
-
+
public static String compileAllModules() {
ArrayList<String> modulesWithErrors = new ArrayList<String>();
SCLOsgi.SOURCE_REPOSITORY.forAllModules(new TObjectProcedure<String>() {
@Override
public boolean execute(String moduleName) {
- System.out.print(moduleName);
- System.out.print(" - ");
Failable<Module> module = SCLOsgi.MODULE_REPOSITORY.getModule(moduleName);
if(module.didSucceed())
- System.out.println("succeeded");
+ LOGGER.trace("{} - {}", moduleName, "succeeded");
else if(module == DoesNotExist.INSTANCE)
- System.out.println("does not exist"); // should not happen
+ LOGGER.trace("{} - {}", moduleName, "does not exist"); // should not happen
else {
- System.out.println("error");
+ LOGGER.trace("{} - {}", moduleName, "error");
modulesWithErrors.add(moduleName);
}
return true;