KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > IDocumentPartitionerExtension


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
12 package org.eclipse.jface.text;
13
14
15 /**
16  * Extension interface for {@link org.eclipse.jface.text.IDocumentPartitioner}.
17  * <p>
18  * Replaces the original concept of the document partitioner by returning the
19  * minimal region that includes all partition changes caused by the invocation
20  * of the document partitioner.
21  * The method <code>documentChanged2</code> is considered the replacement of
22  * {@link org.eclipse.jface.text.IDocumentPartitioner#documentChanged(DocumentEvent)}.
23  *
24  * @since 2.0
25  */

26 public interface IDocumentPartitionerExtension {
27
28     /**
29      * The document has been changed. The partitioner updates the document's
30      * partitioning and returns the minimal region that comprises all partition
31      * changes caused in response to the given document event. This method
32      * returns <code>null</code> if the partitioning did not change.
33      * <p>
34      *
35      * Will be called by the connected document and is not intended to be used
36      * by clients other than the connected document.
37      * <p>
38      * Replaces {@link IDocumentPartitioner#documentChanged(DocumentEvent)}.
39      *
40      * @param event the event describing the document change
41      * @return the region of the document in which the partition type changed or <code>null</code>
42      */

43     IRegion documentChanged2(DocumentEvent event);
44 }
45
Popular Tags