change addToPaneViewAndSelect to resolve with a Document object if a document was opened to maintain backwards compatability