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 * Extension interface for {@link org.eclipse.jface.text.IDocument}.<p> 16 * 17 * It adds configuration methods to post notification replaces and document 18 * listener notification. 19 * 20 * @since 2.1 21 */ 22 public interface IDocumentExtension2 { 23 24 /** 25 * Tells the receiver to ignore calls to 26 * <code>registerPostNotificationReplace</code> until 27 * <code>acceptPostNotificationReplaces</code> is called. 28 */ 29 void ignorePostNotificationReplaces(); 30 31 /** 32 * Tells the receiver to accept calls to 33 * <code>registerPostNotificationReplace</code> until 34 * <code>ignorePostNotificationReplaces</code> is called. 35 */ 36 void acceptPostNotificationReplaces(); 37 38 /** 39 * Can be called prior to a <code>replace</code> operation. After the 40 * <code>replace</code> <code>resumeListenerNotification</code> must be 41 * called. The affect of these calls is that no document listener is notified 42 * until <code>resumeListenerNotification</code> is called. This allows clients 43 * to update structure before any listener is informed about the change.<p> 44 * Listener notification can only be stopped for a single <code>replace</code> operation. 45 * Otherwise, document change notifications will be lost. 46 */ 47 void stopListenerNotification(); 48 49 /** 50 * Resumes the notification of document listeners which must previously 51 * have been stopped by a call to <code>stopListenerNotification</code>. 52 */ 53 void resumeListenerNotification(); 54 } 55