protected Optional<T> openTabPresenter(final boolean forceOpen,
                                           final K presenterKey,
                                           final Consumer<T> tabPresenterConsumer) {

        T tabPresenter = null;
        if (presenterKey == null) {
            AlertEvent.fireError(
                    AbstractTabPresenterPlugin.this,
                    "Missing key for " + getName(),
                    null);
        } else {
            tabPresenter = keyToPresenterMap.get(presenterKey);
            final TaskMonitor taskMonitor = new DefaultTaskMonitorFactory(this).createTaskMonitor();
            final Task task = new SimpleTask("Opening " + getName() + " (" + presenterKey + ")");

            if (tabPresenter != null) {
                // If we already have a tab item for this key then make sure it is visible.

                // Start spinning.
                taskMonitor.onStart(task);

                // Let the caller set what it wants on the presenter
                tabPresenterConsumer.accept(tabPresenter);

                // Tell the content presenter to select this existing tab.
                SelectContentTabEvent.fire(this, tabPresenter);

                // Stop spinning.
                taskMonitor.onEnd(task);

            } else if (forceOpen) {
                // Start spinning.
                taskMonitor.onStart(task);

                // If the item isn't already open but we are forcing it open then,
                // create a new presenter and register it as open.
                tabPresenter = tabPresenterProvider.get();

                // Let the caller set what it wants on the presenter
                tabPresenterConsumer.accept(tabPresenter);

                // Register the tab as being open.
                keyToPresenterMap.put(presenterKey, tabPresenter);
                presenterToKeyMap.put(tabPresenter, presenterKey);

                final CloseContentEvent.Handler closeHandler = createCloseHandler(tabPresenter);

                // Load the document and show the tab.
                showTab(presenterKey, tabPresenter, closeHandler, taskMonitor, task);
            }
        }

        return Optional.ofNullable(tabPresenter);
    }
@param forceOpen            If false will not open the presenter if it is not already open
@param presenterKey         The unique key that identifies the presenter
@param tabPresenterConsumer Method to modify the presenter before it is opened, i.e. telling
                            it what content to display.
@return The
stroom-core-client/src/main/java/stroom/data/client/AbstractTabPresenterPlugin.java