IEOModelGroupFactory.Utility.loadModelGroup(indexURL, modelGroup, myLoadFailures, true, indexURL.toURL(), progressMonitor);
} finally {
modelGroup.removePropertyChangeListener(EOModelGroup.MODELS, getContentOutlinePage());
}
EOModel model = modelGroup.getEditingModel();
boolean showModelGroup = true;
if (model == null) {
handleModelErrors(myLoadFailures, true, null);
Set<EOModel> models = modelGroup.getModels();
if (models.size() > 0) {
model = models.iterator().next();
showModelGroup = true;
}
}
if (model == null) {
// DO NOTHING
} else {
//EclipseFileUtils.getEditorInput(model);
if (openingEntityName != null) {
myOpeningEntity = model.getEntityNamed(openingEntityName);
}
handleModelErrors(myLoadFailures, false, null);
if (model.getModelGroup() != null) {
model.getModelGroup().addPropertyChangeListener(EOModel.DIRTY, myDirtyModelListener);
}
model.addPropertyChangeListener(EOModel.DIRTY, myDirtyModelListener);
myEntitiesChangeListener.start();
model.addPropertyChangeListener(EOModel.ENTITIES, myEntitiesChangeListener);
myStoredProceduresChangeListener.start();
model.addPropertyChangeListener(EOModel.STORED_PROCEDURES, myStoredProceduresChangeListener);
myDatabaseConfigsChangeListener.start();
model.addPropertyChangeListener(EOModel.DATABASE_CONFIGS, myDatabaseConfigsChangeListener);
myFetchSpecsChangeListener.start();
model.addPropertyChangeListener(EOModel.ENTITY + "." + EOEntity.FETCH_SPECIFICATIONS, myFetchSpecsChangeListener);
myEntityIndexesChangeListener.start();
model.addPropertyChangeListener(EOModel.ENTITY + "." + EOEntity.ENTITY_INDEXES, myEntityIndexesChangeListener);
// setInput(new EOModelEditorInput(fileEditorInput));
// init(getEditorSite(), new
// EOModelEditorInput(fileEditorInput));
updatePartName();
getEditorSite().setSelectionProvider(this);