Diagram diagram = designEditor.getDiagram();
if (diagram == null) {
return null;
}
if (editingDomain == null) {
IDiagramBehavior diagramBehavior = designEditor.getDiagramTypeProvider().getDiagramBehavior();
if (diagramBehavior != null) {
editingDomain = diagramBehavior.getEditingDomain();
}
}
if (editingDomain == null) {
ResourceSet resourceSet = null;
Resource eResource = diagram.eResource();