public abstract class RevisionAnnotationController extends Object
Revision,
RevisionInformation| Constructor and Description |
|---|
RevisionAnnotationController(IWorkbenchPage page,
IFile file,
ISelectionProvider historyList)
Create a controller that links an editor on a local file to a history list.
|
RevisionAnnotationController(IWorkbenchPage page,
IStorageEditorInput editorInput,
ISelectionProvider historyList)
Create a controller that links an editor input on a remote file to a history list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose of the controller.
|
protected abstract Object |
getHistoryEntry(Revision selected)
Return the history list entry corresponding to the provided revision.
|
protected String |
getRevisionId(Object historyEntry)
Return the revision id associated with the given history list entry.
|
static AbstractDecoratedTextEditor |
openEditor(IWorkbenchPage page,
IFile file)
Open a text editor that supports the use of a revision ruler on the given
file.
|
static AbstractDecoratedTextEditor |
openEditor(IWorkbenchPage page,
Object fileRevision,
IStorage storage)
Open a text editor that supports the use of a revision ruler on the given
file.
|
protected void |
revisionSelected(Revision selected)
Callback from the ruler when a particular revision has been selected by the user.
|
public RevisionAnnotationController(IWorkbenchPage page, IFile file, ISelectionProvider historyList)
page - the workbench pagefile - the local filehistoryList - the history list selection providerpublic RevisionAnnotationController(IWorkbenchPage page, IStorageEditorInput editorInput, ISelectionProvider historyList)
page - the workbench pageeditorInput - the editor input for the remote filehistoryList - the history list selection providerpublic static AbstractDecoratedTextEditor openEditor(IWorkbenchPage page, IFile file) throws PartInitException
page - the page in which the editor is to be openedfile - the file to be editedPartInitExceptionpublic static AbstractDecoratedTextEditor openEditor(IWorkbenchPage page, Object fileRevision, IStorage storage) throws PartInitException
page - the page in which the editor is to be openedfileRevision - the file revision objectstorage - the storage that provides access to the contents of the file revisionPartInitExceptionpublic void dispose()
protected void revisionSelected(Revision selected)
getHistoryEntry(Revision). Subclasses may override.selected - the selected revisionprotected abstract Object getHistoryEntry(Revision selected)
revisionSelected(Revision) method in
order to determine what the selection of the history list selection provider
should be set to.selected - the selected revision.protected String getRevisionId(Object historyEntry)
IFileRevision or
IResourceVariant in order to obtain the content identifier. Subclasses may override.historyEntry - the history list entry
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.