comparison dwtx/jface/text/contentassist/IContextInformation.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
comparison
equal deleted inserted replaced
128:8df1d4193877 129:eb30df5ca28b
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 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/
13 module dwtx.jface.text.contentassist.IContextInformation;
14
15 import dwt.dwthelper.utils;
16
17 import dwt.graphics.Image;
18
19
20 /**
21 * The interface of context information presented to the user and
22 * generated by content assist processors.
23 * <p>
24 * In order to provide backward compatibility for clients of
25 * <code>IContextInformation</code>, extension interfaces are used to
26 * provide a means of evolution. The following extension interfaces
27 * exist:
28 * <ul>
29 * <li>{@link dwtx.jface.text.contentassist.IContextInformationExtension}
30 * since version 2.0 introducing the ability to freely position the
31 * context information.</li>
32 * </ul>
33 * </p>
34 * <p>
35 * The interface can be implemented by clients. By default, clients use
36 * {@link dwtx.jface.text.contentassist.ContextInformation} as
37 * the standard implementer of this interface.
38 * </p>
39 *
40 * @see IContentAssistProcessor
41 */
42 public interface IContextInformation {
43
44 /**
45 * Returns the string to be displayed in the list of contexts.
46 * This method is used to supply a unique presentation for
47 * situations where the context is ambiguous. These strings are
48 * used to allow the user to select the specific context.
49 *
50 * @return the string to be displayed for the context
51 */
52 String getContextDisplayString();
53
54 /**
55 * Returns the image for this context information.
56 * The image will be shown to the left of the display string.
57 *
58 * @return the image to be shown or <code>null</code> if no image is desired
59 */
60 Image getImage();
61
62 /**
63 * Returns the string to be displayed in the tool tip like information popup.
64 *
65 * @return the string to be displayed
66 */
67 String getInformationDisplayString();
68
69 /**
70 * Compares the given object with this receiver. Two context informations are
71 * equal if there information display strings and their context display strings
72 * are equal.
73 *
74 * @see Object#equals(Object)
75 */
76 bool equals(Object object);
77 }
78
79