public interface IWorkingCopyManager
connect(java.lang.Object)
attempts to acquire a working copy for the given element
getWorkingCopy(java.lang.Object)
returns the working copy acquired on connect
disconnect(java.lang.Object)
releases the working copy acquired on connect
Implementations are generally not expected to be thread safe and, if not mentioned otherwise, may only be called from the user-interface thread.
Modifier and Type | Method and Description |
---|---|
void |
connect(java.lang.Object element)
Connects the given element to this manager.
|
void |
disconnect(java.lang.Object element)
Disconnects the given element from this manager.
|
ISourceFile[] |
getWorkingCopies()
Returns all working copies that are currently managed by this manager.
|
ISourceFile |
getWorkingCopy(org.eclipse.jface.text.IDocument document)
Returns the working copy managed for the given document.
|
ISourceFile |
getWorkingCopy(java.lang.Object element)
Returns the working copy managed for the given element.
|
void connect(java.lang.Object element) throws org.eclipse.core.runtime.CoreException
element
- the element (not null
)org.eclipse.core.runtime.CoreException
- if working copy could not be acquired successfullyvoid disconnect(java.lang.Object element)
connect(java.lang.Object)
.element
- the element (not null
)ISourceFile getWorkingCopy(java.lang.Object element)
element
- the element for which to find the working copy,
or null
null
if noneISourceFile getWorkingCopy(org.eclipse.jface.text.IDocument document)
Note: An implementation may go through the list of working copies and test whether the working copy buffer's document is equal to the given one. Therefore, this method should not be used in performance critical code.
document
- the document for which to find the working copy,
or null
null
if noneISourceFile[] getWorkingCopies()
null
)