Package at.bestsolution.efxclipse.tooling.css.cssDsl

Examples of at.bestsolution.efxclipse.tooling.css.cssDsl.FuncTok


        acceptor.addPosition(n.getOffset(), 4, CssDslHighlightingConfiguration.FUNCTION);
        acceptor.addPosition(n.getOffset()+4, n.getLength()-5, CssDslHighlightingConfiguration.URL);
        acceptor.addPosition(n.getOffset() + n.getLength() - 1, 1, CssDslHighlightingConfiguration.FUNCTION);
      }
      else if (o instanceof FuncTok) {
        final FuncTok funcTok = (FuncTok) o;
        final ICompositeNode n = NodeModelUtils.getNode(funcTok);
       
        int nameLength = funcTok.getName().getName().length();
        acceptor.addPosition(n.getOffset(), nameLength + 1, CssDslHighlightingConfiguration.FUNCTION);
       
        for (CssTok tok : ((FuncTok) o).getParams()) {
          if (tok instanceof SymbolTok) {
            if (",".equals(((SymbolTok) tok).getSymbol())) {
View Full Code Here


    }
    else if (cssTok instanceof ColorTok) {
      return ((ColorTok) cssTok).getValue();
    }
    else if (cssTok instanceof FuncTok) {
      FuncTok funcTok = (FuncTok) cssTok;
      StringBuilder func = new StringBuilder();
      Iterator<CssTok> iterator = funcTok.getParams().iterator();
      while (iterator.hasNext()) {
        CssTok next = iterator.next();
        func.append(getText(next));
      }
      return getText(funcTok.getName()) + "(" + func.toString().trim()+ ")";
    }
    else if (cssTok instanceof UrlTok) {
      return "url(" + ((UrlTok)cssTok).getUrl().getUrl() + ")";
    }
    else return cssTok.toString();
View Full Code Here

    if( o instanceof ColorTok ) {
      ColorTok t = (ColorTok) o;
      String rv = "<table><tr><td><div style='height: 20px; width: 20px;border:1;border-style:solid;background-color: "+t.getValue()+"'></div></td><td>"+t.getValue()+"</td></tr></table>";
      return rv;
    } else if( o instanceof FuncTok ) {
      FuncTok f = (FuncTok) o;
      return getColorHoverForFunction(f);
    }
    else if (o.eContainer() instanceof FuncTok) {
      return getColorHoverForFunction((FuncTok) o.eContainer());
    }
View Full Code Here

        result.proposal = createProposal(ruleFunc.getName() + "()");
      }
      else {
        if (tok instanceof FuncTok) {
          // ok
          FuncTok fTok = (FuncTok) tok;
          String funcName = fTok.getName().getName();
         
          if (funcName.equals(ruleFunc.getName())) {
            result.status = State.MATCH; // func name ok, still need to match params
            result.matched = tok;
           
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.tooling.css.cssDsl.FuncTok

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.