if (selectedModelElement == null) {
setErrorMessage(Messages.Fd2NewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
return false;
}
boolean result = ViewService.getInstance().provides(
new CreateDiagramViewOperation(new EObjectAdapter(
selectedModelElement), DiagramEditPart.MODEL_ID,
Fd2DiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
setErrorMessage(result ? null
: Messages.Fd2NewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
return result;