129
|
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
|
131
|
15 import dwtx.jface.text.contentassist.ContentAssistEvent; // packageimport
|
|
16 import dwtx.jface.text.contentassist.Helper; // packageimport
|
|
17 import dwtx.jface.text.contentassist.PopupCloser; // packageimport
|
|
18 import dwtx.jface.text.contentassist.IContentAssistant; // packageimport
|
|
19 import dwtx.jface.text.contentassist.CompletionProposal; // packageimport
|
|
20 import dwtx.jface.text.contentassist.ICompletionProposalExtension5; // packageimport
|
|
21 import dwtx.jface.text.contentassist.IContextInformationValidator; // packageimport
|
|
22 import dwtx.jface.text.contentassist.IContentAssistListener; // packageimport
|
|
23 import dwtx.jface.text.contentassist.ICompletionProposalExtension6; // packageimport
|
|
24 import dwtx.jface.text.contentassist.ICompletionListener; // packageimport
|
|
25 import dwtx.jface.text.contentassist.ICompletionProposalExtension2; // packageimport
|
|
26 import dwtx.jface.text.contentassist.IContentAssistantExtension4; // packageimport
|
|
27 import dwtx.jface.text.contentassist.ContextInformation; // packageimport
|
|
28 import dwtx.jface.text.contentassist.ICompletionProposalExtension3; // packageimport
|
|
29 import dwtx.jface.text.contentassist.ContextInformationValidator; // packageimport
|
|
30 import dwtx.jface.text.contentassist.ICompletionProposal; // packageimport
|
|
31 import dwtx.jface.text.contentassist.IContentAssistProcessor; // packageimport
|
|
32 import dwtx.jface.text.contentassist.AdditionalInfoController; // packageimport
|
|
33 import dwtx.jface.text.contentassist.IContextInformationPresenter; // packageimport
|
|
34 import dwtx.jface.text.contentassist.ICompletionProposalExtension4; // packageimport
|
|
35 import dwtx.jface.text.contentassist.ICompletionListenerExtension; // packageimport
|
|
36 import dwtx.jface.text.contentassist.ContextInformationPopup; // packageimport
|
|
37 import dwtx.jface.text.contentassist.IContextInformationExtension; // packageimport
|
|
38 import dwtx.jface.text.contentassist.IContentAssistantExtension2; // packageimport
|
|
39 import dwtx.jface.text.contentassist.ContentAssistSubjectControlAdapter; // packageimport
|
|
40 import dwtx.jface.text.contentassist.CompletionProposalPopup; // packageimport
|
|
41 import dwtx.jface.text.contentassist.ICompletionProposalExtension; // packageimport
|
|
42 import dwtx.jface.text.contentassist.IContentAssistantExtension3; // packageimport
|
|
43 import dwtx.jface.text.contentassist.ContentAssistant; // packageimport
|
|
44 import dwtx.jface.text.contentassist.IContentAssistantExtension; // packageimport
|
|
45 import dwtx.jface.text.contentassist.JFaceTextMessages; // packageimport
|
|
46
|
|
47
|
129
|
48 import dwt.dwthelper.utils;
|
|
49
|
|
50 import dwt.graphics.Image;
|
|
51
|
|
52
|
|
53 /**
|
|
54 * The interface of context information presented to the user and
|
|
55 * generated by content assist processors.
|
|
56 * <p>
|
|
57 * In order to provide backward compatibility for clients of
|
|
58 * <code>IContextInformation</code>, extension interfaces are used to
|
|
59 * provide a means of evolution. The following extension interfaces
|
|
60 * exist:
|
|
61 * <ul>
|
|
62 * <li>{@link dwtx.jface.text.contentassist.IContextInformationExtension}
|
|
63 * since version 2.0 introducing the ability to freely position the
|
|
64 * context information.</li>
|
|
65 * </ul>
|
|
66 * </p>
|
|
67 * <p>
|
|
68 * The interface can be implemented by clients. By default, clients use
|
|
69 * {@link dwtx.jface.text.contentassist.ContextInformation} as
|
|
70 * the standard implementer of this interface.
|
|
71 * </p>
|
|
72 *
|
|
73 * @see IContentAssistProcessor
|
|
74 */
|
|
75 public interface IContextInformation {
|
|
76
|
|
77 /**
|
|
78 * Returns the string to be displayed in the list of contexts.
|
|
79 * This method is used to supply a unique presentation for
|
|
80 * situations where the context is ambiguous. These strings are
|
|
81 * used to allow the user to select the specific context.
|
|
82 *
|
|
83 * @return the string to be displayed for the context
|
|
84 */
|
|
85 String getContextDisplayString();
|
|
86
|
|
87 /**
|
|
88 * Returns the image for this context information.
|
|
89 * The image will be shown to the left of the display string.
|
|
90 *
|
|
91 * @return the image to be shown or <code>null</code> if no image is desired
|
|
92 */
|
|
93 Image getImage();
|
|
94
|
|
95 /**
|
|
96 * Returns the string to be displayed in the tool tip like information popup.
|
|
97 *
|
|
98 * @return the string to be displayed
|
|
99 */
|
|
100 String getInformationDisplayString();
|
|
101
|
|
102 /**
|
|
103 * Compares the given object with this receiver. Two context informations are
|
|
104 * equal if there information display strings and their context display strings
|
|
105 * are equal.
|
|
106 *
|
|
107 * @see Object#equals(Object)
|
|
108 */
|
|
109 bool equals(Object object);
|
|
110 }
|
|
111
|
|
112
|