Returns the active editor document and view, or (None,None) if no active document or its not an editor document.
()
| 137 | pass |
| 138 | |
| 139 | def GetActiveEditorDocument(): |
| 140 | """Returns the active editor document and view, or (None,None) if no |
| 141 | active document or its not an editor document. |
| 142 | """ |
| 143 | view = GetActiveView() |
| 144 | if view is None or isinstance(view, TreeView): |
| 145 | return (None, None) |
| 146 | doc = view.GetDocument() |
| 147 | if hasattr(doc, "MarkerAdd"): # Is it an Editor document? |
| 148 | return doc, view |
| 149 | return (None, None) |
| 150 | |
| 151 | def GetActiveFileName(bAutoSave = 1): |
| 152 | """Gets the file name for the active frame, saving it if necessary. |
nothing calls this directly
no test coverage detected