org.eclipse.ui.texteditor.quickdiff
Interface IQuickDiffReferenceProvider
-
public interface IQuickDiffReferenceProvider
The protocol a reference provider for Quick Diff has to implement. Quick Diff references provide
a reference document (an IDocument
) that is used as the original against which
diff information is generated.
Extensions to the extension point quickdiff.referenceprovider
have to implement
this interface (plus another interface for plug-in and UI management.
-
Since:
- 3.0
Method Summary
|
void
|
dispose
()
Called when the reference is no longer used and the provider can free resources. |
String
|
getId
()
Returns the id of this reference provider. |
IDocument
|
getReference
(
IProgressMonitor monitor)
Returns the reference document for the quick diff display. |
boolean
|
isEnabled
()
Gives the implementation a hook to publish its enablement. |
void
|
setActiveEditor
(
ITextEditor editor)
Sets the active editor for the provider implementation. |
void
|
setId
(
String id)
Sets the id of this implementation. |
getReference
IDocument getReference(
IProgressMonitor monitor)
throws
CoreException
- Returns the reference document for the quick diff display.
-
-
Parameters:
-
monitor
- a preference monitor to monitor / cancel the process, or null
-
Returns:
- the reference document for the quick diff display or
null
if getting the
document was canceled or there is no reference available.
-
Throws:
-
CoreException
- if getting the document fails.
dispose
void dispose()
- Called when the reference is no longer used and the provider can free resources.
-
getId
String getId()
- Returns the id of this reference provider.
-
-
Returns:
- the id of this provider as stated in the extending plugin's manifest.
setActiveEditor
void setActiveEditor(
ITextEditor editor)
- Sets the active editor for the provider implementation. Will usually just be called right after
creation of the implementation.
-
-
Parameters:
-
editor
- the active editor.
isEnabled
boolean isEnabled()
- Gives the implementation a hook to publish its enablement. The action corresponding to this
implementation might be grayed out or not shown at all based on the value presented here.
-
-
Returns:
-
false
if the implementation cannot be executed, true
if it can,
or if it cannot be decided yet.
setId
void setId(
String id)
- Sets the id of this implementation. This method will be called right after creation, and
id
will be set to the Id
attribute specified in the extension's
declaration.
-
-
Parameters:
-
id
- the provider's new id.
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.