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