129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2006 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 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.source.IAnnotationAccess;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17 /**
|
|
18 * An annotation access provides access to information that is not available via
|
|
19 * the API of {@link dwtx.jface.text.source.Annotation}. With version
|
|
20 * 3.0 all this information is now available from the annotation itself.
|
|
21 * <p>
|
|
22 *
|
|
23 * In order to provide backward compatibility for clients of
|
|
24 * <code>IAnnotationAccess</code>, extension interfaces are used as a means
|
|
25 * of evolution. The following extension interfaces exist:
|
|
26 * <ul>
|
|
27 * <li>{@link dwtx.jface.text.source.IAnnotationAccessExtension} since
|
|
28 * version 3.0 replacing all methods in that interface</li>
|
|
29 * <li>{@link IAnnotationAccessExtension2} since
|
|
30 * version 3.2 allowing to set a quick assist assistant to an annotation access.</li>
|
|
31 * </ul></p>
|
|
32 * <p>
|
|
33 * Clients usually implement this interface and its extension interfaces.</p>
|
|
34 *
|
|
35 * @see dwtx.jface.text.source.IAnnotationAccessExtension
|
|
36 * @see dwtx.jface.text.source.Annotation
|
|
37 * @since 2.1
|
|
38 */
|
|
39 public interface IAnnotationAccess {
|
|
40
|
|
41 /**
|
|
42 * Returns the type of the given annotation.
|
|
43 *
|
|
44 * @param annotation the annotation
|
|
45 * @return the type of the given annotation or <code>null</code> if it has none.
|
|
46 * @deprecated use <code>Annotation.getType()</code>
|
|
47 */
|
|
48 Object getType(Annotation annotation);
|
|
49
|
|
50 /**
|
|
51 * Returns whether the given annotation spans multiple lines.
|
|
52 *
|
|
53 * @param annotation the annotation
|
|
54 * @return <code>true</code> if the annotation spans multiple lines,
|
|
55 * <code>false</code> otherwise
|
|
56 *
|
|
57 * @deprecated assumed to always return <code>true</code>
|
|
58 */
|
|
59 bool isMultiLine(Annotation annotation);
|
|
60
|
|
61 /**
|
|
62 * Returns whether the given annotation is temporary rather than persistent.
|
|
63 *
|
|
64 * @param annotation the annotation
|
|
65 * @return <code>true</code> if the annotation is temporary,
|
|
66 * <code>false</code> otherwise
|
|
67 * @deprecated use <code>Annotation.isPersistent()</code>
|
|
68 */
|
|
69 bool isTemporary(Annotation annotation);
|
|
70 }
|