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