01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.text;
11:
12: /**
13: * Interface of objects which are interested in getting informed
14: * about changes of a document's partitioning.
15: * <p>
16: * Clients may implement this interface.
17: * </p>
18: * <p>
19: * In order to provided backward compatibility for clients of <code>IDocumentPartitioningListener</code>, extension
20: * interfaces are used to provide a means of evolution. The following extension interfaces
21: * exist:
22: * <ul>
23: * <li> {@link org.eclipse.jface.text.IDocumentPartitioningListenerExtension} since version 2.0 replacing the original
24: * notification mechanism.</li>
25: * <li> {@link org.eclipse.jface.text.IDocumentPartitioningListenerExtension2} since version 3.0 replacing all previous
26: * notification mechanisms. Thus, implementers up-to-date with version 3.0 do not have to implement
27: * {@link org.eclipse.jface.text.IDocumentPartitioningListenerExtension}.</li>
28: * </ul>
29: * </p>
30: * @see org.eclipse.jface.text.IDocumentPartitioningListenerExtension
31: * @see org.eclipse.jface.text.IDocumentPartitioningListenerExtension2
32: * @see org.eclipse.jface.text.IDocument
33: * @see org.eclipse.jface.text.IDocumentPartitioner
34: */
35: public interface IDocumentPartitioningListener {
36:
37: /**
38: * The partitioning of the given document changed.
39: * <p>
40: * In version 2.0 this method has been replaces by
41: * {@link IDocumentPartitioningListenerExtension#documentPartitioningChanged(IDocument, IRegion)}.
42: * <p>
43: * In version 3.0 this method has been replaces by
44: * {@link IDocumentPartitioningListenerExtension2#documentPartitioningChanged(DocumentPartitioningChangedEvent)}<p>
45: *
46: * @param document the document whose partitioning changed
47: *
48: * @see IDocumentPartitioningListenerExtension#documentPartitioningChanged(IDocument, IRegion)
49: * @see IDocumentPartitioningListenerExtension2#documentPartitioningChanged(DocumentPartitioningChangedEvent)
50: * @see IDocument#addDocumentPartitioningListener(IDocumentPartitioningListener)
51: */
52: void documentPartitioningChanged(IDocument document);
53: }
|