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