use of org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument in project webtools.sourceediting by eclipse.
the class CSSNodeImpl method notifyAttrReplaced.
protected void notifyAttrReplaced(CSSNodeImpl newAttr, CSSNodeImpl oldAttr) {
// for model
ICSSDocument doc = getContainerDocument();
if (doc == null)
return;
CSSModelImpl model = (CSSModelImpl) doc.getModel();
if (model == null)
return;
model.attrReplaced(this, newAttr, oldAttr);
// for adapters
int type = CHANGE;
if (newAttr == null)
type = REMOVE;
else if (oldAttr == null)
type = ADD;
notify(type, oldAttr, oldAttr, newAttr, getStartOffset());
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument in project webtools.sourceediting by eclipse.
the class CSSPrimitiveValueImpl method notifyValueChanged.
/**
*/
protected void notifyValueChanged(String oldValue) {
// for model
ICSSDocument doc = getContainerDocument();
if (doc == null)
return;
CSSModelImpl model = (CSSModelImpl) doc.getModel();
if (model == null)
return;
model.valueChanged(this, oldValue);
// for adapters
notify(CHANGE, new Short(fPrimitiveType), null, null, getStartOffset());
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument in project webtools.sourceediting by eclipse.
the class CSSAttrImpl method notifyValueChanged.
/**
*/
protected void notifyValueChanged(String oldValue) {
if (this.ownerCSSNode == null)
return;
// for model
ICSSDocument doc = ownerCSSNode.getContainerDocument();
if (doc == null)
return;
CSSModelImpl model = (CSSModelImpl) doc.getModel();
if (model == null)
return;
model.valueChanged(this, oldValue);
// for adapters
String value = getValue();
this.ownerCSSNode.notify(CHANGE, this, oldValue, value, this.ownerCSSNode.getStartOffset());
}
Aggregations