if (dialog.open() == Window.OK && dialog.getResultAsDocumentListEntry() != null)
{
DocumentListEntry document = dialog.getResultAsDocumentListEntry();
DocsEditorInput editorInput = new DocsEditorInput(document);
try
{
window.getActivePage().openEditor(editorInput, DocumentEditor.EDITOR_ID, true, IWorkbenchPage.MATCH_INPUT);
}