class ClosableSimpleWorkbenchPanelPresenter extends AbstractDockingWorkbenchPanelPresenter<ClosableSimpleWorkbenchPanelPresenter> {

    @Override
    public void addPart(WorkbenchPartPresenter part) {
        SinglePartPanelHelper h = createSinglePartPanelHelper();
        if (h.hasNoParts()) {
            super.addPart(part);
        } else {
            h.closeFirstPartAndAddNewOne(() -> super.addPart(part));
        }
    }

    @Inject public  ClosableSimpleWorkbenchPanelPresenter(
            @Named("ClosableSimpleWorkbenchPanelView") final WorkbenchPanelView<ClosableSimpleWorkbenchPanelPresenter> view,
            final PerspectiveManager perspectiveManager,
            PlaceManager placeManager);

}