Search in sources :

Example 86 with ICSSNode

use of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode in project webtools.sourceediting by eclipse.

the class CSSModelUpdateContext method getCSSMediaRule.

/**
 */
CSSMediaRuleImpl getCSSMediaRule() {
    ICSSNode node = getNode();
    if (node instanceof CSSMediaRuleImpl) {
        return (CSSMediaRuleImpl) node;
    } else {
        CSSUtil.debugOut(// $NON-NLS-1$
        "CSSMediaRuleImpl is expected, but " + CSSUtil.getClassString(node));
        ungetNode();
        // $NON-NLS-1$
        throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");
    }
}
Also used : DOMException(org.w3c.dom.DOMException) ICSSNode(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode)

Example 87 with ICSSNode

use of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode in project webtools.sourceediting by eclipse.

the class CSSModelUpdateContext method getRGBColor.

/**
 */
RGBColorImpl getRGBColor() {
    ICSSNode node = getNode();
    if (node instanceof RGBColorImpl) {
        return (RGBColorImpl) node;
    } else {
        CSSUtil.debugOut(// $NON-NLS-1$
        "RGBColorImpl is expected, but " + CSSUtil.getClassString(node));
        ungetNode();
        // $NON-NLS-1$
        throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");
    }
}
Also used : DOMException(org.w3c.dom.DOMException) ICSSNode(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode)

Example 88 with ICSSNode

use of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode in project webtools.sourceediting by eclipse.

the class CSSModelUpdateContext method getCSSPageRule.

/**
 */
CSSPageRuleImpl getCSSPageRule() {
    ICSSNode node = getNode();
    if (node instanceof CSSPageRuleImpl) {
        return (CSSPageRuleImpl) node;
    } else {
        CSSUtil.debugOut(// $NON-NLS-1$
        "CSSPageRuleImpl is expected, but " + CSSUtil.getClassString(node));
        ungetNode();
        // $NON-NLS-1$
        throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");
    }
}
Also used : DOMException(org.w3c.dom.DOMException) ICSSNode(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode)

Example 89 with ICSSNode

use of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode in project webtools.sourceediting by eclipse.

the class CSSModelUpdateContext method getCounter.

/**
 */
CounterImpl getCounter() {
    ICSSNode node = getNode();
    if (node instanceof CounterImpl) {
        return (CounterImpl) node;
    } else {
        CSSUtil.debugOut(// $NON-NLS-1$
        "CounterImpl is expected, but " + CSSUtil.getClassString(node));
        ungetNode();
        // $NON-NLS-1$
        throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");
    }
}
Also used : DOMException(org.w3c.dom.DOMException) ICSSNode(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode)

Example 90 with ICSSNode

use of org.eclipse.wst.css.core.internal.provisional.document.ICSSNode in project webtools.sourceediting by eclipse.

the class CSSModelUpdateContext method getCSSStyleRule.

/**
 */
CSSStyleRuleImpl getCSSStyleRule() {
    ICSSNode node = getNode();
    if (node instanceof CSSStyleRuleImpl) {
        return (CSSStyleRuleImpl) node;
    } else {
        CSSUtil.debugOut(// $NON-NLS-1$
        "CSSStyleRuleImpl is expected, but " + CSSUtil.getClassString(node));
        ungetNode();
        // $NON-NLS-1$
        throw new DOMException(DOMException.INVALID_MODIFICATION_ERR, "");
    }
}
Also used : DOMException(org.w3c.dom.DOMException) ICSSNode(org.eclipse.wst.css.core.internal.provisional.document.ICSSNode)

Aggregations

ICSSNode (org.eclipse.wst.css.core.internal.provisional.document.ICSSNode)95 IndexedRegion (org.eclipse.wst.sse.core.internal.provisional.IndexedRegion)21 IStructuredDocumentRegion (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion)13 INodeNotifier (org.eclipse.wst.sse.core.internal.provisional.INodeNotifier)12 DOMException (org.w3c.dom.DOMException)12 ICSSModel (org.eclipse.wst.css.core.internal.provisional.document.ICSSModel)11 ICSSStyleDeclItem (org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem)11 Iterator (java.util.Iterator)10 ArrayList (java.util.ArrayList)9 List (java.util.List)9 ICSSDocument (org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument)9 Region (org.eclipse.jface.text.Region)8 CSSSourceFormatter (org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter)6 ICSSPrimitiveValue (org.eclipse.wst.css.core.internal.provisional.document.ICSSPrimitiveValue)6 ICSSStyleRule (org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule)6 IStructuredDocument (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)6 CSSCleanupStrategy (org.eclipse.wst.css.core.internal.cleanup.CSSCleanupStrategy)5 ICSSImportRule (org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule)5 ICSSStyleDeclaration (org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration)5 ITextRegion (org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion)5