view dwtx/jface/text/IDocumentExtension2.d @ 129:eb30df5ca28b

Added JFace Text sources
author Frank Benoit <benoit@tionex.de>
date Sat, 23 Aug 2008 19:10:48 +0200
parents
children c4fb132a086c
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 * Port to the D programming language:
 *     Frank Benoit <benoit@tionex.de>
 *******************************************************************************/

module dwtx.jface.text.IDocumentExtension2;

import dwt.dwthelper.utils;

/**
 * Extension interface for {@link dwtx.jface.text.IDocument}.<p>
 *
 * It adds configuration methods to post notification replaces and document
 * listener notification.
 *
 * @since 2.1
 */
public interface IDocumentExtension2 {

    /**
     * Tells the receiver to ignore calls to
     * <code>registerPostNotificationReplace</code> until
     * <code>acceptPostNotificationReplaces</code> is called.
     */
    void ignorePostNotificationReplaces();

    /**
     * Tells the receiver to accept calls to
     * <code>registerPostNotificationReplace</code> until
     * <code>ignorePostNotificationReplaces</code> is called.
     */
    void acceptPostNotificationReplaces();

    /**
     * Can be called prior to a <code>replace</code> operation. After the
     * <code>replace</code> <code>resumeListenerNotification</code> must be
     * called. The affect of these calls is that no document listener is notified
     * until <code>resumeListenerNotification</code> is called. This allows clients
     * to update structure before any listener is informed about the change.<p>
     * Listener notification can only be stopped for a single <code>replace</code> operation.
     * Otherwise, document change notifications will be lost.
     */
    void stopListenerNotification();

    /**
     * Resumes the notification of document listeners which must previously
     * have been stopped by a call to <code>stopListenerNotification</code>.
     */
    void resumeListenerNotification();
}