use of org.eclipse.wst.css.core.internal.provisional.adapters.IStyleDeclarationAdapter in project webtools.sourceediting by eclipse.
the class ElementNodeCleanupHandler method getCSSModel.
/**
*/
private ICSSModel getCSSModel(Attr attr) {
if (attr == null)
return null;
INodeNotifier notifier = (INodeNotifier) attr.getOwnerElement();
if (notifier == null)
return null;
INodeAdapter adapter = notifier.getAdapterFor(IStyleDeclarationAdapter.class);
if (adapter == null)
return null;
if (!(adapter instanceof IStyleDeclarationAdapter))
return null;
IStyleDeclarationAdapter styleAdapter = (IStyleDeclarationAdapter) adapter;
return styleAdapter.getModel();
}
use of org.eclipse.wst.css.core.internal.provisional.adapters.IStyleDeclarationAdapter in project webtools.sourceediting by eclipse.
the class HTMLElementFormatter method getCSSModel.
/**
*/
private ICSSModel getCSSModel(Attr attr) {
if (attr == null)
return null;
INodeNotifier notifier = (INodeNotifier) attr.getOwnerElement();
if (notifier == null)
return null;
INodeAdapter adapter = notifier.getAdapterFor(IStyleDeclarationAdapter.class);
if (adapter == null)
return null;
if (!(adapter instanceof IStyleDeclarationAdapter))
return null;
IStyleDeclarationAdapter styleAdapter = (IStyleDeclarationAdapter) adapter;
return styleAdapter.getModel();
}
Aggregations