Package org.pentaho.mantle.client.solutionbrowser.PluginOptionsHelper

Examples of org.pentaho.mantle.client.solutionbrowser.PluginOptionsHelper.ContentTypePlugin


        if ( ( item == solutionTree.getTrashItem() )
            || ( !file.isFolder() && ( isShowHiddenFiles() || !file.isHidden() ) ) ) {
          // TODO Currently Old solution repository stores url type files. New repository does not have that
          // concept. What do we need to do here
          //String url = fileElement.getAttribute("url"); //$NON-NLS-1$
          ContentTypePlugin plugin = PluginOptionsHelper.getContentTypePlugin( file.getName() );
          String icon = null;
          if ( plugin != null ) {
            icon = plugin.getFileIcon();
          }
          if ( item == solutionTree.getTrashItem() && file.isFolder() ) {
            icon = "mantle/images/folderIcon.png"; //$NON-NLS-1$
          }
View Full Code Here


        extension = fileNameWithPath.substring( fileNameWithPath.lastIndexOf( FILE_EXTENSION_DELIMETER ) + 1 ); //$NON-NLS-1$
      }
      if ( !executableFileExtensions.contains( extension ) ) {
        url = getPath() + "api/repos/" + pathToId( fileNameWithPath ) + "/content"; //$NON-NLS-1$ //$NON-NLS-2$
      } else {
        ContentTypePlugin plugin = PluginOptionsHelper.getContentTypePlugin( fileNameWithPath );
        url =
          getPath()
            + "api/repos/" + pathToId( fileNameWithPath ) + "/" + ( plugin != null && ( plugin.getCommandPerspective( mode ) != null ) ? plugin.getCommandPerspective( mode ) : "generatedContent" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
      // force to open pdf files in another window due to issues with pdf readers in IE browsers
      // via class added on themeResources for IE browsers
      boolean pdfReaderEmbeded = RootPanel.getBodyElement().getClassName().contains( "pdfReaderEmbeded" );
      if ( mode == FileCommand.COMMAND.NEWWINDOW || ( extension.equals( "pdf" ) && pdfReaderEmbeded ) ) {
View Full Code Here

    FavoritePickItem favoritePickItem = new FavoritePickItem( fileNameWithPath );
    FavoritePickList.getInstance().remove( favoritePickItem );
  }

  public void setDeepLinkUrl( String fileNameWithPath ) {
    ContentTypePlugin plugin = PluginOptionsHelper.getContentTypePlugin( fileNameWithPath );
    if ( plugin != null && plugin.hasCommand( COMMAND.RUN ) ) {
      String url =
        getPath() + "api/repos/" + pathToId( fileNameWithPath ) + "/" + plugin.getCommandPerspective( COMMAND.RUN ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      contentTabPanel.getCurrentFrame().setDeepLinkUrl( url );
    }
  }
View Full Code Here

    if ( file.getName().endsWith( ".analysisview.xaction" ) ) { //$NON-NLS-1$
      openFile( file, COMMAND.RUN );
    } else {
      // check to see if a plugin supports editing
      ContentTypePlugin plugin = PluginOptionsHelper.getContentTypePlugin( file.getName() );
      if ( plugin != null && plugin.hasCommand( COMMAND.EDIT ) ) {
        // load the editor for this plugin
        String editUrl =
          getPath()
            + "api/repos/" + pathToId( file.getPath() ) + "/" + ( plugin != null && ( plugin.getCommandPerspective( COMMAND.EDIT ) != null ) ? plugin.getCommandPerspective( COMMAND.EDIT ) : "editor" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        // See if it's already loaded
        for ( int i = 0; i < contentTabPanel.getTabCount(); i++ ) {
          Widget w = contentTabPanel.getTab( i ).getContent();
          if ( w instanceof IFrameTabPanel && ( (IFrameTabPanel) w ).getUrl().endsWith( editUrl ) ) {
            // Already up, select and exit
View Full Code Here

    RepositoryFile file = filesListPanel.getSelectedFileItems().get( 0 ).getRepositoryFile();
    if ( file.getName().endsWith( ".analysisview.xaction" ) ) { //$NON-NLS-1$
      openFile( file, COMMAND.RUN );
    } else {
      // check to see if a plugin supports editing
      ContentTypePlugin plugin = PluginOptionsHelper.getContentTypePlugin( file.getName() );
      if ( plugin != null && plugin.hasCommand( COMMAND.EDIT ) ) {
        // load the editor for this plugin
        String editUrl =
          getPath()
            + "api/repos/" + pathToId( file.getPath() ) + "/" + ( plugin != null && ( plugin.getCommandPerspective( COMMAND.EDIT ) != null ) ? plugin.getCommandPerspective( COMMAND.EDIT ) : "editor" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$      
        // See if it's already loaded
        for ( int i = 0; i < contentTabPanel.getTabCount(); i++ ) {
          Widget w = contentTabPanel.getTab( i ).getContent();
          if ( w instanceof IFrameTabPanel && ( (IFrameTabPanel) w ).getUrl().endsWith( editUrl ) ) {
            // Already up, select and exit
View Full Code Here

TOP

Related Classes of org.pentaho.mantle.client.solutionbrowser.PluginOptionsHelper.ContentTypePlugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.