public final class DocumentUndoManagerRegistry extends Object
connect
. After that call has successfully completed
undo manager can be obtained via getDocumentUndoManager
.
The undo manager is created on the first connect and disposed on the last
disconnect, i.e. this registry keeps track of how often a undo manager is
connected and returns the same undo manager to each client as long as the
document is connected.
The recoding of changes starts with the first connect(IDocument)
.
Modifier and Type | Method and Description |
---|---|
static void |
connect(IDocument document)
Connects the file at the given location to this manager.
|
static void |
disconnect(IDocument document)
Disconnects the given document from this registry.
|
static IDocumentUndoManager |
getDocumentUndoManager(IDocument document)
Returns the file buffer managed for the given location or
null
if there is no such file buffer. |
public static void connect(IDocument document)
getFileBuffer
returns the same file buffer until disconnect
is called.
The recoding of changes starts with the first connect(IDocument)
.
document
- the document to be connectedpublic static void disconnect(IDocument document)
document
- the document to be disconnectedpublic static IDocumentUndoManager getDocumentUndoManager(IDocument document)
null
if there is no such file buffer.
The provided location is either a full path of a workspace resource or an absolute path in the local file system. The file buffer manager does not resolve the location of workspace resources in the case of linked resources.
document
- the document for which to get its undo managernull
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.