* @generated
*/
private static boolean openEditor(IWorkbench workbench, URI fileURI) {
IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
IEditorDescriptor editorDescriptor = workbench.getEditorRegistry()
.getDefaultEditor(fileURI.toFileString());
if (editorDescriptor == null) {
MessageDialog
.openError(
workbenchWindow.getShell(),
OntoUML.diagram.part.Messages.DiagramEditorActionBarAdvisor_DefaultFileEditorTitle,
NLS
.bind(
OntoUML.diagram.part.Messages.DiagramEditorActionBarAdvisor_DefaultFileEditorMessage,
fileURI.toFileString()));
return false;
} else {
try {
page.openEditor(new URIEditorInput(fileURI), editorDescriptor
.getId());
} catch (PartInitException exception) {
MessageDialog
.openError(
workbenchWindow.getShell(),