@Override
public final void checkConfiguration(@NotNull OsgiRunConfiguration runConfiguration) throws RuntimeConfigurationException {
// make sure that if the user wants to re-use a runtime directory that it exists
if (!runConfiguration.isGenerateWorkingDir()) {
if (StringUtil.isEmptyOrSpaces(runConfiguration.getWorkingDir())) {
throw new RuntimeConfigurationError(OsmorcBundle.message("run.configuration.working.dir.set"));
}
File dir = new File(runConfiguration.getWorkingDir());
if (!dir.isDirectory()) {
if (!dir.mkdirs()) {
throw new RuntimeConfigurationError(OsmorcBundle.message("run.configuration.working.dir.create"));
}
FileUtil.delete(dir);
}
}