KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > contentassist > IContextInformation


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.contentassist;
12
13 import org.eclipse.swt.graphics.Image;
14
15
16 /**
17  * The interface of context information presented to the user and
18  * generated by content assist processors.
19  * <p>
20  * In order to provide backward compatibility for clients of
21  * <code>IContextInformation</code>, extension interfaces are used to
22  * provide a means of evolution. The following extension interfaces
23  * exist:
24  * <ul>
25  * <li>{@link org.eclipse.jface.text.contentassist.IContextInformationExtension}
26  * since version 2.0 introducing the ability to freely position the
27  * context information.</li>
28  * </ul>
29  * </p>
30  * <p>
31  * The interface can be implemented by clients. By default, clients use
32  * {@link org.eclipse.jface.text.contentassist.ContextInformation} as
33  * the standard implementer of this interface.
34  * </p>
35  *
36  * @see IContentAssistProcessor
37  */

38 public interface IContextInformation {
39
40     /**
41      * Returns the string to be displayed in the list of contexts.
42      * This method is used to supply a unique presentation for
43      * situations where the context is ambiguous. These strings are
44      * used to allow the user to select the specific context.
45      *
46      * @return the string to be displayed for the context
47      */

48     String JavaDoc getContextDisplayString();
49
50     /**
51      * Returns the image for this context information.
52      * The image will be shown to the left of the display string.
53      *
54      * @return the image to be shown or <code>null</code> if no image is desired
55      */

56     Image getImage();
57
58     /**
59      * Returns the string to be displayed in the tool tip like information popup.
60      *
61      * @return the string to be displayed
62      */

63     String JavaDoc getInformationDisplayString();
64
65     /**
66      * Compares the given object with this receiver. Two context informations are
67      * equal if there information display strings and their context display strings
68      * are equal.
69      *
70      * @see Object#equals(Object)
71      */

72     boolean equals(Object JavaDoc object);
73 }
74
75
76
Popular Tags