{
                ecore2xmlResource.save(null);
                
                IFile file = getFile(ecore2xmlResource);
                IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
                
                final IWorkbenchPart activePart = workbenchPage.getActivePart();
                if (activePart instanceof ISetSelectionTarget)
                {
                  final ISelection targetSelection = new StructuredSelection(file);
                  workbenchWindow.getShell().getDisplay().asyncExec(new Runnable()
                    {
                    public void run()
                    {
                      ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
                    }
                    });
                }
                
                try {
                  workbenchPage.openEditor(new FileEditorInput(file), workbenchWindow.getWorkbench().getEditorRegistry().getDefaultEditor(file.getFullPath().toString()).getId());                      
                } catch (PartInitException pie) {
                  Ecore2XMLUIPlugin.INSTANCE.log(pie);                      
                }
              }