Class QuickDiff
java.lang.Object
org.eclipse.ui.texteditor.quickdiff.QuickDiff
Access class for the quick diff reference provider extension point.
This class may be instantiated, it is not intended to be subclassed.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateQuickDiffAnnotationModel
(ITextEditor editor, String id) Creates a new line differ annotation model with its reference provider set to the reference provider obtained by callinggetReferenceProviderOrDefault(editor, id)
.Returns the identifier of the quick diff provider installed with the given diff annotation model, or the empty string if it is not a diff annotation model or has no configured diff provider.Returns the descriptor of the "last saved version" reference provider.Returns a non-modifiable list ofReferenceProviderDescriptor
describing all extension to thequickDiffReferenceProvider
extension point.getReferenceProviderOrDefault
(ITextEditor editor, String id) Returns the quick diff reference provider registered underid
, or the default reference provider.
-
Constructor Details
-
QuickDiff
public QuickDiff()Creates a new instance.
-
-
Method Details
-
getDefaultProvider
Returns the descriptor of the "last saved version" reference provider.Clients should not cache this value because it can change when plug-ins get dynamically added or removed.
- Returns:
- the descriptor of "last saved version" reference provider or
null
if none
-
getReferenceProviderDescriptors
Returns a non-modifiable list ofReferenceProviderDescriptor
describing all extension to thequickDiffReferenceProvider
extension point.Clients should not cache this list because it can change when plug-ins get dynamically added or removed.
- Returns:
- the non-modifiable list of extensions to the
quickDiffReferenceProvider
extension point.
-
getReferenceProviderOrDefault
Returns the quick diff reference provider registered underid
, or the default reference provider. The returned provider gets its editor set toeditor
. If neither the requested provider nor the default provider returntrue
fromisEnabled
after having the editor set,null
is returned.Clients should not cache this value because it can change when plug-ins get dynamically added or removed.
- Parameters:
editor
- the editor to be installed with the returned providerid
- the id as specified in theplugin.xml
that installs the reference provider- Returns:
- the reference provider registered under
id
, or the default reference provider, ornull
-
createQuickDiffAnnotationModel
Creates a new line differ annotation model with its reference provider set to the reference provider obtained by callinggetReferenceProviderOrDefault(editor, id)
.- Parameters:
editor
- the editor to be installed with the returned providerid
- the id as specified in theplugin.xml
that installs the reference provider- Returns:
- a quick diff annotation model
-
getConfiguredQuickDiffProvider
Returns the identifier of the quick diff provider installed with the given diff annotation model, or the empty string if it is not a diff annotation model or has no configured diff provider.- Parameters:
differ
- a diff annotation model- Returns:
- the reference provider id, or the empty string for none
- Since:
- 3.2
-