/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.compare.contentmergeviewer; import org.eclipse.jface.text.Position; import org.eclipse.jface.text.IDocument; /** * Defines a subrange in a document. *

* It is used by text viewers that can work on a subrange of a document. For example, * a text viewer for Java compilation units might use this to restrict the view * to a single method. *

*

* Clients may implement this interface. *

* * @see TextMergeViewer * @see org.eclipse.compare.structuremergeviewer.DocumentRangeNode */ public interface IDocumentRange { public static final String RANGE_CATEGORY= "DocumentRangeCategory"; //$NON-NLS-1$ /** * Returns the underlying document. * * @return the underlying document */ IDocument getDocument(); /** * Returns a position that specifies a subrange in the underlying document, * or null if this document range spans the whole underlying document. * * @return a position that specifies a subrange in the underlying document, or null */ Position getRange(); }