Examples of CssRule


Examples of at.bestsolution.efxclipse.tooling.css.cssext.cssExtDsl.CSSRule

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetFunc(CSSRule newFunc, NotificationChain msgs)
  {
    CSSRule oldFunc = func;
    func = newFunc;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CssExtDslPackage.CSS_RULE_DEFINITION__FUNC, oldFunc, newFunc);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of com.google.gwt.libideas.resources.css.ast.CssRule

      if (x.getSelectors().size() == 1) {
        return;
      }

      for (CssSelector sel : x.getSelectors()) {
        CssRule newRule = new CssRule();
        newRule.getSelectors().add(sel);
        newRule.getProperties().addAll(x.getProperties());
        ctx.insertBefore(newRule);
      }
      ctx.removeMe();
      return;
    }
View Full Code Here

Examples of com.google.gwt.libideas.resources.css.ast.CssRule

      }

      String instance = "(" + context.getImplementationSimpleSourceName()
          + ".this." + functionName + "())";

      CssRule replacement = new CssRule();
      replacement.getSelectors().addAll(x.getSelectors());
      List<CssProperty> properties = replacement.getProperties();

      if (repeatStyle == RepeatStyle.None
          || repeatStyle == RepeatStyle.Horizontal) {
        properties.add(new CssProperty("height", new ExpressionValue(instance
            + ".getHeight() + \"px\""), false));
View Full Code Here

Examples of com.google.gwt.libideas.resources.css.ast.CssRule

      addNode(r);
      currentRule = r;
    }

    public void startSelector(SelectorList selectors) throws CSSException {
      CssRule r;

      if (nextSelectorCreatesRule) {
        r = new CssRule();
        addNode(r);
        currentRule = r;
      } else {
        r = (CssRule) currentRule;
        nextSelectorCreatesRule = true;
      }

      for (int i = 0; i < selectors.getLength(); i++) {
        r.getSelectors().add(new CssSelector(valueOf(selectors.item(i))));
      }
    }
View Full Code Here

Examples of com.google.gwt.libideas.resources.css.ast.CssRule

      // Assumed to run immediately after SplitRulesVisitor
      assert x.getSelectors().size() == 1;
      CssSelector sel = x.getSelectors().get(0);

      if (canonicalRules.containsKey(sel.getSelector())) {
        CssRule canonical = canonicalRules.get(sel.getSelector());

        // Check everything between the canonical rule and this rule for common
        // properties. If there are common properties, it would be unsafe to
        // promote the rule.
        boolean hasCommon = false;
        int index = rulesInOrder.indexOf(canonical) + 1;
        assert index != 0;

        for (Iterator<CssRule> i = rulesInOrder.listIterator(index); i.hasNext()
            && !hasCommon;) {
          hasCommon = haveCommonProperties(i.next(), x);
        }

        if (!hasCommon) {
          // It's safe to promote the rule
          canonical.getProperties().addAll(x.getProperties());
          ctx.removeMe();
          return false;
        }
      }
View Full Code Here

Examples of com.google.gwt.libideas.resources.css.ast.CssRule

      for (CssProperty p : x.getProperties()) {
        b.append(p.getName()).append(":").append(p.getValues().getExpression());
      }

      String content = b.toString();
      CssRule canonical = rulesByContents.get(content);

      // Check everything between the canonical rule and this rule for common
      // properties. If there are common properties, it would be unsafe to
      // promote the rule.
      if (canonical != null) {
        boolean hasCommon = false;
        int index = rulesInOrder.indexOf(canonical) + 1;
        assert index != 0;

        for (Iterator<CssRule> i = rulesInOrder.listIterator(index); i.hasNext()
            && !hasCommon;) {
          hasCommon = haveCommonProperties(i.next(), x);
        }

        if (!hasCommon) {
          canonical.getSelectors().addAll(x.getSelectors());
          ctx.removeMe();
          return false;
        }
      }
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssRule

      addNode(r);
      currentRule = r;
    }

    public void startSelector(SelectorList selectors) throws CSSException {
      CssRule r;

      if (nextSelectorCreatesRule) {
        r = new CssRule();
        addNode(r);
        currentRule = r;
      } else {
        r = (CssRule) currentRule;
        nextSelectorCreatesRule = true;
      }

      for (int i = 0; i < selectors.getLength(); i++) {
        r.getSelectors().add(new CssSelector(valueOf(selectors.item(i))));
      }
    }
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssRule

    }

    String instance = "(" + context.getImplementationSimpleSourceName()
        + ".this." + functionName.getExpression() + ")";

    CssRule replacement = new CssRule();
    replacement.getSelectors().addAll(x.getSelectors());
    List<CssProperty> properties = replacement.getProperties();

    if (repeatStyle == RepeatStyle.None
        || repeatStyle == RepeatStyle.Horizontal) {
      properties.add(new CssProperty("height", new ExpressionValue(instance
          + ".getHeight() + \"px\""), false));
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssRule

      addNode(r);
      currentRule = r;
    }

    public void startSelector(SelectorList selectors) throws CSSException {
      CssRule r;

      if (nextSelectorCreatesRule) {
        r = new CssRule();
        addNode(r);
        currentRule = r;
      } else {
        r = (CssRule) currentRule;
        nextSelectorCreatesRule = true;
      }

      for (int i = 0; i < selectors.getLength(); i++) {
        r.getSelectors().add(new CssSelector(valueOf(selectors.item(i))));
      }
    }
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssRule

    assertEquals(0, elseNodes.size());
  }

  public void testVisit_IfElse_CssElseInElseNodes() {
    // given
    CssRule elseRule = new CssRule();
    elseNodes.add(elseRule);

    // when
    elseNodeCreator.visit(cssIf, null);
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.