EOEntity fileEntity = ((EOModelEditorInput) getEditorInput()).getFileEntity(); if (fileEntity != null) { setSelectedEntity(fileEntity);
if (myOpeningEntity != null) { setSelectedEntity(myOpeningEntity);
  protected void createPages() {    try {      myEntitiesTableEditor = new EOEntitiesTableEditor();      addPage(0, myEntitiesTableEditor, getEditorInput());      setPageText(0, Messages.getString("EOModelEditor.entitiesTab")); //$NON-NLS-1$      myEntityEditor = new EOEntityEditor();      addPage(1, myEntityEditor, getEditorInput());      setPageText(1, Messages.getString("EOModelEditor.noEntitySelected")); //$NON-NLS-1$      EOModelSelectionChangedListener modelSelectionChangedListener = new EOModelSelectionChangedListener();      myEntitiesTableEditor.addSelectionChangedListener(modelSelectionChangedListener);      EOEntitySelectionChangedListener entitySelectionChangedListener = new EOEntitySelectionChangedListener();      myEntityEditor.addSelectionChangedListener(entitySelectionChangedListener);      EOEntity fileEntity = ((EOModelEditorInput) getEditorInput()).getFileEntity();      if (fileEntity != null) {        setSelectedEntity(fileEntity);        setActivePage(1);      }    }    catch (PartInitException e) {      ErrorDialog.openError(getSite().getShell(), "Error creating editor.", null, e.getStatus());    }  }