frameworkType = data.getFramework();
config = new Configuration();
log = Activator.getDefault();
if (data.getFramework() == null) {
throw new CoverException("No test framework set");
}
switch (t) {
case MODULE:
// new
config.setProject(data.getProject());
if (data.getProject() == null || data.getProject().length() == 0) {
throw new CoverException("No project name set");
}
if (data.getModule() == null || data.getModule().length() == 0) {
throw new CoverException("No module name set");
}
try {
config.addModule(data.getModule().replace(".erl", ""));
} catch (final ErlModelException e) {
ErlLogger.error(e);
throw new CoverException(e.getMessage());
}
break;
case ALL:
// new
if (data.getProjectAll() == null || data.getProjectAll().length() == 0) {
throw new CoverException("No project name set");
}
config.setProject(data.getProjectAll());
try {
final Collection<IErlModule> allModules = config.getProject()
.getModules();
for (final IErlModule m : allModules) {
log.info(m.getFilePath());
if (!m.getFilePath().contains("/test/")) {
config.addModule(m);
}
}
} catch (final ErlModelException e) {
ErlLogger.error(e);
throw new CoverException(e.getMessage());
}
break;
case CUSTOM:
break;