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

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


 
 
  private List<CssTok> findPrefixTokens(ContentAssistContext context) {
    List<CssTok> prefixToks = new ArrayList<CssTok>();
    if (context.getLastCompleteNode().getSemanticElement() instanceof CssTok) {
      CssTok currentTok = (CssTok) context.getLastCompleteNode().getSemanticElement();
      for (CssTok tok : ((css_declaration)context.getLastCompleteNode().getSemanticElement().eContainer()).getValueTokens()) {
        if (tok == currentTok) break;
        prefixToks.add(tok);
      }
     
View Full Code Here


  protected void _createChildren(IOutlineNode parentNode, ruleset ruleset) {
    for (css_declaration d : ruleset.getDeclarations()) {
      StringBuilder valueBuilder = new StringBuilder();
      Iterator<CssTok> iterator = d.getValueTokens().iterator();
      while (iterator.hasNext()) {
        CssTok next = iterator.next();
        valueBuilder.append(labelProvider.getText(next));
      }
      EObjectNode node = createEObjectNode(parentNode, d, labelProvider.getImage(d.getProperty()), labelProvider.getText(d.getProperty()) + ": " +valueBuilder.toString().trim() + (d.isImportant()?" !important":""), true);
      node.setShortTextRegion(locationInFileProvider.getSignificantTextRegion(d.getProperty()));
    }
View Full Code Here

      // normal pseudo function
      b.append(pseudoFunc.getName());
      b.append("(");
      Iterator<CssTok> iterator = pseudoFunc.getParams().iterator();
      while (iterator.hasNext()) {
        CssTok next = iterator.next();
        b.append(getText(next));
      }
      b.append(")");
    }
    return b.toString();
View Full Code Here

    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) {
View Full Code Here

    String regex = r.getRegex().replaceAll("\\$", "");
   
   
    ParserInputCursor localInput = l.copy();

    CssTok tok = localInput.pollNextToken();
    int wsConsumed = 0;
    if (consumeWS == ConsumeWS.MAY_CONSUME) {
      while (tok instanceof WSTok) {
        tok = localInput.pollNextToken();
        wsConsumed++;
View Full Code Here

  private ResultNode parseFunction(ParserInputCursor in, CSSRuleFunc ruleFunc, ConsumeWS consumeWS) {
    ResultNode result = new ResultNode(NodeType.FUNCTION);
   
    ParserInputCursor local = in.copy();
   
    CssTok tok;
    try {
      tok = consumeWS(local, consumeWS);
     
      if (tok == null) {
        result.status = State.PROPOSE;
View Full Code Here

 
  private ResultNode parseURLType(ParserInputCursor input, CSSType rule, ConsumeWS consumeWS) {
    final ResultNode result = new ResultNode(NodeType.TYPE_URL);
    ParserInputCursor local = input.copy();
    try {
      CssTok tok = consumeWS(local, consumeWS);
      if (tok != null) {
        if (tok instanceof UrlTok) {
          result.status = State.MATCH;
          result.matched = tok;
          result.remainingInput = local.copy();
View Full Code Here

  private ResultNode parseINTType(ParserInputCursor l, CSSType rule, ConsumeWS consumeWS) {
    final ResultNode result = new ResultNode(NodeType.TYPE_INT);

    ParserInputCursor local = l.copy();
    try {
      CssTok tok = consumeWS(local, consumeWS);
      if (tok != null) {
        if (tok instanceof NumberTok) {
         
          NumberTok numberTok = (NumberTok) tok;
          double number = numberTok.getVal();
View Full Code Here

    ResultNode result = new ResultNode(NodeType.TYPE_NUM);
   
    ParserInputCursor local = l.copy();
   
    try {
      CssTok tok = consumeWS(local, consumeWS);
      if (tok != null) {
        if (tok instanceof NumberTok) {
          // ok
          NumberTok numberTok = (NumberTok) tok;
          double number = numberTok.getVal();
View Full Code Here

    return result;
  }
 
  private CssTok consumeWS(ParserInputCursor input, ConsumeWS consumeWS) throws Exception {
   
    CssTok tok = input.pollNextToken();
    int wsConsumed = 0;
    if (consumeWS == ConsumeWS.MAY_CONSUME || consumeWS == ConsumeWS.MUST_CONSUME) {
      while (tok instanceof WSTok) {
        tok = input.pollNextToken();
        wsConsumed++;
View Full Code Here

TOP

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

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.