view dwtx/jface/text/source/IAnnotationAccess.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, 2006 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.source.IAnnotationAccess;

import dwt.dwthelper.utils;

/**
 * An annotation access provides access to information that is not available via
 * the API of {@link dwtx.jface.text.source.Annotation}. With version
 * 3.0 all this information is now available from the annotation itself.
 * <p>
 *
 * In order to provide backward compatibility for clients of
 * <code>IAnnotationAccess</code>, extension interfaces are used as a means
 * of evolution. The following extension interfaces exist:
 * <ul>
 * <li>{@link dwtx.jface.text.source.IAnnotationAccessExtension} since
 *     version 3.0 replacing all methods in that interface</li>
 * <li>{@link IAnnotationAccessExtension2} since
 *     version 3.2 allowing to set a quick assist assistant to an annotation access.</li>
 * </ul></p>
 * <p>
 * Clients usually implement this interface and its extension interfaces.</p>
 *
 * @see dwtx.jface.text.source.IAnnotationAccessExtension
 * @see dwtx.jface.text.source.Annotation
 * @since 2.1
 */
public interface IAnnotationAccess {

    /**
     * Returns the type of the given annotation.
     *
     * @param annotation the annotation
     * @return the type of the given annotation or <code>null</code> if it has none.
     * @deprecated use <code>Annotation.getType()</code>
     */
    Object getType(Annotation annotation);

    /**
     * Returns whether the given annotation spans multiple lines.
     *
     * @param annotation the annotation
     * @return <code>true</code> if the annotation spans multiple lines,
     *  <code>false</code> otherwise
     *
     * @deprecated assumed to always return <code>true</code>
     */
    bool isMultiLine(Annotation annotation);

    /**
     * Returns whether the given annotation is temporary rather than persistent.
     *
     * @param annotation the annotation
     * @return <code>true</code> if the annotation is temporary,
     *  <code>false</code> otherwise
     * @deprecated use <code>Annotation.isPersistent()</code>
     */
    bool isTemporary(Annotation annotation);
}