Methods Summary |
---|
public org.w3c.dom.Node | createXmlNode()This method throws an exception if there is no underlying XML document.
XML documents cannot be created per se -- they are a by-product of the StructuredEditor
XML parser.
if (getXmlDocument() == null) {
// By design, a document node cannot be created, it is owned by the XML parser.
// By "design" this should never happen since the XML parser always creates an XML
// document container, even for an empty file.
throw new UnsupportedOperationException("Documents cannot be created"); //$NON-NLS-1$
}
return getXmlDocument();
|
public org.w3c.dom.Node | deleteXmlNode()This method throws an exception and does not even try to delete the XML document.
XML documents cannot be deleted per se -- they are a by-product of the StructuredEditor
XML parser.
// DEBUG. Change to log warning.
throw new UnsupportedOperationException("Documents cannot be deleted"); //$NON-NLS-1$
|
public java.lang.String | getBreadcrumbTrailDescription(boolean include_root)Computes a "breadcrumb trail" description for this node.
return "Document"; //$NON-NLS-1$
|
public java.lang.String | getShortDescription()Computes a short string describing the UI node suitable for tree views.
Uses the element's attribute "android:name" if present, or the "android:label" one
followed by the element's name.
return "Document"; //$NON-NLS-1$
|
public boolean | loadFromXmlNode(org.w3c.dom.Node xml_node)Populate this element node with all values from the given XML node.
This fails if the given XML node has a different element name -- it won't change the
type of this ui node.
This method can be both used for populating values the first time and updating values
after the XML model changed.
boolean structure_changed = (getXmlDocument() != xml_node);
setXmlDocument((Document) xml_node);
structure_changed |= super.loadFromXmlNode(xml_node);
if (structure_changed) {
invokeUiUpdateListeners(UiUpdateState.CHILDREN_CHANGED);
}
return structure_changed;
|
protected void | setUiParent(UiElementNode parent)This method throws an exception when attempted to assign a parent, since XML documents
cannot have a parent. It is OK to assign null.
if (parent != null) {
// DEBUG. Change to log warning.
throw new UnsupportedOperationException("Documents can't have UI parents"); //$NON-NLS-1$
}
super.setUiParent(null);
|