@SuppressWarnings("unchecked")
    public MyPresenterWidget<?> open(final DocRef docRef,
                                     final boolean forceOpen,
                                     final boolean fullScreen,
                                     final CommonDocLinkTab selectedLinkTab,
                                     final TaskMonitorFactory taskMonitorFactory) {
        MyPresenterWidget<?> presenter = null;
        final TaskMonitor taskMonitor = taskMonitorFactory.createTaskMonitor();
        final Task task = new SimpleTask("Opening: " + docRef);
        try {
            // Start spinning.
            taskMonitor.onStart(task);

            final DocumentTabData existing = documentToTabDataMap.get(docRef);
            // If we already have a tab item for this document then make sure it is
            // visible.
            if (existing != null) {
                // Tell the content presenter to select this existing tab.
                SelectContentTabEvent.fire(this, existing);

                if (existing instanceof DocumentEditPresenter) {
                    presenter = (DocumentEditPresenter<?, D>) existing;
                }

                if (selectedLinkTab != null) {
                    GWT.log("existing - " + existing.getClass().getName());
                    if (existing instanceof DocumentEditTabPresenter<?, ?>) {
                        ((DocumentEditTabPresenter<?, ?>) existing).selectCommonTab(selectedLinkTab);
                    } else if (existing instanceof LinkTabPanelPresenter) {
                        ((LinkTabPanelPresenter) existing).selectCommonTab(selectedLinkTab);
                    }
                }
            } else if (forceOpen) {
                // If the item isn't already open but we are forcing it open then,
                // create a new presenter and register it as open.
                final MyPresenterWidget<?> documentEditPresenter = createEditor();
                presenter = documentEditPresenter;

                if (documentEditPresenter != null) {
                    ((HasTaskMonitorFactory) documentEditPresenter).setTaskMonitorFactory(taskMonitorFactory);
                }

                if (documentEditPresenter instanceof DocumentTabData) {
                    final DocumentTabData tabData = (DocumentTabData) documentEditPresenter;

                    // Register the tab as being open.
                    documentToTabDataMap.put(docRef, tabData);
                    tabDataToDocumentMap.put(tabData, docRef);

                    // Load the document and show the tab.
                    final CloseContentEvent.Handler closeHandler = new EntityCloseHandler(tabData);
                    showDocument(
                            docRef,
                            documentEditPresenter,
                            closeHandler,
                            tabData,
                            fullScreen,
                            selectedLinkTab,
                            taskMonitorFactory);
                }
            }

        } finally {
            // Stop spinning.
            taskMonitor.onEnd(task);
        }

        return presenter;
    }
4. This method will open a document and show it in the content pane with the desired
selectedTab
stroom-core-client/src/main/java/stroom/document/client/DocumentPlugin.java