| java.lang.Object org.eclipse.ui.XMLMemento
XMLMemento | final public class XMLMemento implements IMemento(Code) | | This class represents the default implementation of the
IMemento interface.
This class is not intended to be extended by clients.
See Also: IMemento |
Constructor Summary | |
public | XMLMemento(Document document, Element element) Creates a memento for the specified document and element. |
XMLMemento | public XMLMemento(Document document, Element element)(Code) | | Creates a memento for the specified document and element.
Clients should use createReadRoot and
createWriteRoot to create the initial
memento on a document.
Parameters: document - the document for the memento Parameters: element - the element node for the memento |
createReadRoot | public static XMLMemento createReadRoot(Reader reader) throws WorkbenchException(Code) | | Creates a Document from the Reader
and returns a memento on the first Element for reading
the document.
Same as calling createReadRoot(reader, null)
Parameters: reader - the Reader used to create the memento's document a memento on the first Element for reading the document throws: WorkbenchException - if IO problems, invalid format, or no element. |
createReadRoot | public static XMLMemento createReadRoot(Reader reader, String baseDir) throws WorkbenchException(Code) | | Creates a Document from the Reader
and returns a memento on the first Element for reading
the document.
Parameters: reader - the Reader used to create the memento's document Parameters: baseDir - the directory used to resolve relative file namesin the XML document. This directory must exist and include thetrailing separator. The directory format, including the separators,must be valid for the platform. Can be null if notneeded. a memento on the first Element for reading the document throws: WorkbenchException - if IO problems, invalid format, or no element. |
createWriteRoot | public static XMLMemento createWriteRoot(String type)(Code) | | Returns a root memento for writing a document.
Parameters: type - the element node type to create on the document the root memento for writing a document |
putBoolean | public void putBoolean(String key, boolean value)(Code) | | |
save | public void save(Writer writer) throws IOException(Code) | | Saves this memento's document current values to the
specified writer.
Parameters: writer - the writer used to save the memento's document throws: IOException - if there is a problem serializing the document to the stream. |
|
|