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

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


   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetSelector(selector newSelector, NotificationChain msgs)
  {
    selector oldSelector = selector;
    selector = newSelector;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CssDslPackage.SELECTOR__SELECTOR, oldSelector, newSelector);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here


    _builder.newLine();
    final stylesheet model = this.parse(_builder.toString());
    EList<ruleset> _ruleset = model.getRuleset();
    final ruleset rs = _ruleset.get(0);
    EList<selector> _selectors = rs.getSelectors();
    final selector sel = _selectors.get(0);
    EList<simple_selector> _simpleselectors = sel.getSimpleselectors();
    final simple_selector simpleSel = _simpleselectors.get(0);
    ElementSelector _element = simpleSel.getElement();
    Assert.assertNotNull(_element);
    ElementSelector _element_1 = simpleSel.getElement();
    String _name = _element_1.getName();
View Full Code Here

    _builder.newLine();
    final stylesheet model = this.parse(_builder.toString());
    EList<ruleset> _ruleset = model.getRuleset();
    final ruleset rs = _ruleset.get(0);
    EList<selector> _selectors = rs.getSelectors();
    final selector sel = _selectors.get(0);
    EList<simple_selector> _simpleselectors = sel.getSimpleselectors();
    final simple_selector simpleSel = _simpleselectors.get(0);
    EList<CssSelector> _subSelectors = simpleSel.getSubSelectors();
    int _size = _subSelectors.size();
    Assert.assertNotSame(Integer.valueOf(0), Integer.valueOf(_size));
    EList<CssSelector> _subSelectors_1 = simpleSel.getSubSelectors();
View Full Code Here

    final stylesheet model = this.parse(_builder.toString());
    Assert.assertNotNull(model);
    EList<ruleset> _ruleset = model.getRuleset();
    ruleset _get = _ruleset.get(0);
    EList<selector> _selectors = _get.getSelectors();
    selector _get_1 = _selectors.get(0);
    EList<simple_selector> _simpleselectors = _get_1.getSimpleselectors();
    final simple_selector simpleSel1 = _simpleselectors.get(0);
    EList<CssSelector> _subSelectors = simpleSel1.getSubSelectors();
    int _size = _subSelectors.size();
    Assert.assertNotSame(Integer.valueOf(0), Integer.valueOf(_size));
    EList<CssSelector> _subSelectors_1 = simpleSel1.getSubSelectors();
    CssSelector _get_2 = _subSelectors_1.get(0);
    final ClassSelector subsel = ((ClassSelector) _get_2);
    String _name = subsel.getName();
    Assert.assertEquals("future", _name);
    EList<ruleset> _ruleset_1 = model.getRuleset();
    ruleset _get_3 = _ruleset_1.get(1);
    EList<selector> _selectors_1 = _get_3.getSelectors();
    selector _get_4 = _selectors_1.get(0);
    EList<simple_selector> _simpleselectors_1 = _get_4.getSimpleselectors();
    simple_selector _get_5 = _simpleselectors_1.get(0);
    EList<CssSelector> _subSelectors_2 = _get_5.getSubSelectors();
    CssSelector _get_6 = _subSelectors_2.get(0);
    String _name_1 = ((ClassSelector) _get_6).getName();
    Assert.assertEquals("current", _name_1);
View Full Code Here

  @Override
  public List<PropertyDefinition> findPropertiesBySelector(selector cssSelector) {
    List<PropertyDefinition> result = new ArrayList<>();
      // first we need to find the last selector
      logger.debug("searching for last selector");
      selector lastSelector = cssSelector;
      while (lastSelector.getSelector() != null) {
        lastSelector = lastSelector.getSelector();
      }
      logger.debug("lastSelector = " + lastSelector)
     
     
      for (simple_selector ss : lastSelector.getSimpleselectors()) {
       
        String elementName = null;
        List<String> elements = new ArrayList<>();
        if (ss.getElement() != null) {
          logger.debug(" - found element selector: " + ss.getElement().getName());
View Full Code Here

            // ElementSelectors:
            if (target instanceof ElementSelector) {
              stylesheet root = (stylesheet) resource.getContents().get(0);
              for (ruleset r : root.getRuleset()) {
                for (selector s : r.getSelectors()) {
                  selector cur = s;
                  while (cur != null) {
                    for (simple_selector ss : cur.getSimpleselectors()) {
                      if (ss.getElement() != null) {
                        ElementSelector check = ss.getElement();
                        if (check.getName().equals(((ElementSelector) target).getName())) {
                          ITextRegion declarationRegion = locationInFileProvider.getFullTextRegion(ss.getElement());
                          addOccurrenceAnnotation(DECLARATION_ANNOTATION_TYPE, document, declarationRegion, m);
                        }
                      }
                    }
                    cur = cur.getSelector();
                  }
                }
              }
            }
           
            // ClassSelector:
            if (target instanceof ClassSelector) {
              stylesheet root = (stylesheet) resource.getContents().get(0);
              for (ruleset r : root.getRuleset()) {
                for (selector s : r.getSelectors()) {
                  selector cur = s;
                  while (cur != null) {
                    for (simple_selector ss : cur.getSimpleselectors()) {
                      for (CssSelector subSel : ss.getSubSelectors()) {
                        if (subSel instanceof ClassSelector) {
                          ClassSelector check = (ClassSelector) subSel;
                          if (check.getName() != null) {
                            // TODO i don't get get a ClassSelectors name can be null
                            if (check.getName().equals(((ClassSelector) target).getName())) {
                              ITextRegion declarationRegion = locationInFileProvider.getFullTextRegion(subSel);
                              addOccurrenceAnnotation(DECLARATION_ANNOTATION_TYPE, document, declarationRegion, m);
                            }
                          }
                        }
                      }
                      if (ss.getElement() != null) {
                       
                      }
                    }
                    cur = cur.getSelector();
                  }
                }
              }
            }
            // ClassSelector:
            if (target instanceof IdSelector) {
              stylesheet root = (stylesheet) resource.getContents().get(0);
              for (ruleset r : root.getRuleset()) {
                for (selector s : r.getSelectors()) {
                  selector cur = s;
                  while (cur != null) {
                    for (simple_selector ss : cur.getSimpleselectors()) {
                      for (CssSelector subSel : ss.getSubSelectors()) {
                        if (subSel instanceof IdSelector) {
                          IdSelector check = (IdSelector) subSel;
                          if (check.getName().equals(((IdSelector) target).getName())) {
                            ITextRegion declarationRegion = locationInFileProvider.getFullTextRegion(subSel);
                            addOccurrenceAnnotation(DECLARATION_ANNOTATION_TYPE, document, declarationRegion, m);
                          }
                        }
                      }
                      if (ss.getElement() != null) {
                       
                      }
                    }
                    cur = cur.getSelector();
                  }
                }
              }
            }
           
View Full Code Here

TOP

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

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.