Package de.innovationgate.eclipse.editors.tml

Examples of de.innovationgate.eclipse.editors.tml.TokenBean


    do {
      tmptoken = getRuleScanner().nextToken();
      if (filterEOF && tmptoken.equals(Token.EOF)) {
        continue;
      } else {
        TokenBean bean = new TokenBean();
        bean.setToken(tmptoken, getRuleScanner().getTokenLength(), getRuleScanner().getTokenOffset());
        tokens.add(bean);
      }
    } while (!tmptoken.equals(Token.EOF));
   
    List<IToken> typelist = new ArrayList<IToken>();
View Full Code Here


  }
 
  protected void printTokenList(List<TokenBean> tokens) {
    int zeahl = 0;

    TokenBean tmpbean = new TokenBean();
    Iterator<TokenBean> inter = tokens.iterator();
    while (inter.hasNext()) {
      zeahl++;
      tmpbean = inter.next();
      if (Plugin.getDefault().isDebugging()) {
        System.out.println(zeahl + tmpbean.toString());
      }
    }
  }
View Full Code Here

 
  protected List<TokenBean> sumUnknownInTokenList(List<TokenBean> listtosum,List<IToken> types) {
    List<TokenBean> newlist= new ArrayList<TokenBean>();
   
      for(int i=0;i<listtosum.size();i++){
        TokenBean current = listtosum.get(i);     
        if(isTokenInList(current.getToken(), types)){
          int sumTokenLenght=0;
          int j=i;
          TokenBean next = null;
          if (i < listtosum.size()-1) {
            next = listtosum.get(i+1);
          }
         
          while(next != null && equals(current.getToken(), next.getToken())){ 
           
            sumTokenLenght+=current.getLength();
            j++;
            current = listtosum.get(j);
            if (j < listtosum.size() - 1) {
              next = listtosum.get(j+1);
            } else {
              next = null;
            }
           
          }
          TokenBean tokenAtSummingStart = listtosum.get(i);
          TokenBean newTokenBean = new TokenBean();
          newTokenBean.setToken(tokenAtSummingStart.getToken(), sumTokenLenght+current.getLength(), tokenAtSummingStart.getOffset());         
          newlist.add(newTokenBean);
          i=j;
       
        else{
          newlist.add(current);
View Full Code Here

TOP

Related Classes of de.innovationgate.eclipse.editors.tml.TokenBean

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.