Examples of tokenAt()


Examples of org.damour.base.client.utils.StringTokenizer.tokenAt()

    if (StringUtils.isEmpty(text)) {
      return settings;
    }
    StringTokenizer lineTokenizer = new StringTokenizer(text, '\n');
    for (int i = 0; i < lineTokenizer.countTokens(); i++) {
      String line = lineTokenizer.tokenAt(i);
      if (line.indexOf('=') != -1) {
        String key = line.substring(0,line.indexOf('=')).trim();
        String value = line.substring(line.indexOf('=')+1).trim();
        settings.put(key, value);
      }
View Full Code Here

Examples of org.damour.base.client.utils.StringTokenizer.tokenAt()

          fireBundleLoadCallback();
          return;
        } else {
          StringTokenizer st = new StringTokenizer(localeName, '_');
          if (st.countTokens() > 0) {
            String lang = st.tokenAt(0);
            // 2. fetch bundleName_lang.properties
            // 3. fetch bundleName_lang_country.properties
            currentAttemptUrl = path + bundleName + "_" + lang + PROPERTIES_EXTENSION + "?rand=" + System.currentTimeMillis();

            // IE caches the file and causes an issue with the request
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

      StringTokenizer pathTk = new StringTokenizer( this.getSolutionPath(), "\n" );
      StringTokenizer nameTk = new StringTokenizer( this.getFileNames(), "\n" );
      StringTokenizer idTk = new StringTokenizer( this.getFileIds(), "\n" );
      //Build Arrays since we cannot pass complex objects from the js bus
      for ( int i = 0; i < pathTk.countTokens(); i++ ) {
        filesToDelete.add( new SolutionBrowserFile( idTk.tokenAt( i ), nameTk.tokenAt( i ), pathTk.tokenAt( i ) ) );
      }
      performOperation( true );
    } else {
      performOperation( true );
    }
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

          // it's an array!
          StringTokenizer st = new StringTokenizer( jparams.get( i ).getValue(), "[]," );
          int tokens = st.countTokens();
          int numParamsAdded = 0;
          for ( int j = 0; j < tokens; j++ ) {
            String token = st.tokenAt( j );
            if ( !StringUtils.isEmpty( token ) ) {
              if ( numParamsAdded > 0 ) {
                urlParams += "&";
              }
              numParamsAdded++;
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

      StringTokenizer pathTk = new StringTokenizer( this.getSolutionPath(), "\n" );
      StringTokenizer nameTk = new StringTokenizer( this.getFileNames(), "\n" );
      StringTokenizer idTk = new StringTokenizer( this.getFileIds(), "\n" );
      //Build Arrays since we cannot pass complex objects from the js bus
      for ( int i = 0; i < pathTk.countTokens(); i++ ) {
        filesToCopy.add( new SolutionBrowserFile( idTk.tokenAt( i ), nameTk.tokenAt( i ), pathTk.tokenAt( i ) ) );
      }
      performOperation( false );
    } else {
      performOperation( true );
    }
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

          for ( int i = 0; i < jsSettings.length(); i++ ) {
            String content = jsSettings.get( i ).getValue();
            StringTokenizer nameValuePairs = new StringTokenizer( content, ";" ); //$NON-NLS-1$
            String perspective = null, content_panel_id = null, content_url = null;
            for ( int j = 0; j < nameValuePairs.countTokens(); j++ ) {
              String currentToken = nameValuePairs.tokenAt( j ).trim();
              if ( currentToken.startsWith( "perspective=" ) ) { //$NON-NLS-1$
                perspective = currentToken.substring( "perspective=".length() ); //$NON-NLS-1$
              }
              if ( currentToken.startsWith( "content-panel-id=" ) ) { //$NON-NLS-1$
                content_panel_id = currentToken.substring( "content-panel-id=".length() ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

      StringTokenizer pathTk = new StringTokenizer( this.getSolutionPath(), "\n" );
      StringTokenizer nameTk = new StringTokenizer( this.getFileNames(), "\n" );
      StringTokenizer idTk = new StringTokenizer( this.getFileIds(), "\n" );
      //Build Arrays since we cannot pass complex objects from the js bus
      for ( int i = 0; i < pathTk.countTokens(); i++ ) {
        filesToCut.add( new SolutionBrowserFile( idTk.tokenAt( i ), nameTk.tokenAt( i ), pathTk.tokenAt( i ) ) );
      }
      performOperation( false );
    } else {
      performOperation( true );
    }
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

    } else {
      int[] intArray = new int[jsArrayString.length()];
      StringTokenizer tokenizer = new StringTokenizer( jsArrayString.toString(), "," );
      for ( int i = 0; i < tokenizer.countTokens(); i++ ) {
        try {
          String value = tokenizer.tokenAt( i );
          intArray[i] = Integer.parseInt( value );
        } catch ( Throwable t ) {
          Window.alert( t.getMessage() );
        }
      }
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

      if ( path.startsWith( "/" ) ) { //$NON-NLS-1$
        path = path.substring( 1 );
      }
      StringTokenizer st = new StringTokenizer( path, '/' );
      for ( int i = 0; i < st.countTokens(); i++ ) {
        String token = st.tokenAt( i );
        pathSegments.add( token );
      }
    }
    TreeItem item = getTreeItem( pathSegments );
    selectedItem = item;
View Full Code Here

Examples of org.pentaho.gwt.widgets.client.utils.string.StringTokenizer.tokenAt()

      if ( path.startsWith( "/" ) ) { //$NON-NLS-1$
        path = path.substring( 1 );
      }
      StringTokenizer st = new StringTokenizer( path, '/' );
      for ( int i = 0; i < st.countTokens(); i++ ) {
        pathSegments.add( st.tokenAt( i ) );
      }
    }
    return pathSegments;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.