use of org.eclipse.wst.css.core.internal.document.CSSModelImpl in project webtools.sourceediting by eclipse.
the class AbstractCSSModelAdapter method createModel.
/**
*/
protected ICSSModel createModel() {
// create embedded CSS model (not for external CSS)
Element element = getElement();
if (element == null)
return null;
String contentType = null;
if (element instanceof ElementStyleImpl) {
contentType = ((ElementStyleImpl) element).getEmbeddedStyleType();
}
IStructuredModel baseModel = ((IDOMNode) element).getModel();
ICSSModel newModel = (ICSSModel) baseModel.getModelManager().createUnManagedStructuredModelFor(contentType != null ? contentType : CSS_ID);
((CSSModelImpl) newModel).setOwnerDOMNode(element);
return newModel;
}
Aggregations