Class QuickDiff

java.lang.Object
org.eclipse.ui.texteditor.quickdiff.QuickDiff

public class QuickDiff extends Object
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 Details

    • QuickDiff

      public QuickDiff()
      Creates a new instance.
  • Method Details

    • getDefaultProvider

      public ReferenceProviderDescriptor 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

      public List<ReferenceProviderDescriptor> getReferenceProviderDescriptors()
      Returns a non-modifiable list of ReferenceProviderDescriptor describing all extension to the quickDiffReferenceProvider 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

      public IQuickDiffReferenceProvider getReferenceProviderOrDefault(ITextEditor editor, String id)
      Returns the quick diff reference provider registered under id, or the default reference provider. The returned provider gets its editor set to editor. If neither the requested provider nor the default provider return true from isEnabled 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 provider
      id - the id as specified in the plugin.xml that installs the reference provider
      Returns:
      the reference provider registered under id, or the default reference provider, or null
    • createQuickDiffAnnotationModel

      public IAnnotationModel createQuickDiffAnnotationModel(ITextEditor editor, String id)
      Creates a new line differ annotation model with its reference provider set to the reference provider obtained by calling getReferenceProviderOrDefault(editor, id).
      Parameters:
      editor - the editor to be installed with the returned provider
      id - the id as specified in the plugin.xml that installs the reference provider
      Returns:
      a quick diff annotation model
    • getConfiguredQuickDiffProvider

      public Object getConfiguredQuickDiffProvider(IAnnotationModel differ)
      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