class AbstractPopupActivity extends AbstractActivity implements PopupActivity {

    @Override
    public void onOpen() {
        super.onOpen();

        popup.addCloseHandler(new CloseHandler<PopupView>() {
            @Override
            public void onClose(CloseEvent<PopupView> event) {
                if (!placeManagerIsClosingUs) {
                    try {
                        popupAlreadyHiding = true;
                        placeManager.closePlace(place);
                    } finally {
                        popupAlreadyHiding = false;
                    }
                }
            }
        });

        final IsWidget widget = getWidget();

        popup.setContent(widget);
        popup.setSize(getSize());
        popup.setTitle(getTitle());
        popup.show();
    }

    protected  AbstractPopupActivity(final PlaceManager placeManager,
                                    final PopupView popupView);

}