private Document OpenDocument(DotaDataObject ddo) { Document doc = DocumentRegistry.GetDocumentFor(ddo); if (doc == null) { //If we don't have this document open, create it and add it to the registry doc = new DotaObjectDocument(ddo); DocumentRegistry.OpenDocument(ddo, doc); } return(doc); }
private void OpenTextEditor(DotaDataObject ddo) { Document doc = DocumentRegistry.GetDocumentFor(ddo); if (doc == null) { //If we don't have this document open, create it and add it to the registry doc = new DotaObjectDocument(ddo); DocumentRegistry.OpenDocument(ddo, doc); } (doc as DotaObjectDocument).OpenTextEditor(); }