Examples of ICSSNode


Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

    if (preferredSelection instanceof IStructuredSelection) {
      Object[] selectedObjects = new Object[((IStructuredSelection) selection).size()];
      System.arraycopy(((IStructuredSelection) selection).toArray(), 0, selectedObjects, 0, selectedObjects.length);
      for (int i = 0; i < selectedObjects.length; i++) {
        if (selectedObjects[i] instanceof ICSSNode) {
          ICSSNode node = (ICSSNode) selectedObjects[i];
          while (node.getNodeType() == ICSSNode.PRIMITIVEVALUE_NODE || node.getNodeType() == ICSSNode.STYLEDECLITEM_NODE) {
            node = node.getParentNode();
            selectedObjects[i] = node;
          }
        }
      }
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

   */
  private String getCSSValue(Attr attr) {
    ICSSModel model = getCSSModel(attr);
    if (model == null)
      return null;
    ICSSNode document = model.getDocument();
    if (document == null)
      return null;
    INodeNotifier notifier = (INodeNotifier) document;
    CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
    // try another way to get formatter
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

   */
  private String getCSSContent(IDOMNode text) {
    ICSSModel model = getCSSModel(text);
    if (model == null)
      return null;
    ICSSNode document = model.getDocument();
    if (document == null)
      return null;
    INodeNotifier notifier = (INodeNotifier) document;
    CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
    // try another way to get formatter
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

   */
  private String getCSSContent(Node text) {
    ICSSModel model = getCSSModel(text);
    if (model == null)
      return null;
    ICSSNode document = model.getDocument();
    if (document == null)
      return null;
    INodeNotifier notifier = (INodeNotifier) document;
    CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
    // try another way to get formatter
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

   */
  private String getCSSValue(Attr attr) {
    ICSSModel model = getCSSModel(attr);
    if (model == null)
      return null;
    ICSSNode document = model.getDocument();
    if (document == null)
      return null;
    INodeNotifier notifier = (INodeNotifier) document;
    CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
    // try another way to get formatter
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

   */
  private String getCSSValue(Attr attr) {
    ICSSModel model = getCSSModel(attr);
    if (model == null)
      return null;
    ICSSNode document = model.getDocument();
    if (document == null)
      return null;
    INodeNotifier notifier = (INodeNotifier) document;
    CSSSourceFormatter formatter = (CSSSourceFormatter) notifier.getAdapterFor(CSSSourceFormatter.class);
    // try another way to get formatter
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

    }
    List result = new ArrayList();
    ResetObject resetObject = null;
    String identifier = null;
    Integer initial = null;
    ICSSNode cssValue = (ICSSNode) value;
    while (cssValue != null) {
      // find next idetifier.
      while (cssValue != null && !CounterHelper.isIdentifier(cssValue)) {
        cssValue = cssValue.getNextSibling();
      }
      if (cssValue == null) {
        return null;
      }
            // identifier:
            identifier = ((ICSSPrimitiveValue) value).getStringValue();
            cssValue = cssValue.getNextSibling();
            // value:
            if (CounterHelper.isNumber(cssValue)) {
              initial = new Integer((int) ((ICSSPrimitiveValue) value)
                  .getFloatValue(ICSSPrimitiveValue.CSS_INTEGER));
            }
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode

    }
    List result = new ArrayList();
    IncrementObject incrementObject = null;
    String identifier = null;
    Integer increment = null;
    ICSSNode cssValue = (ICSSNode) value;
    while (cssValue != null) {
      // find next idetifier.
      while (cssValue != null && !CounterHelper.isIdentifier(cssValue)) {
        cssValue = cssValue.getNextSibling();
      }
      if (cssValue == null) {
        return null;
      }
            // identifier:
            identifier = ((ICSSPrimitiveValue) value).getStringValue();
            cssValue = cssValue.getNextSibling();
            // value:
            if (CounterHelper.isNumber(cssValue)) {
              increment = new Integer((int) ((ICSSPrimitiveValue) value)
                  .getFloatValue(ICSSPrimitiveValue.CSS_INTEGER));
            }
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.