/** * createElement method * @return org.w3c.dom.Element * @param tagName java.lang.String */ public Element createElement(String tagName) throws DOMException { checkTagNameValidity(tagName); ElementStyleImpl element = new ElementStyleImpl(); element.setOwnerDocument(this); element.setTagName(tagName); return element; }
public Node cloneNode(boolean deep) { ElementImpl cloned = new ElementStyleImpl(this); if (deep) cloneChildNodes(cloned, deep); return cloned; }
protected void setOwnerDocument(Document ownerDocument) { super.setOwnerDocument(ownerDocument); }
/** * @see setTagName(String) make this method package visible */ @Override public void setTagName(String tagName) { super.setTagName(tagName); }
public StyleSheet getSheet() { INodeAdapter adapter = getAdapterFor(IStyleSheetAdapter.class); if (adapter == null) return null; if (!(adapter instanceof IStyleSheetAdapter)) return null; return ((IStyleSheetAdapter) adapter).getSheet(); }
@Override public String getPrefix() { final String prefix = super.getPrefix(); if (prefix == null && isTwigTag()) { return ""; //$NON-NLS-1$ } return prefix; }
@Override @SuppressWarnings("rawtypes") public INodeAdapter getExistingAdapter(Object type) { // no validation or validation propagation for PHP tags if (isTwigTag() && type instanceof Class && ValidationAdapter.class.isAssignableFrom((Class) type)) { return nullValidator; } return super.getExistingAdapter(type); }
@Override public boolean isGlobalTag() { return isTwigTag() ? false : super.isGlobalTag(); }
public void execute() { _sourceViewer.getTextWidget().setSelection( ((ElementStyleImpl) child).getStartOffset(), ((ElementStyleImpl) child).getStartOffset()); _sourceViewer.doOperation(ITextOperationTarget.PASTE); }
/** * @see ElementStyleImpl#setOwnerDocument(Document) make this method package * visible */ @Override protected void setOwnerDocument(Document ownerDocument) { super.setOwnerDocument(ownerDocument); }
protected void setTagName(String tagName) { super.setTagName(tagName); } public Node cloneNode(boolean deep) {
public CSSStyleDeclaration getStyle() { INodeAdapter adapter = getAdapterFor(IStyleDeclarationAdapter.class); if (adapter == null) return null; if (!(adapter instanceof IStyleDeclarationAdapter)) return null; return ((IStyleDeclarationAdapter) adapter).getStyle(); }