Eclipse Platform
Release 3.0

org.eclipse.ui.texteditor.quickdiff
Class QuickDiff

java.lang.Object
  extended byorg.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

Constructor Summary
QuickDiff()
          Creates a new instance.
 
Method Summary
 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).
 ReferenceProviderDescriptor getDefaultProvider()
          Returns the first descriptor with the default attribute set to true.
 List getReferenceProviderDescriptors()
          Returns a non-modifiable list of ReferenceProviderDescriptor describing all extension to the quickDiffReferenceProvider extension point.
 IQuickDiffReferenceProvider getReferenceProviderOrDefault(ITextEditor editor, String id)
          Returns the quick diff reference provider registered under id, or the default reference provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickDiff

public QuickDiff()
Creates a new instance.

Method Detail

getDefaultProvider

public ReferenceProviderDescriptor getDefaultProvider()
Returns the first descriptor with the default attribute set to true.

Clients should not cache this value because it can change when plug-ins get dynamically added or removed.

Returns:
the descriptor of the default reference provider or null if none

getReferenceProviderDescriptors

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

Eclipse Platform
Release 3.0

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.