code: public void openPreview(String resourcePath, String resourceType) {
  
          if (m_currentPreview != null) {
              m_currentPreview.removePreview();
          }
          String provider = getProviderName(resourceType);
          if (m_previewFactoryRegistration.containsKey(provider)) {
              m_handler.m_galleryDialog.useMaxDimensions();
              m_currentPreview = m_previewFactoryRegistration.get(provider).getPreview(m_handler.m_galleryDialog);
              m_currentPreview.openPreview(resourcePath, !m_resultsSelectable);
              m_handler.hideShowPreviewButton(false);
          } else {
              CmsDebugLog.getInstance().printLine(
                  "Preview provider \"" + provider + "\" has not been registered properly.");
          }
      }
docs: Opens the preview for the given resource by the given resource type.<p>
  
  @param resourcePath the resource path
  @param resourceType the resource type name