IFile eogenFile = _modelFile.getWorkspace().getRoot().getFileForLocation(new Path(eogenPath));
for (int dupeNum = 0; eogenFile.exists(); dupeNum++) {
eogenPath = eogenBasePath + dupeNum + extension;
eogenFile = _modelFile.getWorkspace().getRoot().getFileForLocation(new Path(eogenPath));
}
eogenModel.writeToFile(eogenFile, null);
}
if (!failures.isEmpty()) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
new EOModelErrorDialog(new Shell(), failures).open();