public void executeAction(I_CmsDialogContext context) {

        if (context.getResources().size() == 1) {
            CmsResource resource = context.getResources().get(0);
            if (OpenCms.getResourceManager().getResourceType(resource).getTypeName().equals(
                CmsListManager.RES_TYPE_LIST_CONFIG)) {
                CmsAppWorkplaceUi.get().showApp(
                    OpenCms.getWorkplaceAppManager().getAppConfiguration(CmsListManagerConfiguration.APP_ID),
                    A_CmsWorkplaceApp.addParamToState(
                        "",
                        CmsEditor.RESOURCE_ID_PREFIX,
                        resource.getStructureId().toString()));
            } else {

                boolean isOnline = context.getCms().getRequestContext().getCurrentProject().isOnlineProject();
                String link;
                if (isOnline
                    && !(CmsStringUtil.isEmptyOrWhitespaceOnly(context.getCms().getRequestContext().getSiteRoot())
                        || OpenCms.getSiteManager().isSharedFolder(
                            context.getCms().getRequestContext().getSiteRoot()))) {
                    // use the online link only in case the current site is not the root site or the shared folder
                    link = OpenCms.getLinkManager().getOnlineLink(
                        context.getCms(),
                        context.getCms().getSitePath(resource));
                } else {
                    link = OpenCms.getLinkManager().substituteLink(context.getCms(), resource);
                }
                if (isOnline
                    || !(OpenCms.getResourceManager().getResourceType(resource) instanceof CmsResourceTypeXmlContent)) {
                    A_CmsUI.get().openPageOrWarn(link, ONLINE_WINDOW_NAME);
                } else {
                    A_CmsUI.get().getPage().setLocation(link);
                }
            }
        }
    }
public void executeAction ( I_CmsDialogContext context ) { if ( context . getResources ( ) . size ( ) == 1 ) { CmsResource resource = context . getResources ( ) . get ( 0 ) ; if ( OpenCms . getResourceManager ( ) . getResourceType ( resource ) . getTypeName ( ) . equals ( CmsListManager . RES_TYPE_LIST_CONFIG ) ) { CmsAppWorkplaceUi . get ( ) . showApp ( OpenCms . getWorkplaceAppManager ( ) . getAppConfiguration ( CmsListManagerConfiguration . APP_ID ) , A_CmsWorkplaceApp . addParamToState ( "" , CmsEditor . RESOURCE_ID_PREFIX , resource . getStructureId ( ) . toString ( ) ) ) ; } else { boolean isOnline = context . getCms ( ) . getRequestContext ( ) . getCurrentProject ( ) . isOnlineProject ( ) ; String link ; if ( isOnline && ! ( CmsStringUtil . isEmptyOrWhitespaceOnly ( context . getCms ( ) . getRequestContext ( ) . getSiteRoot ( ) ) || OpenCms . getSiteManager ( ) . isSharedFolder ( context . getCms ( ) . getRequestContext ( ) . getSiteRoot ( ) ) ) ) { link = OpenCms . getLinkManager ( ) . getOnlineLink ( context . getCms ( ) , context . getCms ( ) . getSitePath ( resource ) ) ; } else { link = OpenCms . getLinkManager ( ) . substituteLink ( context . getCms ( ) , resource ) ; } if ( isOnline || ! ( OpenCms . getResourceManager ( ) . getResourceType ( resource ) instanceof CmsResourceTypeXmlContent ) ) { A_CmsUI . get ( ) . openPageOrWarn ( link , ONLINE_WINDOW_NAME ) ; } else { A_CmsUI . get ( ) . getPage ( ) . setLocation ( link ) ; } } } }
@see org.opencms.ui.actions.I_CmsWorkplaceAction#executeAction(org.opencms.ui.I_CmsDialogContext)