Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: fa047123574ad9425986a07c4652e56392cd5a32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.text.source;

/**
 * An annotation access provides access to information that is not available via
 * the API of {@link org.eclipse.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 org.eclipse.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 org.eclipse.jface.text.source.IAnnotationAccessExtension
 * @see org.eclipse.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>
	 */
	@Deprecated
	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>
	 */
	@Deprecated
	boolean 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>
	 */
	@Deprecated
	boolean isTemporary(Annotation annotation);
}

Back to the top